mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-10-25 03:03:31 +00:00
Add comdat key field to llvm.global_ctors and llvm.global_dtors
This allows us to put dynamic initializers for weak data into the same comdat group as the data being initialized. This is necessary for MSVC ABI compatibility. Once we have comdats for guard variables, we can use the combination to help GlobalOpt fire more often for weak data with guarded initialization on other platforms. Reviewers: nlewycky Differential Revision: http://reviews.llvm.org/D3499 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209015 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
1 parent
dedd6203ad
commit
1ce3088669
16 files changed
+289
-69
No files matched your search
@@ -1700,8 +1700,11 @@ error_code BitcodeReader::GlobalCleanup() {
|
||||
// Look for global variables which need to be renamed.
|
||||
for (Module::global_iterator
|
||||
GI = TheModule->global_begin(), GE = TheModule->global_end();
|
||||
GI != GE; ++GI)
|
||||
UpgradeGlobalVariable(GI);
|
||||
GI != GE;) {
|
||||
GlobalVariable *GV = GI++;
|
||||
UpgradeGlobalVariable(GV);
|
||||
}
|
||||
|
||||
// Force deallocation of memory for these vectors to favor the client that
|
||||
// want lazy deserialization.
|
||||
std::vector<std::pair<GlobalVariable*, unsigned> >().swap(GlobalInits);
|
||||
|
||||
Reference in new issue
Block a user