aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Seaborn <mseaborn@chromium.org>2013-04-01 10:36:42 -0700
committerMark Seaborn <mseaborn@chromium.org>2013-04-01 10:36:42 -0700
commit26535c655b240324d5cdfcc61bec85d401f71214 (patch)
tree0e86bf68e1a48a2d670ea1f0d31e47ac04fea2df
parent86107a98ee015de99794e7c118c3df5a81590208 (diff)
PNaCl: Tidy: Remove an unnecessary cast in the ABI checker
I noticed this while debugging a runtime cast assertion error. BUG=https://code.google.com/p/nativeclient/issues/detail?id=2309 TEST=test/NaCl/PNaClABI/*.ll Review URL: https://codereview.chromium.org/13261012
-rw-r--r--lib/Analysis/NaCl/PNaClABITypeChecker.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Analysis/NaCl/PNaClABITypeChecker.cpp b/lib/Analysis/NaCl/PNaClABITypeChecker.cpp
index 0d1caffc29..9afa04d5b5 100644
--- a/lib/Analysis/NaCl/PNaClABITypeChecker.cpp
+++ b/lib/Analysis/NaCl/PNaClABITypeChecker.cpp
@@ -106,9 +106,8 @@ Type *PNaClABITypeChecker::checkTypesInConstant(const Constant *V) {
// Operand values must also be valid. Values may be circular, so
// mark the current value as valid to avoid infinite recursion.
VisitedConstants[V] = NULL;
- const User *U = cast<User>(V);
- for (Constant::const_op_iterator I = U->op_begin(),
- E = U->op_end(); I != E; ++I) {
+ for (Constant::const_op_iterator I = V->op_begin(),
+ E = V->op_end(); I != E; ++I) {
Type *Invalid = checkTypesInConstant(cast<Constant>(*I));
if (Invalid) {
VisitedConstants[V] = Invalid;