summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExprScalar.cpp
diff options
context:
space:
mode:
authorWill Dietz <wdietz2@illinois.edu>2013-01-07 22:25:52 +0000
committerWill Dietz <wdietz2@illinois.edu>2013-01-07 22:25:52 +0000
commitcefb44869af6cf398c3c0607848c5498a116e616 (patch)
tree46480c6919e15df2621a205f986fb77c62f03ca9 /clang/lib/CodeGen/CGExprScalar.cpp
parent2aaf0651030042c7688d96e7fd1dd54f87cd65fb (diff)
downloadbcm5719-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.cpp4
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);
OpenPOWER on IntegriCloud