[cfe-commits] r73208 - in /cfe/trunk: lib/CodeGen/CodeGenModule.cpp test/CodeGenCXX/static-assert.cpp
Anders Carlsson
andersca at mac.com
Thu Jun 11 14:22:55 PDT 2009
Author: andersca
Date: Thu Jun 11 16:22:55 2009
New Revision: 73208
URL: http://llvm.org/viewvc/llvm-project?rev=73208&view=rev
Log:
Don't assert when generating code with static_asserts.
Added:
cfe/trunk/test/CodeGenCXX/static-assert.cpp
Modified:
cfe/trunk/lib/CodeGen/CodeGenModule.cpp
Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=73208&r1=73207&r2=73208&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Thu Jun 11 16:22:55 2009
@@ -1481,7 +1481,11 @@
case Decl::CXXDestructor:
EmitCXXDestructors(cast<CXXDestructorDecl>(D));
break;
-
+
+ case Decl::StaticAssert:
+ // Nothing to do.
+ break;
+
// Objective-C Decls
// Forward declarations, no (immediate) code generation.
Added: cfe/trunk/test/CodeGenCXX/static-assert.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/static-assert.cpp?rev=73208&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenCXX/static-assert.cpp (added)
+++ cfe/trunk/test/CodeGenCXX/static-assert.cpp Thu Jun 11 16:22:55 2009
@@ -0,0 +1,3 @@
+// RUN: clang-cc %s -emit-llvm -o - -std=c++0x
+
+static_assert(true, "");
More information about the cfe-commits
mailing list