From 180cfaff87093cf4d95ebf070996e02628bc4e64 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Tue, 11 Nov 2014 01:36:11 +0000 Subject: [PATCH] CGExpr.cpp: Suppress a warning. [-Wunused-variable] git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221655 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGExpr.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index 389cd000a7..b433a6454e 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/lib/CodeGen/CGExpr.cpp @@ -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 && -- 2.40.0