Skip to content

Commit a48ef4c

Browse files
committed
Move CGDecl implementation here
1 parent 05b6bee commit a48ef4c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

clang/lib/CodeGen/CGDecl.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,12 @@ void CodeGenFunction::EmitDecl(const Decl &D, bool EvaluateConditionDecl) {
143143
// None of these decls require codegen support.
144144
return;
145145

146-
case Decl::CXXExpansionStmt:
147-
llvm_unreachable("TODO");
146+
case Decl::CXXExpansionStmt: {
147+
const auto *ESD = cast<CXXExpansionStmtDecl>(&D);
148+
assert(ESD->getInstantiations() && "expansion statement not expanded?");
149+
EmitStmt(ESD->getInstantiations());
150+
return;
151+
}
148152

149153
case Decl::NamespaceAlias:
150154
if (CGDebugInfo *DI = getDebugInfo())

0 commit comments

Comments
 (0)