For PR1336:
authorReid Spencer <rspencer@reidspencer.com>
Mon, 16 Apr 2007 03:04:13 +0000 (03:04 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Mon, 16 Apr 2007 03:04:13 +0000 (03:04 +0000)
Functions without names deserve to be created too. This fixes:
test/CodeGen/Generic/vector-constantexpr.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36105 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-upgrade/UpgradeParser.y

index 84f4eb547fd2b41e6119e98b32d619256b54b1c4..02f4cae685ec8a14a9638e55ad99e60c49425584 100644 (file)
@@ -3034,8 +3034,13 @@ FunctionHeaderH
         Fn = new Function(FT, CurFun.Linkage, FunctionName, M);
         InsertValue(Fn, CurModule.Values);
       }
+    } else {
+      // There's no conflict, just define the function
+      Fn = new Function(FT, CurFun.Linkage, FunctionName, M);
+      InsertValue(Fn, CurModule.Values);
     }
 
+
     CurFun.FunctionStart(Fn);
 
     if (CurFun.isDeclare) {