summaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/LowerSwitch.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/Utils/LowerSwitch.cpp')
-rw-r--r--lib/Transforms/Utils/LowerSwitch.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Utils/LowerSwitch.cpp b/lib/Transforms/Utils/LowerSwitch.cpp
index bcbadd0040..c005d42197 100644
--- a/lib/Transforms/Utils/LowerSwitch.cpp
+++ b/lib/Transforms/Utils/LowerSwitch.cpp
@@ -59,7 +59,7 @@ namespace {
const ConstantInt* CI1 = cast<const ConstantInt>(C1.first);
const ConstantInt* CI2 = cast<const ConstantInt>(C2.first);
- return CI1->getZExtValue() < CI2->getZExtValue();
+ return CI1->getValue().ult(CI2->getValue());
}
};
@@ -128,7 +128,7 @@ BasicBlock* LowerSwitch::switchConvert(CaseItr Begin, CaseItr End,
Case& Pivot = *(Begin + Mid);
DOUT << "Pivot ==> "
- << cast<ConstantInt>(Pivot.first)->getSExtValue() << "\n";
+ << cast<ConstantInt>(Pivot.first)->getValue().toStringSigned(10) << "\n";
BasicBlock* LBranch = switchConvert(LHS.begin(), LHS.end(), Val,
OrigBlock, Default);