]> granicus.if.org Git - clang/commitdiff
CGExpr.cpp: Suppress a warning. [-Wunused-variable]
authorNAKAMURA Takumi <geek4civic@gmail.com>
Tue, 11 Nov 2014 01:36:11 +0000 (01:36 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Tue, 11 Nov 2014 01:36:11 +0000 (01:36 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221655 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGExpr.cpp

index 389cd000a724b26a17121f167cb0137fc5f3a5e7..b433a6454eb87c1da6bb9f404d0ceaac24a75805 100644 (file)
@@ -2211,8 +2211,10 @@ void CodeGenFunction::EmitCheck(llvm::Value *Checked, StringRef CheckName,
   for (int i = 1, n = Kinds.size(); i < n; ++i)
     assert(RecoverKind == getRecoverableKind(Kinds[i]) &&
            "All recoverable kinds in a single check must be same!");
+#ifndef NDEBUG
   for (auto Kind : Kinds)
     assert(SanOpts.has(Kind));
+#endif
 
   if (CGM.getCodeGenOpts().SanitizeUndefinedTrapOnError) {
     assert (RecoverKind != CheckRecoverableKind::AlwaysRecoverable &&