diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-04-11 12:10:08 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-04-11 12:10:08 +0000 |
commit | 84867442146b6a860ba01e65b3b225cba56cb283 (patch) | |
tree | 237ccccad46d661d5fa09ce6dcfa7634477e6135 /tools/llvm-upgrade | |
parent | 03703f0817825918941c9c28aa1af6ac95c8a5cf (diff) | |
download | external_llvm-84867442146b6a860ba01e65b3b225cba56cb283.zip external_llvm-84867442146b6a860ba01e65b3b225cba56cb283.tar.gz external_llvm-84867442146b6a860ba01e65b3b225cba56cb283.tar.bz2 |
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
Diffstat (limited to 'tools/llvm-upgrade')
-rw-r--r-- | tools/llvm-upgrade/UpgradeParser.y | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/llvm-upgrade/UpgradeParser.y b/tools/llvm-upgrade/UpgradeParser.y index 1751912..0173b44 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<ValID, PATypeHolder>::iterator I = CurModule.LateResolveTypes.find(D); |