summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-04-06 23:34:41 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-04-06 23:34:41 +0000
commit4a4ba5c687b401aff52d51e25fff04e8b4a244b6 (patch)
treee008a872651d1806b1f5973d30642596f7deb7f2
parent0477045c3240aa75ebf61e66f10585fabee8f5de (diff)
IR: Fix -Werror noasserts build after r234255
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234259 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/IR/DIBuilder.cpp2
1 files changed, 2 insertions, 0 deletions
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<MDCompositeType>(getNonCompileUnitScope(Context)))
assert(!CT.getIdentifier() &&
"Context of a global variable should not be a type with identifier");
+#endif
}
DIGlobalVariable DIBuilder::createGlobalVariable(