diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2008-03-02 02:48:09 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2008-03-02 02:48:09 +0000 |
commit | 3cc9be0b5955278e7f8166b8db3e9ba697902190 (patch) | |
tree | c83f9867eeaff118b40bc0d3b010909e7911e45d /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
parent | 20bcdba9cadb47c3d8fbf1dd31f2942a7d43b2de (diff) | |
download | bcm5719-llvm-3cc9be0b5955278e7f8166b8db3e9ba697902190.tar.gz bcm5719-llvm-3cc9be0b5955278e7f8166b8db3e9ba697902190.zip |
Add an unwind_to field to basic blocks, making them Users instead of Values.
This is the first checkin for PR1269, the new EH infrastructure.
llvm-svn: 47802
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index 61e0ab98989..c1cfa975a71 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -1216,6 +1216,15 @@ bool BitcodeReader::ParseFunctionBody(Function *F) { CurBB = FunctionBBs[0]; continue; + case bitc::FUNC_CODE_INST_BB_UNWINDDEST: // BB_UNWINDDEST: [bb#] + if (CurBB->getUnwindDest()) + return Error("Only permit one BB_UNWINDDEST per BB"); + if (Record.size() != 1) + return Error("Invalid BB_UNWINDDEST record"); + + CurBB->setUnwindDest(getBasicBlock(Record[0])); + continue; + case bitc::FUNC_CODE_INST_BINOP: { // BINOP: [opval, ty, opval, opcode] unsigned OpNum = 0; Value *LHS, *RHS; |