summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExpr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CGExpr.cpp')
-rw-r--r--clang/lib/CodeGen/CGExpr.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp
index 389cd000a72..b433a6454eb 100644
--- a/clang/lib/CodeGen/CGExpr.cpp
+++ b/clang/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 &&
OpenPOWER on IntegriCloud