aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CIR/CodeGen/CIRGenModule.cpp
diff options
context:
space:
mode:
authorAndy Kaylor <akaylor@nvidia.com>2025-06-05 16:05:01 -0700
committerGitHub <noreply@github.com>2025-06-05 16:05:01 -0700
commite2ae39d0dfb072642c9943eb1ed7fe2a100d9ad0 (patch)
tree1f60a09d5ca6b0d703742d4c2a727ce11a8dc1a1 /clang/lib/CIR/CodeGen/CIRGenModule.cpp
parent52075f01a70990ce5e4b89f825d417a903a8dbe6 (diff)
downloadllvm-e2ae39d0dfb072642c9943eb1ed7fe2a100d9ad0.zip
llvm-e2ae39d0dfb072642c9943eb1ed7fe2a100d9ad0.tar.gz
llvm-e2ae39d0dfb072642c9943eb1ed7fe2a100d9ad0.tar.bz2
[CIR] Add empty handlers for Using and UsingShadow decls (#143032)
This adds emitTopLevelDecl "handlers" for Using and UsingShadow. These don't actually need any handling, but they need to be present in the switch to avoid hitting the default handler, which issues a diagnostic about the decl kind not being implemented. There are several other decl kinds that don't need any handling. Those will be added when I have test cases for them.
Diffstat (limited to 'clang/lib/CIR/CodeGen/CIRGenModule.cpp')
-rw-r--r--clang/lib/CIR/CodeGen/CIRGenModule.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/CIR/CodeGen/CIRGenModule.cpp b/clang/lib/CIR/CodeGen/CIRGenModule.cpp
index 87e3641..1c89452 100644
--- a/clang/lib/CIR/CodeGen/CIRGenModule.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenModule.cpp
@@ -1135,6 +1135,7 @@ void CIRGenModule::emitTopLevelDecl(Decl *decl) {
emitGlobalOpenACCDecl(cast<OpenACCDeclareDecl>(decl));
break;
case Decl::Enum:
+ case Decl::Using: // using X; [C++]
case Decl::UsingDirective: // using namespace X; [C++]
case Decl::Typedef:
case Decl::TypeAlias: // using foo = bar; [C++11]
@@ -1143,6 +1144,10 @@ void CIRGenModule::emitTopLevelDecl(Decl *decl) {
assert(!cir::MissingFeatures::generateDebugInfo());
break;
+ // No code generation needed.
+ case Decl::UsingShadow:
+ break;
+
// C++ Decls
case Decl::LinkageSpec:
case Decl::Namespace: