aboutsummaryrefslogtreecommitdiffstats
path: root/tools/llvm-upgrade
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-04-11 12:10:08 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-04-11 12:10:08 +0000
commit84867442146b6a860ba01e65b3b225cba56cb283 (patch)
tree237ccccad46d661d5fa09ce6dcfa7634477e6135 /tools/llvm-upgrade
parent03703f0817825918941c9c28aa1af6ac95c8a5cf (diff)
downloadexternal_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.y3
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);