summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/Transforms/Scalar/SCCP.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Scalar/SCCP.cpp b/llvm/lib/Transforms/Scalar/SCCP.cpp
index da700f18cda..ea852147a7c 100644
--- a/llvm/lib/Transforms/Scalar/SCCP.cpp
+++ b/llvm/lib/Transforms/Scalar/SCCP.cpp
@@ -301,7 +301,8 @@ public:
}
void markOverdefined(Value *V) {
- assert(!V->getType()->isStructTy() && "Should use other method");
+ assert(!V->getType()->isStructTy() &&
+ "structs should use markAnythingOverdefined");
markOverdefined(ValueState[V], V);
}
@@ -334,12 +335,12 @@ private:
}
void markConstant(Value *V, Constant *C) {
- assert(!V->getType()->isStructTy() && "Should use other method");
+ assert(!V->getType()->isStructTy() && "structs should use mergeInValue");
markConstant(ValueState[V], V, C);
}
void markForcedConstant(Value *V, Constant *C) {
- assert(!V->getType()->isStructTy() && "Should use other method");
+ assert(!V->getType()->isStructTy() && "structs should use mergeInValue");
LatticeVal &IV = ValueState[V];
IV.markForcedConstant(C);
DEBUG(dbgs() << "markForcedConstant: " << *C << ": " << *V << '\n');
@@ -374,7 +375,8 @@ private:
}
void mergeInValue(Value *V, LatticeVal MergeWithV) {
- assert(!V->getType()->isStructTy() && "Should use other method");
+ assert(!V->getType()->isStructTy() &&
+ "non-structs should use markConstant");
mergeInValue(ValueState[V], V, MergeWithV);
}
OpenPOWER on IntegriCloud