diff --git a/clang/lib/StaticAnalyzer/Core/Z3CrosscheckVisitor.cpp b/clang/lib/StaticAnalyzer/Core/Z3CrosscheckVisitor.cpp index 836fc375809ad..f965bfb590d80 100644 --- a/clang/lib/StaticAnalyzer/Core/Z3CrosscheckVisitor.cpp +++ b/clang/lib/StaticAnalyzer/Core/Z3CrosscheckVisitor.cpp @@ -92,7 +92,7 @@ void Z3CrosscheckVisitor::finalizeVisitor(BugReporterContext &BRC, }; auto AttemptOnce = [&](const llvm::SMTSolverRef &Solver) -> Z3Result { - constexpr auto getCurrentTime = llvm::TimeRecord::getCurrentTime; + auto getCurrentTime = llvm::TimeRecord::getCurrentTime; unsigned InitialRLimit = GetUsedRLimit(Solver); double Start = getCurrentTime(/*Start=*/true).getWallTime(); std::optional IsSAT = Solver->check(); diff --git a/llvm/include/llvm/BinaryFormat/Dwarf.h b/llvm/include/llvm/BinaryFormat/Dwarf.h index 2ead62025efa7..231b7ac17d75f 100644 --- a/llvm/include/llvm/BinaryFormat/Dwarf.h +++ b/llvm/include/llvm/BinaryFormat/Dwarf.h @@ -1191,32 +1191,32 @@ template struct EnumTraits : public std::false_type {}; template <> struct EnumTraits : public std::true_type { static constexpr char Type[3] = "AT"; - static constexpr StringRef (*StringFn)(unsigned) = &AttributeString; + LLVM_ABI static StringRef (*const StringFn)(unsigned); }; template <> struct EnumTraits
: public std::true_type { static constexpr char Type[5] = "FORM"; - static constexpr StringRef (*StringFn)(unsigned) = &FormEncodingString; + LLVM_ABI static StringRef (*const StringFn)(unsigned); }; template <> struct EnumTraits : public std::true_type { static constexpr char Type[4] = "IDX"; - static constexpr StringRef (*StringFn)(unsigned) = &IndexString; + LLVM_ABI static StringRef (*const StringFn)(unsigned); }; template <> struct EnumTraits : public std::true_type { static constexpr char Type[4] = "TAG"; - static constexpr StringRef (*StringFn)(unsigned) = &TagString; + LLVM_ABI static StringRef (*const StringFn)(unsigned); }; template <> struct EnumTraits : public std::true_type { static constexpr char Type[4] = "LNS"; - static constexpr StringRef (*StringFn)(unsigned) = &LNStandardString; + LLVM_ABI static StringRef (*const StringFn)(unsigned); }; template <> struct EnumTraits : public std::true_type { static constexpr char Type[3] = "OP"; - static constexpr StringRef (*StringFn)(unsigned) = &OperationEncodingString; + LLVM_ABI static StringRef (*const StringFn)(unsigned); }; inline uint64_t computeTombstoneAddress(uint8_t AddressByteSize) { diff --git a/llvm/include/llvm/Object/ELF.h b/llvm/include/llvm/Object/ELF.h index a0dc522e13cab..8d7545144dfd9 100644 --- a/llvm/include/llvm/Object/ELF.h +++ b/llvm/include/llvm/Object/ELF.h @@ -256,8 +256,10 @@ class ELFFile { public: LLVM_ELF_IMPORT_TYPES_ELFT(ELFT) - // Default ctor required to instantiate the template for DLL export. + // Default ctor and copy assignment operator required to instantiate the + // template for DLL export. ELFFile(const ELFFile &) = default; + ELFFile &operator=(const ELFFile &) = default; // This is a callback that can be passed to a number of functions. // It can be used to ignore non-critical errors (warnings), which is diff --git a/llvm/lib/BinaryFormat/Dwarf.cpp b/llvm/lib/BinaryFormat/Dwarf.cpp index b9b10a541b263..0d17dc175fed9 100644 --- a/llvm/lib/BinaryFormat/Dwarf.cpp +++ b/llvm/lib/BinaryFormat/Dwarf.cpp @@ -911,6 +911,18 @@ StringRef llvm::dwarf::RLEString(unsigned RLE) { } } +StringRef (*const llvm::dwarf::EnumTraits::StringFn)(unsigned) = TagString; +StringRef (*const llvm::dwarf::EnumTraits::StringFn)(unsigned) = + AttributeString; +StringRef (*const llvm::dwarf::EnumTraits::StringFn)(unsigned) = + FormEncodingString; +StringRef (*const llvm::dwarf::EnumTraits::StringFn)(unsigned) = + OperationEncodingString; +StringRef (*const llvm::dwarf::EnumTraits::StringFn)(unsigned) = + LNStandardString; +StringRef (*const llvm::dwarf::EnumTraits::StringFn)(unsigned) = + IndexString; + constexpr char llvm::dwarf::EnumTraits::Type[]; constexpr char llvm::dwarf::EnumTraits::Type[]; constexpr char llvm::dwarf::EnumTraits::Type[];