Skip to content

Commit 2d59b82

Browse files
committed
Fixes link errors. Fixes for failing tests
1 parent 6a7258f commit 2d59b82

File tree

4 files changed

+32
-16
lines changed

4 files changed

+32
-16
lines changed

build/LLVM.lua

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ function SetupLLVMLibs()
137137

138138
filter { "toolset:msc*" }
139139
links { "version" }
140-
140+
links { "ntdll"}
141+
141142
filter {}
142143

143144
if LLVMDirPerConfiguration then
@@ -164,6 +165,7 @@ function SetupLLVMLibs()
164165

165166
links
166167
{
168+
"clangAPINotes",
167169
"clangFrontend",
168170
"clangDriver",
169171
"clangSerialization",
@@ -185,8 +187,10 @@ function SetupLLVMLibs()
185187
"LLVMPasses",
186188
"LLVMObjCARCOpts",
187189
"LLVMLibDriver",
190+
"LLVMFrontendOffloading",
188191
"LLVMFrontendHLSL",
189192
"LLVMFrontendOpenMP",
193+
"LLVMHipStdPar",
190194
"LLVMOption",
191195
"LLVMCoverage",
192196
"LLVMCoroutines",
@@ -201,6 +205,7 @@ function SetupLLVMLibs()
201205
"LLVMAArch64Disassembler",
202206
"LLVMAArch64Info",
203207
"LLVMAArch64Utils",
208+
"LLVMFrontendDriver",
204209
"LLVMipo",
205210
"LLVMInstrumentation",
206211
"LLVMVectorize",

build/llvm/LLVM.lua

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,6 @@ function cmake(gen, conf, builddir, options)
260260
.. ' -DLLVM_INCLUDE_TESTS=false'
261261
.. ' -DLLVM_ENABLE_LIBEDIT=false'
262262
.. ' -DLLVM_ENABLE_LIBXML2=false'
263-
.. ' -DLLVM_ENABLE_HIP=false'
264263
.. ' -DLLVM_ENABLE_MLGO=false'
265264
.. ' -DLLVM_ENABLE_TERMINFO=false'
266265
.. ' -DLLVM_ENABLE_ZLIB=false'
@@ -376,8 +375,6 @@ function cmake(gen, conf, builddir, options)
376375
.. ' -DCLANG_INCLUDE_TESTS=false'
377376
.. ' -DCLANG_TOOL_AMDGPU_ARCH_BUILD=false'
378377
.. ' -DCLANG_TOOL_APINOTES_TEST_BUILD=false'
379-
.. ' -DCLANG_ENABLE_HIP=false'
380-
.. ' -DCLANG_ENABLE_API_NOTES=false'
381378
.. ' -DCLANG_TOOL_ARCMT_TEST_BUILD=false'
382379
.. ' -DCLANG_TOOL_CLANG_CHECK_BUILD=false'
383380
.. ' -DCLANG_TOOL_CLANG_DIFF_BUILD=false'

src/CppParser/Comments.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,6 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C, clang::Compiler
9898
for (auto I = CK->child_begin(), E = CK->child_end(); I != E; ++I)
9999
FC->Blocks.push_back(static_cast<BlockContentComment*>(ConvertCommentBlock(*I, CI)));
100100
}
101-
else if (auto CK = dyn_cast<const comments::BlockCommandComment>(C))
102-
{
103-
auto BC = new BlockCommandComment();
104-
_Comment = BC;
105-
HandleBlockCommand(CK, BC);
106-
BC->paragraphComment = static_cast<ParagraphComment*>(ConvertCommentBlock(CK->getParagraph(), CI));
107-
}
108101
else if (auto CK = dyn_cast<const comments::ParamCommandComment>(C))
109102
{
110103
auto PC = new ParamCommandComment();
@@ -137,6 +130,13 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C, clang::Compiler
137130
_Comment = VL;
138131
VL->text = CK->getText().str();
139132
}
133+
else if (auto CK = dyn_cast<const comments::BlockCommandComment>(C))
134+
{
135+
auto BC = new BlockCommandComment();
136+
_Comment = BC;
137+
HandleBlockCommand(CK, BC);
138+
BC->paragraphComment = static_cast<ParagraphComment*>(ConvertCommentBlock(CK->getParagraph(), CI));
139+
}
140140
else if (auto CK = dyn_cast<const comments::ParagraphComment>(C))
141141
{
142142
auto PC = new ParagraphComment();

src/CppParser/Parser.cpp

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1396,9 +1396,15 @@ Parser::WalkClassTemplateSpecialization(const clang::ClassTemplateSpecialization
13961396
CT->Specializations.push_back(TS);
13971397

13981398
auto& TAL = CTS->getTemplateArgs();
1399-
TemplateSpecializationTypeLoc TSL;
1400-
1401-
TS->Arguments = WalkTemplateArgumentList(&TAL, nullptr);
1399+
auto TSI = CTS->getTemplateArgsAsWritten();
1400+
if (TSI)
1401+
{
1402+
TS->Arguments = WalkTemplateArgumentList(&TAL, TSI);
1403+
}
1404+
else
1405+
{
1406+
TS->Arguments = WalkTemplateArgumentList(&TAL, (TemplateSpecializationTypeLoc*)0);
1407+
}
14021408

14031409
if (CTS->isCompleteDefinition())
14041410
{
@@ -1442,8 +1448,16 @@ Parser::WalkClassTemplatePartialSpecialization(const clang::ClassTemplatePartial
14421448
TS->specializationKind = WalkTemplateSpecializationKind(CTS->getSpecializationKind());
14431449
CT->Specializations.push_back(TS);
14441450

1445-
const TemplateArgumentList& TAL = CTS->getTemplateArgs();
1446-
WalkTemplateArgumentList(&TAL, nullptr);
1451+
auto& TAL = CTS->getTemplateArgs();
1452+
auto TSI = CTS->getTemplateArgsAsWritten();
1453+
if (TSI)
1454+
{
1455+
TS->Arguments = WalkTemplateArgumentList(&TAL, TSI);
1456+
}
1457+
else
1458+
{
1459+
TS->Arguments = WalkTemplateArgumentList(&TAL, (TemplateSpecializationTypeLoc*)0);
1460+
}
14471461

14481462
if (CTS->isCompleteDefinition())
14491463
{

0 commit comments

Comments
 (0)