diff options
author | Eric Christopher <echristo@apple.com> | 2009-12-23 03:49:37 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2009-12-23 03:49:37 +0000 |
commit | c87915629b965cfd6d8db08ebe990de5fcb2b077 (patch) | |
tree | 26676048296905543f265bb48fa492b49f4e28df /clang/lib/AST/ExprConstant.cpp | |
parent | 9a05f20d410720f3f7dd710cadaff574104a037d (diff) | |
download | bcm5719-llvm-c87915629b965cfd6d8db08ebe990de5fcb2b077.tar.gz bcm5719-llvm-c87915629b965cfd6d8db08ebe990de5fcb2b077.zip |
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.
llvm-svn: 91983
Diffstat (limited to 'clang/lib/AST/ExprConstant.cpp')
-rw-r--r-- | clang/lib/AST/ExprConstant.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp index 13831dc1f52..d91ae6a3e78 100644 --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/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); } |