summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2008-08-10 06:58:01 +0000
committerDaniel Dunbar <daniel@zuster.org>2008-08-10 06:58:01 +0000
commit63fed4f35e410b1b3ec4bb957a1542e3b56214c0 (patch)
treeb3a181333f383a3335ac63f56c1db6d6f427d2b5 /clang
parent9a8d07321ac822c0303073cc8bb4a44b076dda2d (diff)
downloadbcm5719-llvm-63fed4f35e410b1b3ec4bb957a1542e3b56214c0.tar.gz
bcm5719-llvm-63fed4f35e410b1b3ec4bb957a1542e3b56214c0.zip
Update ShuffeVectorExpr::getShuffleMaskIdx to use
getIntegerConstantExprValue. Tweak getIntegerConstantExprValue to suppress warning in Release-Asserts mode. llvm-svn: 54609
Diffstat (limited to 'clang')
-rw-r--r--clang/include/clang/AST/Expr.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/include/clang/AST/Expr.h b/clang/include/clang/AST/Expr.h
index a92b940ead8..5a3e8f78e2d 100644
--- a/clang/include/clang/AST/Expr.h
+++ b/clang/include/clang/AST/Expr.h
@@ -101,6 +101,7 @@ public:
llvm::APSInt getIntegerConstantExprValue(ASTContext &Ctx) const {
llvm::APSInt X(32);
bool success = isIntegerConstantExpr(X, Ctx);
+ success = success;
assert(success && "Illegal argument to getIntegerConstantExpr");
return X;
}
@@ -1214,10 +1215,7 @@ public:
unsigned getShuffleMaskIdx(ASTContext &Ctx, unsigned N) {
assert((N < NumExprs - 2) && "Shuffle idx out of range!");
- llvm::APSInt Result(32);
- bool result = getExpr(N+2)->isIntegerConstantExpr(Result, Ctx);
- assert(result && "Must be integer constant");
- return Result.getZExtValue();
+ return getExpr(N+2)->getIntegerConstantExprValue(Ctx).getZExtValue();
}
// Iterators
OpenPOWER on IntegriCloud