diff options
author | Stepan Dyatkovskiy <stpworld@narod.ru> | 2012-06-02 09:42:43 +0000 |
---|---|---|
committer | Stepan Dyatkovskiy <stpworld@narod.ru> | 2012-06-02 09:42:43 +0000 |
commit | 43eb31bfae470b33bab9a6764b98b5e8a0beeda5 (patch) | |
tree | 9751b83c2cc411dfc58438db8a03d149e90b720f /lib/Bitcode | |
parent | 0fa2b7b90df9a20baf2d14b7bc4fe7db5144efde (diff) |
PR1255: case ranges.
IntRange converted from struct to class. So main change everywhere is replacement of ".Low/High" with ".getLow/getHigh()"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157884 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode')
-rw-r--r-- | lib/Bitcode/Writer/BitcodeWriter.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/Bitcode/Writer/BitcodeWriter.cpp b/lib/Bitcode/Writer/BitcodeWriter.cpp index 7dd18c87ff..6526b012d8 100644 --- a/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -1161,16 +1161,15 @@ static void WriteInstruction(const Instruction &I, unsigned InstID, Vals64.push_back(CaseRanges.getNumItems()); for (unsigned ri = 0, rn = CaseRanges.getNumItems(); ri != rn; ++ri) { IntegersSubset::Range r = CaseRanges.getItem(ri); + bool IsSingleNumber = r.isSingleNumber(); - Vals64.push_back(CaseRanges.isSingleNumber(ri)); + Vals64.push_back(IsSingleNumber); - const APInt &Low = r.Low; - const APInt &High = r.High; unsigned Code, Abbrev; // will unused. - EmitAPInt(Vals64, Code, Abbrev, Low, true); - if (r.Low != r.High) - EmitAPInt(Vals64, Code, Abbrev, High, true); + EmitAPInt(Vals64, Code, Abbrev, r.getLow(), true); + if (!IsSingleNumber) + EmitAPInt(Vals64, Code, Abbrev, r.getHigh(), true); } Vals64.push_back(VE.getValueID(i.getCaseSuccessor())); } |