From 7055dafa7f961202d1d1f438068be58f11a77d5a Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Mon, 16 Apr 2007 03:04:13 +0000 Subject: [PATCH] For PR1336: 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 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/llvm-upgrade/UpgradeParser.y b/tools/llvm-upgrade/UpgradeParser.y index 84f4eb547fd..02f4cae685e 100644 --- a/tools/llvm-upgrade/UpgradeParser.y +++ b/tools/llvm-upgrade/UpgradeParser.y @@ -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) { -- 2.34.1