aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/ExprConstant.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2009-12-23 03:49:37 +0000
committerEric Christopher <echristo@apple.com>2009-12-23 03:49:37 +0000
commitfee667f35e64751baa7fefe70b4e7bab06c8cd86 (patch)
tree8437ff4ab4f5d72a7aa1d16f02ef76153183928e /lib/AST/ExprConstant.cpp
parentc8be365b65912ebba182c39ccee4fc5c2fc7572c (diff)
Update for the intrinsic changes in llvm: the object size intrinsic
only takes a boolean second argument now. Update tests accordingly. Currently the builtin still accepts the full range for compatibility. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91983 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ExprConstant.cpp')
-rw-r--r--lib/AST/ExprConstant.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp
index 13831dc1f5..d91ae6a3e7 100644
--- a/lib/AST/ExprConstant.cpp
+++ b/lib/AST/ExprConstant.cpp
@@ -970,8 +970,9 @@ bool IntExprEvaluator::VisitCallExpr(const CallExpr *E) {
}
}
+ // TODO: Perhaps we should let LLVM lower this?
if (E->getArg(0)->HasSideEffects(Info.Ctx)) {
- if (E->getArg(1)->EvaluateAsInt(Info.Ctx).getZExtValue() < 2)
+ if (E->getArg(1)->EvaluateAsInt(Info.Ctx).getZExtValue() == 0)
return Success(-1ULL, E);
return Success(0, E);
}