aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CIR/CodeGen/CIRGenModule.cpp
diff options
context:
space:
mode:
authorErich Keane <ekeane@nvidia.com>2025-04-28 15:23:10 -0700
committerGitHub <noreply@github.com>2025-04-28 15:23:10 -0700
commit0e07478a5ea7df42a7ec0536b0dfd591e421d844 (patch)
treea409004fd42c7abfa0d3e6756ebb83c3cc68a4d1 /clang/lib/CIR/CodeGen/CIRGenModule.cpp
parentfec003a18a8b5b3dc56c8b59e3516fafaeda7072 (diff)
downloadllvm-0e07478a5ea7df42a7ec0536b0dfd591e421d844.zip
llvm-0e07478a5ea7df42a7ec0536b0dfd591e421d844.tar.gz
llvm-0e07478a5ea7df42a7ec0536b0dfd591e421d844.tar.bz2
[CIR] Implement lowering for LinkageSpecDecl (#137634)
Like the NamespaceDecl, this is just emitted as a decl-context, where all its internal declarations get emitted for it. The incubator doesn't seem to have any good tests for this, so I wrote what I could think of as a half-decent test for this one, though the lowering doesn't manage whether these should be mangled, so the test is mostly just for spot-checking purposes. I'm implementing this as it will make writing further tests for future features a little easier.
Diffstat (limited to 'clang/lib/CIR/CodeGen/CIRGenModule.cpp')
-rw-r--r--clang/lib/CIR/CodeGen/CIRGenModule.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CIR/CodeGen/CIRGenModule.cpp b/clang/lib/CIR/CodeGen/CIRGenModule.cpp
index b9cc2da..a6a4330 100644
--- a/clang/lib/CIR/CodeGen/CIRGenModule.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenModule.cpp
@@ -677,8 +677,9 @@ void CIRGenModule::emitTopLevelDecl(Decl *decl) {
break;
// C++ Decls
+ case Decl::LinkageSpec:
case Decl::Namespace:
- emitDeclContext(cast<NamespaceDecl>(decl));
+ emitDeclContext(Decl::castToDeclContext(decl));
break;
}
}