diff options
author | Will Dietz <wdietz2@illinois.edu> | 2013-01-07 22:25:52 +0000 |
---|---|---|
committer | Will Dietz <wdietz2@illinois.edu> | 2013-01-07 22:25:52 +0000 |
commit | cefb44869af6cf398c3c0607848c5498a116e616 (patch) | |
tree | 46480c6919e15df2621a205f986fb77c62f03ca9 /clang/lib/CodeGen/CGExprScalar.cpp | |
parent | 2aaf0651030042c7688d96e7fd1dd54f87cd65fb (diff) | |
download | bcm5719-llvm-cefb44869af6cf398c3c0607848c5498a116e616.tar.gz bcm5719-llvm-cefb44869af6cf398c3c0607848c5498a116e616.zip |
[ubsan] Use correct type for compound assignment ops.
llvm-svn: 171801
Diffstat (limited to 'clang/lib/CodeGen/CGExprScalar.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGExprScalar.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp index 7ec4bc2297e..ae7518a2b94 100644 --- a/clang/lib/CodeGen/CGExprScalar.cpp +++ b/clang/lib/CodeGen/CGExprScalar.cpp @@ -827,7 +827,7 @@ void ScalarExprEmitter::EmitBinOpCheck(Value *Check, const BinOpInfo &Info) { } else if (Opcode == BO_Div || Opcode == BO_Rem) { // Divide or modulo by zero, or signed overflow (eg INT_MAX / -1). CheckName = "divrem_overflow"; - StaticData.push_back(CGF.EmitCheckTypeDescriptor(Info.E->getType())); + StaticData.push_back(CGF.EmitCheckTypeDescriptor(Info.Ty)); } else { // Signed arithmetic overflow (+, -, *). switch (Opcode) { @@ -836,7 +836,7 @@ void ScalarExprEmitter::EmitBinOpCheck(Value *Check, const BinOpInfo &Info) { case BO_Mul: CheckName = "mul_overflow"; break; default: llvm_unreachable("unexpected opcode for bin op check"); } - StaticData.push_back(CGF.EmitCheckTypeDescriptor(Info.E->getType())); + StaticData.push_back(CGF.EmitCheckTypeDescriptor(Info.Ty)); } DynamicData.push_back(Info.LHS); DynamicData.push_back(Info.RHS); |