Skip to content

Commit 55a2236

Browse files
authored
[CIR][CIRGen][NFC] Handle PragmaComment in emitTopLevelDecl (#1521)
- Part of #70 This is not very useful now, as both branches of interest are NYI. I will try to implement the real features in subsequent patches.
1 parent 6d19a97 commit 55a2236

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

clang/lib/CIR/CodeGen/CIRGenModule.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2035,6 +2035,24 @@ void CIRGenModule::emitTopLevelDecl(Decl *decl) {
20352035
emitTopLevelDecl(childDecl);
20362036
break;
20372037
}
2038+
case Decl::PragmaComment: {
2039+
const auto *PCD = cast<PragmaCommentDecl>(decl);
2040+
switch (PCD->getCommentKind()) {
2041+
case PCK_Unknown:
2042+
llvm_unreachable("unexpected pragma comment kind");
2043+
case PCK_Linker:
2044+
assert(!MissingFeatures::emitModuleLinkOptions() && "NYI");
2045+
break;
2046+
case PCK_Lib:
2047+
assert(!MissingFeatures::elfDependentLibraries() && "NYI");
2048+
break;
2049+
case PCK_Compiler:
2050+
case PCK_ExeStr:
2051+
case PCK_User:
2052+
break; // We ignore all of these.
2053+
}
2054+
break;
2055+
}
20382056
// No code generation needed.
20392057
case Decl::UsingShadow:
20402058
case Decl::ClassTemplate:

0 commit comments

Comments
 (0)