summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorDavide Italiano <davide@freebsd.org>2016-08-08 03:30:01 +0000
committerDavide Italiano <davide@freebsd.org>2016-08-08 03:30:01 +0000
commit151e5be5ea050b10a926a09a39669d402b8c556e (patch)
tree2705d7304bd5508b7e7a8667115c946af1540ab3 /llvm
parente3b916d1649de6689034aa1dcf9ceaeba4db72dc (diff)
downloadbcm5719-llvm-151e5be5ea050b10a926a09a39669d402b8c556e.tar.gz
bcm5719-llvm-151e5be5ea050b10a926a09a39669d402b8c556e.zip
[MC] Delete use of *structors_used.
Jim Grosbach and Kevin Enderby think those are not used anymore. Originally submitted by: Rafael Espindola llvm-svn: 277973
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/MC/MCAsmInfo.h9
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp12
-rw-r--r--llvm/lib/MC/MCAsmInfo.cpp1
-rw-r--r--llvm/lib/MC/MCAsmInfoDarwin.cpp1
4 files changed, 0 insertions, 23 deletions
diff --git a/llvm/include/llvm/MC/MCAsmInfo.h b/llvm/include/llvm/MC/MCAsmInfo.h
index a493e82ad6b..4ae21bf28cb 100644
--- a/llvm/include/llvm/MC/MCAsmInfo.h
+++ b/llvm/include/llvm/MC/MCAsmInfo.h
@@ -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; }
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index c5f415cb529..05bf1cb192e 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -1536,12 +1536,6 @@ bool AsmPrinter::EmitSpecialLLVMGlobal(const GlobalVariable *GV) {
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(const GlobalVariable *GV) {
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;
}
diff --git a/llvm/lib/MC/MCAsmInfo.cpp b/llvm/lib/MC/MCAsmInfo.cpp
index 4a05175fdec..3eb8f50de5a 100644
--- a/llvm/lib/MC/MCAsmInfo.cpp
+++ b/llvm/lib/MC/MCAsmInfo.cpp
@@ -31,7 +31,6 @@ MCAsmInfo::MCAsmInfo() {
HasSubsectionsViaSymbols = false;
HasMachoZeroFillDirective = false;
HasMachoTBSSDirective = false;
- HasStaticCtorDtorReferenceInStaticMode = false;
MaxInstLength = 4;
MinInstAlignment = 1;
DollarIsPC = false;
diff --git a/llvm/lib/MC/MCAsmInfoDarwin.cpp b/llvm/lib/MC/MCAsmInfoDarwin.cpp
index fc60313dd6b..e95cf488cd3 100644
--- a/llvm/lib/MC/MCAsmInfoDarwin.cpp
+++ b/llvm/lib/MC/MCAsmInfoDarwin.cpp
@@ -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;
OpenPOWER on IntegriCloud