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

3
build/llvm/LLVM.lua

@ -263,7 +263,6 @@ function cmake(gen, conf, builddir, options) @@ -263,7 +263,6 @@ function cmake(gen, conf, builddir, options)
.. ' -DLLVM_INCLUDE_TESTS=false'
.. ' -DLLVM_ENABLE_LIBEDIT=false'
.. ' -DLLVM_ENABLE_LIBXML2=false'
.. ' -DLLVM_ENABLE_HIP=false'
.. ' -DLLVM_ENABLE_MLGO=false'
.. ' -DLLVM_ENABLE_TERMINFO=false'
.. ' -DLLVM_ENABLE_ZLIB=false'
@ -379,8 +378,6 @@ function cmake(gen, conf, builddir, options) @@ -379,8 +378,6 @@ function cmake(gen, conf, builddir, options)
.. ' -DCLANG_INCLUDE_TESTS=false'
.. ' -DCLANG_TOOL_AMDGPU_ARCH_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_CLANG_CHECK_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 @@ -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)
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))
{
auto PC = new ParamCommandComment();
@ -137,6 +130,13 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C, clang::Compiler @@ -137,6 +130,13 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C, clang::Compiler
_Comment = VL;
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))
{
auto PC = new ParagraphComment();

24
src/CppParser/Parser.cpp

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

Loading…
Cancel
Save