From: Reid Spencer Date: Wed, 11 Apr 2007 12:10:08 +0000 (+0000) Subject: Fix a crash-by-unknown-exception caused by attempting to use a null pointer X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=84867442146b6a860ba01e65b3b225cba56cb283;p=oota-llvm.git 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 --- diff --git a/tools/llvm-upgrade/UpgradeParser.y b/tools/llvm-upgrade/UpgradeParser.y index 1751912a2e6..0173b44dddc 100644 --- a/tools/llvm-upgrade/UpgradeParser.y +++ b/tools/llvm-upgrade/UpgradeParser.y @@ -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::iterator I = CurModule.LateResolveTypes.find(D);