diff options
author | Julian Lettner <jlettner@apple.com> | 2019-01-24 18:04:21 +0000 |
---|---|---|
committer | Julian Lettner <jlettner@apple.com> | 2019-01-24 18:04:21 +0000 |
commit | b62e9dc46b353f8832516f60c9ea13c82d1ea183 (patch) | |
tree | 653fe1ed67d8ccfeaf394f7e8a889dfddbd9c4f2 /clang/lib/CodeGen/CGCall.cpp | |
parent | 1fa239f5002934f36b3de53989052bc9071e15fd (diff) | |
download | bcm5719-llvm-b62e9dc46b353f8832516f60c9ea13c82d1ea183.tar.gz bcm5719-llvm-b62e9dc46b353f8832516f60c9ea13c82d1ea183.zip |
Revert "[Sanitizers] UBSan unreachable incompatible with ASan in the presence of `noreturn` calls"
This reverts commit cea84ab93aeb079a358ab1c8aeba6d9140ef8b47.
llvm-svn: 352069
Diffstat (limited to 'clang/lib/CodeGen/CGCall.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGCall.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index bebefe5384a..a650493c5ba 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -4401,16 +4401,12 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, if (UnusedReturnSizePtr) PopCleanupBlock(); - // Replace the noreturn attribute to better diagnose unreachable UB. + // Strip away the noreturn attribute to better diagnose unreachable UB. if (SanOpts.has(SanitizerKind::Unreachable)) { - // Also remove from function since CS.hasFnAttr(..) also checks attributes - // of the called function. if (auto *F = CS.getCalledFunction()) F->removeFnAttr(llvm::Attribute::NoReturn); CS.removeAttribute(llvm::AttributeList::FunctionIndex, llvm::Attribute::NoReturn); - CS.addAttribute(llvm::AttributeList::FunctionIndex, - llvm::Attribute::ExpectNoReturn); } EmitUnreachable(Loc); |