Skip to content

Adds clang 19 support #1942

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
7 changes: 6 additions & 1 deletion build/LLVM.lua
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ function SetupLLVMLibs()

filter { "toolset:msc*" }
links { "version" }

links { "ntdll"}

filter {}

if LLVMDirPerConfiguration then
Expand All @@ -164,6 +165,7 @@ function SetupLLVMLibs()

links
{
"clangAPINotes",
"clangFrontend",
"clangDriver",
"clangSerialization",
Expand All @@ -185,8 +187,10 @@ function SetupLLVMLibs()
"LLVMPasses",
"LLVMObjCARCOpts",
"LLVMLibDriver",
"LLVMFrontendOffloading",
"LLVMFrontendHLSL",
"LLVMFrontendOpenMP",
"LLVMHipStdPar",
"LLVMOption",
"LLVMCoverage",
"LLVMCoroutines",
Expand All @@ -201,6 +205,7 @@ function SetupLLVMLibs()
"LLVMAArch64Disassembler",
"LLVMAArch64Info",
"LLVMAArch64Utils",
"LLVMFrontendDriver",
"LLVMipo",
"LLVMInstrumentation",
"LLVMVectorize",
Expand Down
2 changes: 1 addition & 1 deletion build/llvm/LLVM-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6eb36aed86ea276695697093eb8136554c29286b
cd708029e0b2869e80abe31ddb175f7c35361f90
6 changes: 4 additions & 2 deletions build/llvm/LLVM.lua
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ function cmake(gen, conf, builddir, options)
.. ' -DLLVM_INCLUDE_TESTS=false'
.. ' -DLLVM_ENABLE_LIBEDIT=false'
.. ' -DLLVM_ENABLE_LIBXML2=false'
.. ' -DLLVM_ENABLE_MLGO=false'
.. ' -DLLVM_ENABLE_TERMINFO=false'
.. ' -DLLVM_ENABLE_ZLIB=false'
.. ' -DLLVM_ENABLE_ZSTD=false'
Expand Down Expand Up @@ -323,7 +324,7 @@ function cmake(gen, conf, builddir, options)
.. ' -DLLVM_TOOL_LLVM_MODEXTRACT_BUILD=false'
.. ' -DLLVM_TOOL_LLVM_MT_BUILD=false'
.. ' -DLLVM_TOOL_LLVM_NM_BUILD=false'
.. ' -DLLVM_TOOL_LLVM_OBJCOPY_BUILD=false'
.. ' -DLLVM_TOOL_LLVM_OBJCOPY_BUILD=true'
.. ' -DLLVM_TOOL_LLVM_OBJDUMP_BUILD=false'
.. ' -DLLVM_TOOL_LLVM_OPT_FUZZER_BUILD=false'
.. ' -DLLVM_TOOL_LLVM_OPT_REPORT_BUILD=false'
Expand Down Expand Up @@ -363,7 +364,8 @@ function cmake(gen, conf, builddir, options)
.. ' -DLLVM_TOOL_VERIFY_USELISTORDER_BUILD=false'
.. ' -DLLVM_TOOL_VFABI_DEMANGLE_FUZZER_BUILD=false'
.. ' -DLLVM_TOOL_XCODE_TOOLCHAIN_BUILD=false'
.. ' -DLLVM_TOOL_YAML2OBJ_BUILD=false'
.. ' -DLLVM_TOOL_YAML2OBJ_BUILD=true'
.. ' -DLLVM_TOOL_LLVM_OBJCOPY_BUILD=true'
.. ' -DLLVM_HAVE_LIBXAR=false'
.. ' -DCLANG_BUILD_EXAMPLES=false '
.. ' -DCLANG_BUILD_TOOLS=false'
Expand Down
8 changes: 6 additions & 2 deletions src/CppParser/ASTNameMangler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,18 @@ std::string ASTNameMangler::GetMangledStructor(const NamedDecl* ND, unsigned Str
return FrontendBuf;
}

std::string ASTNameMangler::GetMangledThunk(const CXXMethodDecl* MD, const ThunkInfo& T, bool /*ElideOverrideInfo*/) const
std::string ASTNameMangler::GetMangledThunk(const CXXMethodDecl* MD, const ThunkInfo& T, bool ElideOverrideInfo) const
{
std::string FrontendBuf;
llvm::raw_string_ostream FOS(FrontendBuf);

// TODO: Enable `ElideOverrideInfo` param if clang is updated to 19
MC->mangleThunk(MD, T, /*ElideOverrideInfo,*/ FOS);

#if LLVM_VERSION_MAJOR >= 19
MC->mangleThunk(MD, T, ElideOverrideInfo, FOS);
#else
MC->mangleThunk(MD, T, FOS);
#endif
return FrontendBuf;
}

Expand Down
Loading
Loading