type can be null

llvm-svn: 134601
This commit is contained in:
Chris Lattner
2011-07-07 05:29:18 +00:00
parent cdfcc2dee6
commit 54677c15f3

View File

@@ -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);
}