mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-25 00:24:26 +00:00
Implement the "thread_local" keyword.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35950 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -477,7 +477,7 @@ static bool LinkGlobals(Module *Dest, Module *Src,
|
||||
GlobalVariable *NewDGV =
|
||||
new GlobalVariable(SGV->getType()->getElementType(),
|
||||
SGV->isConstant(), SGV->getLinkage(), /*init*/0,
|
||||
SGV->getName(), Dest);
|
||||
SGV->getName(), Dest, SGV->isThreadLocal());
|
||||
// Propagate alignment, visibility and section info.
|
||||
CopyGVAttributes(NewDGV, SGV);
|
||||
|
||||
@ -500,7 +500,7 @@ static bool LinkGlobals(Module *Dest, Module *Src,
|
||||
GlobalVariable *NewDGV =
|
||||
new GlobalVariable(SGV->getType()->getElementType(),
|
||||
SGV->isConstant(), SGV->getLinkage(), /*init*/0,
|
||||
"", Dest);
|
||||
"", Dest, SGV->isThreadLocal());
|
||||
|
||||
// Propagate alignment, section and visibility info.
|
||||
NewDGV->setAlignment(DGV->getAlignment());
|
||||
@ -522,6 +522,7 @@ static bool LinkGlobals(Module *Dest, Module *Src,
|
||||
GlobalVariable *NewDGV =
|
||||
new GlobalVariable(SGV->getType()->getElementType(),
|
||||
DGV->isConstant(), DGV->getLinkage());
|
||||
NewDGV->setThreadLocal(DGV->isThreadLocal());
|
||||
CopyGVAttributes(NewDGV, DGV);
|
||||
Dest->getGlobalList().insert(DGV, NewDGV);
|
||||
DGV->replaceAllUsesWith(
|
||||
@ -821,7 +822,7 @@ static bool LinkAppendingVars(Module *M,
|
||||
// Create the new global variable...
|
||||
GlobalVariable *NG =
|
||||
new GlobalVariable(NewType, G1->isConstant(), G1->getLinkage(),
|
||||
/*init*/0, First->first, M);
|
||||
/*init*/0, First->first, M, G1->isThreadLocal());
|
||||
|
||||
// Merge the initializer...
|
||||
Inits.reserve(NewSize);
|
||||
|
Reference in New Issue
Block a user