[cfe-commits] r89633 - /cfe/trunk/lib/CodeGen/CGDecl.cpp

Daniel Dunbar daniel at zuster.org
Sun Nov 22 16:07:07 PST 2009


Author: ddunbar
Date: Sun Nov 22 18:07:06 2009
New Revision: 89633

URL: http://llvm.org/viewvc/llvm-project?rev=89633&view=rev
Log:
Teach CodeGenFunction::EmitDecl to ignore Using and UsingShadow decls.

Modified:
    cfe/trunk/lib/CodeGen/CGDecl.cpp

Modified: cfe/trunk/lib/CodeGen/CGDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDecl.cpp?rev=89633&r1=89632&r2=89633&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGDecl.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDecl.cpp Sun Nov 22 18:07:06 2009
@@ -30,7 +30,9 @@
 
 void CodeGenFunction::EmitDecl(const Decl &D) {
   switch (D.getKind()) {
-  default: assert(0 && "Unknown decl kind!");
+  default:
+    CGM.ErrorUnsupported(&D, "decl");
+    return;
   case Decl::ParmVar:
     assert(0 && "Parmdecls should not be in declstmts!");
   case Decl::Function:  // void X();
@@ -38,7 +40,9 @@
   case Decl::Enum:      // enum X;
   case Decl::EnumConstant: // enum ? { X = ? }
   case Decl::CXXRecord: // struct/union/class X; [C++]
-  case Decl::UsingDirective: // using X; [C++]
+  case Decl::Using:          // using X; [C++]
+  case Decl::UsingShadow:
+  case Decl::UsingDirective: // using namespace X; [C++]
     // None of these decls require codegen support.
     return;
 





More information about the cfe-commits mailing list