diff options
author | Pierre Gousseau <pierregousseau14@gmail.com> | 2019-02-26 13:50:29 +0000 |
---|---|---|
committer | Pierre Gousseau <pierregousseau14@gmail.com> | 2019-02-26 13:50:29 +0000 |
commit | 40ad3d2aa4b037587c3aba1aee87626830838564 (patch) | |
tree | 2deda53af9bd81f1a8cf64f82cee2aac765f1764 /clang/lib/CodeGen/CGExpr.cpp | |
parent | 89ae290b58e20fc5f56b7bfae4b34e7fef06e1b1 (diff) | |
download | bcm5719-llvm-40ad3d2aa4b037587c3aba1aee87626830838564.tar.gz bcm5719-llvm-40ad3d2aa4b037587c3aba1aee87626830838564.zip |
revert r354873 as this breaks lldb builds.
llvm-svn: 354875
Diffstat (limited to 'clang/lib/CodeGen/CGExpr.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGExpr.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index 09ba2a0eb71..5ee0378efe4 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/lib/CodeGen/CGExpr.cpp @@ -2855,13 +2855,16 @@ enum class CheckRecoverableKind { } static CheckRecoverableKind getRecoverableKind(SanitizerMask Kind) { - assert(Kind.countPopulation() == 1); - if (Kind == SanitizerKind::Vptr) + assert(llvm::countPopulation(Kind) == 1); + switch (Kind) { + case SanitizerKind::Vptr: return CheckRecoverableKind::AlwaysRecoverable; - else if (Kind == SanitizerKind::Return || Kind == SanitizerKind::Unreachable) + case SanitizerKind::Return: + case SanitizerKind::Unreachable: return CheckRecoverableKind::Unrecoverable; - else + default: return CheckRecoverableKind::Recoverable; + } } namespace { |