aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ExecutionEngine/Interpreter/Execution.cpp4
-rw-r--r--lib/VMCore/Verifier.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/ExecutionEngine/Interpreter/Execution.cpp b/lib/ExecutionEngine/Interpreter/Execution.cpp
index d54010195d..d4b6ed0003 100644
--- a/lib/ExecutionEngine/Interpreter/Execution.cpp
+++ b/lib/ExecutionEngine/Interpreter/Execution.cpp
@@ -655,8 +655,8 @@ void Interpreter::visitSwitchInst(SwitchInst &I) {
for (unsigned n = 0, en = Case.getNumItems(); n != en; ++n) {
IntegersSubset::Range r = Case.getItem(n);
// FIXME: Currently work with ConstantInt based numbers.
- const ConstantInt *LowCI = r.Low.getImplementation();
- const ConstantInt *HighCI = r.High.getImplementation();
+ const ConstantInt *LowCI = r.Low.toConstantInt();
+ const ConstantInt *HighCI = r.High.toConstantInt();
GenericValue Low = getOperandValue(const_cast<ConstantInt*>(LowCI), SF);
GenericValue High = getOperandValue(const_cast<ConstantInt*>(HighCI), SF);
if (executeICMP_ULE(Low, CondVal, ElTy).IntVal != 0 &&
diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp
index e093c52f99..7afe342899 100644
--- a/lib/VMCore/Verifier.cpp
+++ b/lib/VMCore/Verifier.cpp
@@ -813,9 +813,9 @@ void Verifier::visitSwitchInst(SwitchInst &SI) {
IntegersSubset CaseRanges = i.getCaseValueEx();
for (unsigned ri = 0, rie = CaseRanges.getNumItems(); ri < rie; ++ri) {
IntegersSubset::Range r = CaseRanges.getItem(ri);
- Assert1(r.Low->getBitWidth() == IntTy->getBitWidth(),
+ Assert1(((const APInt&)r.Low).getBitWidth() == IntTy->getBitWidth(),
"Switch constants must all be same type as switch value!", &SI);
- Assert1(r.High->getBitWidth() == IntTy->getBitWidth(),
+ Assert1(((const APInt&)r.High).getBitWidth() == IntTy->getBitWidth(),
"Switch constants must all be same type as switch value!", &SI);
Mapping.add(r);
RangeSetMap[r] = i.getCaseIndex();