mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-10 04:33:40 +00:00
Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32934 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
90e2f63151
commit
63c3445cfe
File diff suppressed because it is too large
Load Diff
@ -303,7 +303,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
|
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
|
||||||
#line 895 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
|
#line 876 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
|
||||||
typedef union YYSTYPE {
|
typedef union YYSTYPE {
|
||||||
llvm::Module *ModuleVal;
|
llvm::Module *ModuleVal;
|
||||||
llvm::Function *FunctionVal;
|
llvm::Function *FunctionVal;
|
||||||
|
@ -635,8 +635,8 @@ static void setValueName(Value *V, char *NameStr) {
|
|||||||
assert(inFunctionScope() && "Must be in function scope!");
|
assert(inFunctionScope() && "Must be in function scope!");
|
||||||
SymbolTable &ST = CurFun.CurrentFunction->getSymbolTable();
|
SymbolTable &ST = CurFun.CurrentFunction->getSymbolTable();
|
||||||
if (ST.lookup(V->getType(), Name)) {
|
if (ST.lookup(V->getType(), Name)) {
|
||||||
GenerateError("Redefinition of value named '" + Name + "' in the '" +
|
GenerateError("Redefinition of value '" + Name + "' of type '" +
|
||||||
V->getType()->getDescription() + "' type plane!");
|
V->getType()->getDescription() + "'!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -687,32 +687,13 @@ ParseGlobalVariable(char *NameStr,GlobalValue::LinkageTypes Linkage,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If this global has a name, check to see if there is already a definition
|
// If this global has a name, check to see if there is already a definition
|
||||||
// of this global in the module. If so, merge as appropriate. Note that
|
// of this global in the module. If so, it is an error.
|
||||||
// this is really just a hack around problems in the CFE. :(
|
|
||||||
if (!Name.empty()) {
|
if (!Name.empty()) {
|
||||||
// We are a simple redefinition of a value, check to see if it is defined
|
// We are a simple redefinition of a value, check to see if it is defined
|
||||||
// the same as the old one.
|
// the same as the old one.
|
||||||
if (GlobalVariable *EGV =
|
if (CurModule.CurrentModule->getGlobalVariable(Name, Ty)) {
|
||||||
CurModule.CurrentModule->getGlobalVariable(Name, Ty)) {
|
|
||||||
// We are allowed to redefine a global variable in two circumstances:
|
|
||||||
// 1. If at least one of the globals is uninitialized or
|
|
||||||
// 2. If both initializers have the same value.
|
|
||||||
//
|
|
||||||
if (!EGV->hasInitializer() || !Initializer ||
|
|
||||||
EGV->getInitializer() == Initializer) {
|
|
||||||
|
|
||||||
// Make sure the existing global version gets the initializer! Make
|
|
||||||
// sure that it also gets marked const if the new version is.
|
|
||||||
if (Initializer && !EGV->hasInitializer())
|
|
||||||
EGV->setInitializer(Initializer);
|
|
||||||
if (isConstantGlobal)
|
|
||||||
EGV->setConstant(true);
|
|
||||||
EGV->setLinkage(Linkage);
|
|
||||||
return EGV;
|
|
||||||
}
|
|
||||||
|
|
||||||
GenerateError("Redefinition of global variable named '" + Name +
|
GenerateError("Redefinition of global variable named '" + Name +
|
||||||
"' in the '" + Ty->getDescription() + "' type plane!");
|
"' of type '" + Ty->getDescription() + "'!");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -767,8 +748,8 @@ static bool setTypeName(const Type *T, char *NameStr) {
|
|||||||
if (Existing == T) return true; // Yes, it's equal.
|
if (Existing == T) return true; // Yes, it's equal.
|
||||||
|
|
||||||
// Any other kind of (non-equivalent) redefinition is an error.
|
// Any other kind of (non-equivalent) redefinition is an error.
|
||||||
GenerateError("Redefinition of type named '" + Name + "' in the '" +
|
GenerateError("Redefinition of type named '" + Name + "' of type '" +
|
||||||
T->getDescription() + "' type plane!");
|
T->getDescription() + "'!");
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user