Regenerate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36106 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer 2007-04-16 03:05:01 +00:00
parent 7055dafa7f
commit e59f4931f4
3 changed files with 292 additions and 280 deletions

File diff suppressed because it is too large Load Diff

View File

@ -335,7 +335,7 @@
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
#line 1770 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
#line 1771 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
typedef union YYSTYPE {
llvm::Module *ModuleVal;
llvm::Function *FunctionVal;

View File

@ -934,8 +934,9 @@ ParseGlobalVariable(char *NameStr,GlobalValue::LinkageTypes Linkage,
// 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 @@ FunctionHeaderH
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.
@ -3033,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) {