commit | cbd40f8357437a15c653cb8cccd7124a1bb55ae2 | [log] [tgz] |
---|---|---|
author | Chris Lattner <sabre@nondot.org> | Thu Jul 07 05:29:18 2011 +0000 |
committer | Chris Lattner <sabre@nondot.org> | Thu Jul 07 05:29:18 2011 +0000 |
tree | cf6277fb0f5cacde14313834295e2f412bd8373b | |
parent | 7af453a3bdc069ef769c3d3ba02f57b4271c56d0 [diff] [blame] |
type can be null git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134601 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Bitcode/Reader/BitcodeReader.h b/lib/Bitcode/Reader/BitcodeReader.h index 1fa6f82..14033b0 100644 --- a/lib/Bitcode/Reader/BitcodeReader.h +++ b/lib/Bitcode/Reader/BitcodeReader.h
@@ -212,7 +212,7 @@ 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); }