From daf3c985f75bae2f4f01594be2fbc02f953e7b06 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Fri, 18 Apr 2025 12:52:51 -0700 Subject: [CIR] Upstream support for typedef and type aliases (#136335) Nothing is actually needed in ClangIR to support typedef and type aliases, but the Decl kinds need to be explicitly ignored in the emitDecl handlers to avoid hitting the default NYI errors. This change does that and adds tests. --- clang/lib/CIR/CodeGen/CIRGenModule.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'clang/lib/CIR/CodeGen/CIRGenModule.cpp') diff --git a/clang/lib/CIR/CodeGen/CIRGenModule.cpp b/clang/lib/CIR/CodeGen/CIRGenModule.cpp index 1b50454..3b13d495 100644 --- a/clang/lib/CIR/CodeGen/CIRGenModule.cpp +++ b/clang/lib/CIR/CodeGen/CIRGenModule.cpp @@ -618,6 +618,8 @@ void CIRGenModule::emitTopLevelDecl(Decl *decl) { emitGlobalOpenACCDecl(cast(decl)); break; + case Decl::Typedef: + case Decl::TypeAlias: // using foo = bar; [C++11] case Decl::Record: case Decl::CXXRecord: assert(!cir::MissingFeatures::generateDebugInfo()); -- cgit v1.1