diff options
author | Richard Trieu <rtrieu@google.com> | 2012-07-23 20:21:35 +0000 |
---|---|---|
committer | Richard Trieu <rtrieu@google.com> | 2012-07-23 20:21:35 +0000 |
commit | c320c745ccd411caa9afa776bf51548b758bf4fe (patch) | |
tree | ee99b17c47bceb296088c79e9f0587e0ed694daf /clang/lib/CodeGen/CGStmt.cpp | |
parent | e3942ef9a45fb9a0bf99c2ea2de5af761d8a269a (diff) | |
download | bcm5719-llvm-c320c745ccd411caa9afa776bf51548b758bf4fe.tar.gz bcm5719-llvm-c320c745ccd411caa9afa776bf51548b758bf4fe.zip |
Change APInt to APSInt in one instance. Also change a call to operator==() to
APSInt::isSameValue() when comparing different sized APSInt's.
llvm-svn: 160641
Diffstat (limited to 'clang/lib/CodeGen/CGStmt.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGStmt.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGStmt.cpp b/clang/lib/CodeGen/CGStmt.cpp index 26a31cdad4b..33776b6c599 100644 --- a/clang/lib/CodeGen/CGStmt.cpp +++ b/clang/lib/CodeGen/CGStmt.cpp @@ -1104,7 +1104,7 @@ static CSFC_Result CollectStatementsForCase(const Stmt *S, /// for a switch on constant. See the comment above CollectStatementsForCase /// for more details. static bool FindCaseStatementsForValue(const SwitchStmt &S, - const llvm::APInt &ConstantCondValue, + const llvm::APSInt &ConstantCondValue, SmallVectorImpl<const Stmt*> &ResultStmts, ASTContext &C) { // First step, find the switch case that is being branched to. We can do this @@ -1168,7 +1168,7 @@ void CodeGenFunction::EmitSwitchStmt(const SwitchStmt &S) { // See if we can constant fold the condition of the switch and therefore only // emit the live case statement (if any) of the switch. - llvm::APInt ConstantCondValue; + llvm::APSInt ConstantCondValue; if (ConstantFoldsToSimpleInteger(S.getCond(), ConstantCondValue)) { SmallVector<const Stmt*, 4> CaseStmts; if (FindCaseStatementsForValue(S, ConstantCondValue, CaseStmts, |