Changes in directory llvm/tools/llvm-upgrade:
UpgradeParser.y updated: 1.82 -> 1.83 --- Log message: For PR1336: http://llvm.org/PR1336 : When upgrading global vars, look for conflicts with functions as well. This fixes test/Transforms/GlobalDCE/2002-08-17-FunctionDGE.ll --- Diffs of the changes: (+4 -3) UpgradeParser.y | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) Index: llvm/tools/llvm-upgrade/UpgradeParser.y diff -u llvm/tools/llvm-upgrade/UpgradeParser.y:1.82 llvm/tools/llvm-upgrade/UpgradeParser.y:1.83 --- llvm/tools/llvm-upgrade/UpgradeParser.y:1.82 Sun Apr 15 19:39:39 2007 +++ llvm/tools/llvm-upgrade/UpgradeParser.y Sun Apr 15 21:56:33 2007 @@ -934,8 +934,9 @@ // of this global in the module and emit warnings if there are conflicts. if (!Name.empty()) { // The global has a name. See if there's an existing one of the same name. - if (CurModule.CurrentModule->getNamedGlobal(Name)) { - // We found an existing global ov the same name. This isn't allowed + if (CurModule.CurrentModule->getNamedGlobal(Name) || + CurModule.CurrentModule->getFunction(Name)) { + // We found an existing global of the same name. This isn't allowed // in LLVM 2.0. Consequently, we must alter the name of the global so it // can at least compile. This can happen because of type planes // There is alread a global of the same name which means there is a @@ -2999,7 +3000,7 @@ AI->setName(""); } } else if (Conflict) { - // We have two globals with the same name and different types. + // We have two globals with the same name and different types. // Previously, this was permitted because the symbol table had // "type planes" and names only needed to be distinct within a // type plane. After PR411 was fixed, this is no loner the case. _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits