[llvm] r234259 - IR: Fix -Werror noasserts build after r234255

Duncan P. N. Exon Smith dexonsmith at apple.com
Mon Apr 6 16:34:41 PDT 2015


Author: dexonsmith
Date: Mon Apr  6 18:34:41 2015
New Revision: 234259

URL: http://llvm.org/viewvc/llvm-project?rev=234259&view=rev
Log:
IR: Fix -Werror noasserts build after r234255

Modified:
    llvm/trunk/lib/IR/DIBuilder.cpp

Modified: llvm/trunk/lib/IR/DIBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DIBuilder.cpp?rev=234259&r1=234258&r2=234259&view=diff
==============================================================================
--- llvm/trunk/lib/IR/DIBuilder.cpp (original)
+++ llvm/trunk/lib/IR/DIBuilder.cpp Mon Apr  6 18:34:41 2015
@@ -576,10 +576,12 @@ DISubrange DIBuilder::getOrCreateSubrang
 }
 
 static void checkGlobalVariableScope(DIDescriptor Context) {
+#ifndef NDEBUG
   if (DICompositeType CT =
           dyn_cast_or_null<MDCompositeType>(getNonCompileUnitScope(Context)))
     assert(!CT.getIdentifier() &&
            "Context of a global variable should not be a type with identifier");
+#endif
 }
 
 DIGlobalVariable DIBuilder::createGlobalVariable(





More information about the llvm-commits mailing list