Skip to content

[llvm] minor fixes for clang-cl Windows DLL build #144386

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clang/lib/StaticAnalyzer/Core/Z3CrosscheckVisitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<bool> IsSAT = Solver->check();
Expand Down
12 changes: 6 additions & 6 deletions llvm/include/llvm/BinaryFormat/Dwarf.h
Original file line number Diff line number Diff line change
Expand Up @@ -1191,32 +1191,32 @@ template <typename Enum> struct EnumTraits : public std::false_type {};

template <> struct EnumTraits<Attribute> : 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<Form> : 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<Index> : 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<Tag> : 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<LineNumberOps> : 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<LocationAtom> : 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) {
Expand Down
4 changes: 3 additions & 1 deletion llvm/include/llvm/Object/ELF.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 12 additions & 0 deletions llvm/lib/BinaryFormat/Dwarf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -911,6 +911,18 @@ StringRef llvm::dwarf::RLEString(unsigned RLE) {
}
}

StringRef (*const llvm::dwarf::EnumTraits<Tag>::StringFn)(unsigned) = TagString;
StringRef (*const llvm::dwarf::EnumTraits<Attribute>::StringFn)(unsigned) =
AttributeString;
StringRef (*const llvm::dwarf::EnumTraits<Form>::StringFn)(unsigned) =
FormEncodingString;
StringRef (*const llvm::dwarf::EnumTraits<LocationAtom>::StringFn)(unsigned) =
OperationEncodingString;
StringRef (*const llvm::dwarf::EnumTraits<LineNumberOps>::StringFn)(unsigned) =
LNStandardString;
StringRef (*const llvm::dwarf::EnumTraits<Index>::StringFn)(unsigned) =
IndexString;

constexpr char llvm::dwarf::EnumTraits<Attribute>::Type[];
constexpr char llvm::dwarf::EnumTraits<Form>::Type[];
constexpr char llvm::dwarf::EnumTraits<Index>::Type[];
Expand Down
Loading