diff options
| author | Will Dietz <wdietz2@illinois.edu> | 2012-12-02 19:50:33 +0000 |
|---|---|---|
| committer | Will Dietz <wdietz2@illinois.edu> | 2012-12-02 19:50:33 +0000 |
| commit | 88e0233ff40b565903ad642cfb0e9f90a700534a (patch) | |
| tree | c7003d6e0800861a6ac329cd1c317ff8d13b7314 /clang/lib/CodeGen/CGExprScalar.cpp | |
| parent | 2c36c71f5b5daae99f173aea32ef34497a7a4a48 (diff) | |
| download | bcm5719-llvm-88e0233ff40b565903ad642cfb0e9f90a700534a.tar.gz bcm5719-llvm-88e0233ff40b565903ad642cfb0e9f90a700534a.zip | |
[ubsan] Add flag to enable recovery from checks when possible.
llvm-svn: 169114
Diffstat (limited to 'clang/lib/CodeGen/CGExprScalar.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGExprScalar.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp index 298be923cbb..993e2a1dc73 100644 --- a/clang/lib/CodeGen/CGExprScalar.cpp +++ b/clang/lib/CodeGen/CGExprScalar.cpp @@ -645,7 +645,8 @@ void ScalarExprEmitter::EmitFloatConversionCheck(Value *OrigSrc, CGF.EmitCheckTypeDescriptor(OrigSrcType), CGF.EmitCheckTypeDescriptor(DstType) }; - CGF.EmitCheck(Check, "float_cast_overflow", StaticArgs, OrigSrc); + CGF.EmitCheck(Check, "float_cast_overflow", StaticArgs, OrigSrc, + CodeGenFunction::CRK_Recoverable); } /// EmitScalarConversion - Emit a conversion from the specified type to the @@ -850,7 +851,8 @@ void ScalarExprEmitter::EmitBinOpCheck(Value *Check, const BinOpInfo &Info) { DynamicData.push_back(Info.RHS); } - CGF.EmitCheck(Check, CheckName, StaticData, DynamicData); + CGF.EmitCheck(Check, CheckName, StaticData, DynamicData, + CodeGenFunction::CRK_Recoverable); } //===----------------------------------------------------------------------===// |

