forked from OSchip/llvm-project
Remove alignment from ctors/dtors lists in an attempt to placate LTO.
llvm-svn: 287458
This commit is contained in:
parent
1cb63183af
commit
18081afc1d
|
@ -756,9 +756,15 @@ void CodeGenModule::EmitCtorList(CtorList &Fns, const char *GlobalName) {
|
|||
ctors.add(ctor.finish());
|
||||
}
|
||||
|
||||
(void) ctors.finishAndCreateGlobal(GlobalName, getPointerAlign(),
|
||||
/*constant*/ false,
|
||||
llvm::GlobalValue::AppendingLinkage);
|
||||
auto list =
|
||||
ctors.finishAndCreateGlobal(GlobalName, getPointerAlign(),
|
||||
/*constant*/ false,
|
||||
llvm::GlobalValue::AppendingLinkage);
|
||||
|
||||
// The LTO linker doesn't seem to like it when we set an alignment
|
||||
// on appending variables. Take it off as a workaround.
|
||||
list->setAlignment(0);
|
||||
|
||||
Fns.clear();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue