mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +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:
@@ -130,14 +130,15 @@ public:
|
||||
getTTypeReference(const MCSymbolRefExpr *Sym, unsigned Encoding,
|
||||
MCStreamer &Streamer) const;
|
||||
|
||||
virtual const MCSection *
|
||||
getStaticCtorSection(unsigned Priority = 65535) const {
|
||||
(void)Priority;
|
||||
virtual const MCSection *getStaticCtorSection(unsigned Priority,
|
||||
const MCSymbol *KeySym,
|
||||
const MCSection *KeySec) const {
|
||||
return StaticCtorSection;
|
||||
}
|
||||
virtual const MCSection *
|
||||
getStaticDtorSection(unsigned Priority = 65535) const {
|
||||
(void)Priority;
|
||||
|
||||
virtual const MCSection *getStaticDtorSection(unsigned Priority,
|
||||
const MCSymbol *KeySym,
|
||||
const MCSection *KeySec) const {
|
||||
return StaticDtorSection;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user