[llvm] r277973 - [MC] Delete use of *structors_used.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 7 20:30:02 PDT 2016
Author: davide
Date: Sun Aug 7 22:30:01 2016
New Revision: 277973
URL: http://llvm.org/viewvc/llvm-project?rev=277973&view=rev
Log:
[MC] Delete use of *structors_used.
Jim Grosbach and Kevin Enderby think those are not used anymore.
Originally submitted by: Rafael Espindola
Modified:
llvm/trunk/include/llvm/MC/MCAsmInfo.h
llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/trunk/lib/MC/MCAsmInfo.cpp
llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp
Modified: llvm/trunk/include/llvm/MC/MCAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCAsmInfo.h?rev=277973&r1=277972&r2=277973&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCAsmInfo.h (original)
+++ llvm/trunk/include/llvm/MC/MCAsmInfo.h Sun Aug 7 22:30:01 2016
@@ -85,12 +85,6 @@ protected:
/// directive for emitting thread local BSS Symbols. Default is false.
bool HasMachoTBSSDirective;
- /// True if the compiler should emit a ".reference .constructors_used" or
- /// ".reference .destructors_used" directive after the static ctor/dtor
- /// list. This directive is only emitted in Static relocation model. Default
- /// is false.
- bool HasStaticCtorDtorReferenceInStaticMode;
-
/// This is the maximum possible length of an instruction, which is needed to
/// compute the size of an inline asm. Defaults to 4.
unsigned MaxInstLength;
@@ -449,9 +443,6 @@ public:
bool hasMachoZeroFillDirective() const { return HasMachoZeroFillDirective; }
bool hasMachoTBSSDirective() const { return HasMachoTBSSDirective; }
- bool hasStaticCtorDtorReferenceInStaticMode() const {
- return HasStaticCtorDtorReferenceInStaticMode;
- }
unsigned getMaxInstLength() const { return MaxInstLength; }
unsigned getMinInstAlignment() const { return MinInstAlignment; }
bool getDollarIsPC() const { return DollarIsPC; }
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=277973&r1=277972&r2=277973&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Sun Aug 7 22:30:01 2016
@@ -1536,12 +1536,6 @@ bool AsmPrinter::EmitSpecialLLVMGlobal(c
EmitXXStructorList(GV->getParent()->getDataLayout(), GV->getInitializer(),
/* isCtor */ true);
- if (TM.getRelocationModel() == Reloc::Static &&
- MAI->hasStaticCtorDtorReferenceInStaticMode()) {
- StringRef Sym(".constructors_used");
- OutStreamer->EmitSymbolAttribute(OutContext.getOrCreateSymbol(Sym),
- MCSA_Reference);
- }
return true;
}
@@ -1549,12 +1543,6 @@ bool AsmPrinter::EmitSpecialLLVMGlobal(c
EmitXXStructorList(GV->getParent()->getDataLayout(), GV->getInitializer(),
/* isCtor */ false);
- if (TM.getRelocationModel() == Reloc::Static &&
- MAI->hasStaticCtorDtorReferenceInStaticMode()) {
- StringRef Sym(".destructors_used");
- OutStreamer->EmitSymbolAttribute(OutContext.getOrCreateSymbol(Sym),
- MCSA_Reference);
- }
return true;
}
Modified: llvm/trunk/lib/MC/MCAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmInfo.cpp?rev=277973&r1=277972&r2=277973&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCAsmInfo.cpp (original)
+++ llvm/trunk/lib/MC/MCAsmInfo.cpp Sun Aug 7 22:30:01 2016
@@ -31,7 +31,6 @@ MCAsmInfo::MCAsmInfo() {
HasSubsectionsViaSymbols = false;
HasMachoZeroFillDirective = false;
HasMachoTBSSDirective = false;
- HasStaticCtorDtorReferenceInStaticMode = false;
MaxInstLength = 4;
MinInstAlignment = 1;
DollarIsPC = false;
Modified: llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp?rev=277973&r1=277972&r2=277973&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp (original)
+++ llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp Sun Aug 7 22:30:01 2016
@@ -76,7 +76,6 @@ MCAsmInfoDarwin::MCAsmInfoDarwin() {
ZeroDirective = "\t.space\t"; // ".space N" emits N zeros.
HasMachoZeroFillDirective = true; // Uses .zerofill
HasMachoTBSSDirective = true; // Uses .tbss
- HasStaticCtorDtorReferenceInStaticMode = true;
// FIXME: Change this once MC is the system assembler.
HasAggressiveSymbolFolding = false;
More information about the llvm-commits
mailing list