diff options
author | Chris Lattner <sabre@nondot.org> | 2011-07-07 05:29:18 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-07-07 05:29:18 +0000 |
commit | cbd40f8357437a15c653cb8cccd7124a1bb55ae2 (patch) | |
tree | cf6277fb0f5cacde14313834295e2f412bd8373b /lib/Bitcode | |
parent | 7af453a3bdc069ef769c3d3ba02f57b4271c56d0 (diff) |
type can be null
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134601 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode')
-rw-r--r-- | lib/Bitcode/Reader/BitcodeReader.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Bitcode/Reader/BitcodeReader.h b/lib/Bitcode/Reader/BitcodeReader.h index 1fa6f827b9..14033b095c 100644 --- a/lib/Bitcode/Reader/BitcodeReader.h +++ b/lib/Bitcode/Reader/BitcodeReader.h @@ -212,7 +212,7 @@ public: private: const Type *getTypeByID(unsigned ID, bool isTypeTable = false); Value *getFnValueByID(unsigned ID, const Type *Ty) { - if (Ty->isMetadataTy()) + if (Ty && Ty->isMetadataTy()) return MDValueList.getValueFwdRef(ID); return ValueList.getValueFwdRef(ID, Ty); } |