Ordinary patch for PR1255.
authorStepan Dyatkovskiy <stpworld@narod.ru>
Tue, 8 May 2012 06:36:08 +0000 (06:36 +0000)
committerStepan Dyatkovskiy <stpworld@narod.ru>
Tue, 8 May 2012 06:36:08 +0000 (06:36 +0000)
commit85a4406959fe7794062d62d2f17226235630eee1
treebb1efcd88b32dec49569a1f11cca150671b4805a
parentb78d83d837fc72a6565f186b0ad92d48cdfdb805
Ordinary patch for PR1255.
Added new case-ranges orientated methods for adding/removing cases in SwitchInst. After this patch cases will internally representated as ConstantArray-s instead of ConstantInt, externally cases wrapped within the ConstantRangesSet object.
Old methods of SwitchInst are also works well, but marked as deprecated. So on this stage we have no side effects except that I added support for case ranges in BitcodeReader/Writer, of course test for Bitcode is also added. Old "switch" format is also supported.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156374 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ConstantRangesSet.h
include/llvm/Instructions.h
lib/Bitcode/Reader/BitcodeReader.cpp
lib/Bitcode/Writer/BitcodeWriter.cpp
lib/VMCore/Instructions.cpp
test/Bitcode/2012-05-07-SwitchInstRangesSupport.ll [new file with mode: 0644]