summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.h')
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.h b/llvm/lib/Bitcode/Reader/BitcodeReader.h
index 36972734e80..e537310ecaf 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.h
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.h
@@ -132,6 +132,10 @@ private:
Value *getFnValueByID(unsigned ID, const Type *Ty) {
return ValueList.getValueFwdRef(ID, Ty);
}
+ BasicBlock *getBasicBlock(unsigned ID) const {
+ if (ID >= FunctionBBs.size()) return 0; // Invalid ID
+ return FunctionBBs[ID];
+ }
bool ParseModule(const std::string &ModuleID);
bool ParseTypeTable();
OpenPOWER on IntegriCloud