From: Duncan P. N. Exon Smith Date: Mon, 6 Apr 2015 23:34:41 +0000 (+0000) Subject: IR: Fix -Werror noasserts build after r234255 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4a4ba5c687b401aff52d51e25fff04e8b4a244b6;p=oota-llvm.git IR: Fix -Werror noasserts build after r234255 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234259 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/IR/DIBuilder.cpp b/lib/IR/DIBuilder.cpp index 662b1dfe261..a6e3d3be888 100644 --- a/lib/IR/DIBuilder.cpp +++ b/lib/IR/DIBuilder.cpp @@ -576,10 +576,12 @@ DISubrange DIBuilder::getOrCreateSubrange(int64_t Lo, int64_t Count) { } static void checkGlobalVariableScope(DIDescriptor Context) { +#ifndef NDEBUG if (DICompositeType CT = dyn_cast_or_null(getNonCompileUnitScope(Context))) assert(!CT.getIdentifier() && "Context of a global variable should not be a type with identifier"); +#endif } DIGlobalVariable DIBuilder::createGlobalVariable(