Fix a crash-by-unknown-exception caused by attempting to use a null pointer

as the key for a map insertion.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35896 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer 2007-04-11 12:10:08 +00:00
parent 03703f0817
commit 8486744214

View File

@ -774,7 +774,8 @@ static void ResolveTypeTo(char *Name, const Type *ToTy, const Signedness& Sign){
D = ValID::create((int)CurModule.Types.size());
D.S.copy(Sign);
CurModule.NamedTypeSigns[Name] = Sign;
if (Name)
CurModule.NamedTypeSigns[Name] = Sign;
std::map<ValID, PATypeHolder>::iterator I =
CurModule.LateResolveTypes.find(D);