Browse Source

Fixes link errors. Fixes for failing tests

pull/1949/head
Christopher Franzwa 9 months ago committed by tritao
parent
commit
973f435b16
  1. 7
      build/LLVM.lua
  2. 3
      build/llvm/LLVM.lua
  3. 14
      src/CppParser/Comments.cpp
  4. 24
      src/CppParser/Parser.cpp

7
build/LLVM.lua

@ -137,7 +137,8 @@ function SetupLLVMLibs()
filter { "toolset:msc*" } filter { "toolset:msc*" }
links { "version" } links { "version" }
links { "ntdll"}
filter {} filter {}
if LLVMDirPerConfiguration then if LLVMDirPerConfiguration then
@ -164,6 +165,7 @@ function SetupLLVMLibs()
links links
{ {
"clangAPINotes",
"clangFrontend", "clangFrontend",
"clangDriver", "clangDriver",
"clangSerialization", "clangSerialization",
@ -185,8 +187,10 @@ function SetupLLVMLibs()
"LLVMPasses", "LLVMPasses",
"LLVMObjCARCOpts", "LLVMObjCARCOpts",
"LLVMLibDriver", "LLVMLibDriver",
"LLVMFrontendOffloading",
"LLVMFrontendHLSL", "LLVMFrontendHLSL",
"LLVMFrontendOpenMP", "LLVMFrontendOpenMP",
"LLVMHipStdPar",
"LLVMOption", "LLVMOption",
"LLVMCoverage", "LLVMCoverage",
"LLVMCoroutines", "LLVMCoroutines",
@ -201,6 +205,7 @@ function SetupLLVMLibs()
"LLVMAArch64Disassembler", "LLVMAArch64Disassembler",
"LLVMAArch64Info", "LLVMAArch64Info",
"LLVMAArch64Utils", "LLVMAArch64Utils",
"LLVMFrontendDriver",
"LLVMipo", "LLVMipo",
"LLVMInstrumentation", "LLVMInstrumentation",
"LLVMVectorize", "LLVMVectorize",

3
build/llvm/LLVM.lua

@ -263,7 +263,6 @@ function cmake(gen, conf, builddir, options)
.. ' -DLLVM_INCLUDE_TESTS=false' .. ' -DLLVM_INCLUDE_TESTS=false'
.. ' -DLLVM_ENABLE_LIBEDIT=false' .. ' -DLLVM_ENABLE_LIBEDIT=false'
.. ' -DLLVM_ENABLE_LIBXML2=false' .. ' -DLLVM_ENABLE_LIBXML2=false'
.. ' -DLLVM_ENABLE_HIP=false'
.. ' -DLLVM_ENABLE_MLGO=false' .. ' -DLLVM_ENABLE_MLGO=false'
.. ' -DLLVM_ENABLE_TERMINFO=false' .. ' -DLLVM_ENABLE_TERMINFO=false'
.. ' -DLLVM_ENABLE_ZLIB=false' .. ' -DLLVM_ENABLE_ZLIB=false'
@ -379,8 +378,6 @@ function cmake(gen, conf, builddir, options)
.. ' -DCLANG_INCLUDE_TESTS=false' .. ' -DCLANG_INCLUDE_TESTS=false'
.. ' -DCLANG_TOOL_AMDGPU_ARCH_BUILD=false' .. ' -DCLANG_TOOL_AMDGPU_ARCH_BUILD=false'
.. ' -DCLANG_TOOL_APINOTES_TEST_BUILD=false' .. ' -DCLANG_TOOL_APINOTES_TEST_BUILD=false'
.. ' -DCLANG_ENABLE_HIP=false'
.. ' -DCLANG_ENABLE_API_NOTES=false'
.. ' -DCLANG_TOOL_ARCMT_TEST_BUILD=false' .. ' -DCLANG_TOOL_ARCMT_TEST_BUILD=false'
.. ' -DCLANG_TOOL_CLANG_CHECK_BUILD=false' .. ' -DCLANG_TOOL_CLANG_CHECK_BUILD=false'
.. ' -DCLANG_TOOL_CLANG_DIFF_BUILD=false' .. ' -DCLANG_TOOL_CLANG_DIFF_BUILD=false'

14
src/CppParser/Comments.cpp

@ -98,13 +98,6 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C, clang::Compiler
for (auto I = CK->child_begin(), E = CK->child_end(); I != E; ++I) for (auto I = CK->child_begin(), E = CK->child_end(); I != E; ++I)
FC->Blocks.push_back(static_cast<BlockContentComment*>(ConvertCommentBlock(*I, CI))); FC->Blocks.push_back(static_cast<BlockContentComment*>(ConvertCommentBlock(*I, CI)));
} }
else if (auto CK = dyn_cast<const comments::BlockCommandComment>(C))
{
auto BC = new BlockCommandComment();
_Comment = BC;
HandleBlockCommand(CK, BC);
BC->paragraphComment = static_cast<ParagraphComment*>(ConvertCommentBlock(CK->getParagraph(), CI));
}
else if (auto CK = dyn_cast<const comments::ParamCommandComment>(C)) else if (auto CK = dyn_cast<const comments::ParamCommandComment>(C))
{ {
auto PC = new ParamCommandComment(); auto PC = new ParamCommandComment();
@ -137,6 +130,13 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C, clang::Compiler
_Comment = VL; _Comment = VL;
VL->text = CK->getText().str(); VL->text = CK->getText().str();
} }
else if (auto CK = dyn_cast<const comments::BlockCommandComment>(C))
{
auto BC = new BlockCommandComment();
_Comment = BC;
HandleBlockCommand(CK, BC);
BC->paragraphComment = static_cast<ParagraphComment*>(ConvertCommentBlock(CK->getParagraph(), CI));
}
else if (auto CK = dyn_cast<const comments::ParagraphComment>(C)) else if (auto CK = dyn_cast<const comments::ParagraphComment>(C))
{ {
auto PC = new ParagraphComment(); auto PC = new ParagraphComment();

24
src/CppParser/Parser.cpp

@ -1396,9 +1396,15 @@ Parser::WalkClassTemplateSpecialization(const clang::ClassTemplateSpecialization
CT->Specializations.push_back(TS); CT->Specializations.push_back(TS);
auto& TAL = CTS->getTemplateArgs(); auto& TAL = CTS->getTemplateArgs();
TemplateSpecializationTypeLoc TSL; auto TSI = CTS->getTemplateArgsAsWritten();
if (TSI)
TS->Arguments = WalkTemplateArgumentList(&TAL, nullptr); {
TS->Arguments = WalkTemplateArgumentList(&TAL, TSI);
}
else
{
TS->Arguments = WalkTemplateArgumentList(&TAL, (TemplateSpecializationTypeLoc*)0);
}
if (CTS->isCompleteDefinition()) if (CTS->isCompleteDefinition())
{ {
@ -1442,8 +1448,16 @@ Parser::WalkClassTemplatePartialSpecialization(const clang::ClassTemplatePartial
TS->specializationKind = WalkTemplateSpecializationKind(CTS->getSpecializationKind()); TS->specializationKind = WalkTemplateSpecializationKind(CTS->getSpecializationKind());
CT->Specializations.push_back(TS); CT->Specializations.push_back(TS);
const TemplateArgumentList& TAL = CTS->getTemplateArgs(); auto& TAL = CTS->getTemplateArgs();
WalkTemplateArgumentList(&TAL, nullptr); auto TSI = CTS->getTemplateArgsAsWritten();
if (TSI)
{
TS->Arguments = WalkTemplateArgumentList(&TAL, TSI);
}
else
{
TS->Arguments = WalkTemplateArgumentList(&TAL, (TemplateSpecializationTypeLoc*)0);
}
if (CTS->isCompleteDefinition()) if (CTS->isCompleteDefinition())
{ {

Loading…
Cancel
Save