summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-03-06 22:47:08 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-03-06 22:47:08 +0000
commit3b30cb41a9aebe315a9ddbb1f0109b1ebdf494a7 (patch)
tree940ac6a4918b3683c53f0b4b2d6810f4c5812ea0 /llvm/lib/CodeGen
parent123256a4aacf82902858de44ea1bf68d89a5aa63 (diff)
downloadbcm5719-llvm-3b30cb41a9aebe315a9ddbb1f0109b1ebdf494a7.tar.gz
bcm5719-llvm-3b30cb41a9aebe315a9ddbb1f0109b1ebdf494a7.zip
Remove shouldEmitUsedDirectiveFor.
Clang now uses llvm.compiler.used for these cases. llvm-svn: 203174
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp2
-rw-r--r--llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp18
2 files changed, 1 insertions, 19 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 40d6bde3722..cf5b944ee7d 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -1453,7 +1453,7 @@ void AsmPrinter::EmitLLVMUsedList(const ConstantArray *InitList) {
for (unsigned i = 0, e = InitList->getNumOperands(); i != e; ++i) {
const GlobalValue *GV =
dyn_cast<GlobalValue>(InitList->getOperand(i)->stripPointerCasts());
- if (GV && getObjFileLowering().shouldEmitUsedDirectiveFor(GV, *Mang, TM))
+ if (GV)
OutStreamer.EmitSymbolAttribute(getSymbol(GV), MCSA_NoDeadStrip);
}
}
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
index a4eb0ca7ffc..0473729de04 100644
--- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
@@ -641,24 +641,6 @@ TargetLoweringObjectFileMachO::getSectionForConstant(SectionKind Kind) const {
return ReadOnlySection; // .const
}
-/// This hook allows targets to selectively decide not to emit the UsedDirective
-/// for some symbols in llvm.used.
-// FIXME: REMOVE this (rdar://7071300)
-bool TargetLoweringObjectFileMachO::shouldEmitUsedDirectiveFor(
- const GlobalValue *GV, Mangler &Mang, TargetMachine &TM) const {
- // Check whether the mangled name has the "Private" or "LinkerPrivate" prefix.
- if (GV->hasLocalLinkage() && !isa<Function>(GV)) {
- // FIXME: ObjC metadata is currently emitted as internal symbols that have
- // \1L and \0l prefixes on them. Fix them to be Private/LinkerPrivate and
- // this horrible hack can go away.
- MCSymbol *Sym = TM.getSymbol(GV, Mang);
- if (Sym->getName()[0] == 'L' || Sym->getName()[0] == 'l')
- return false;
- }
-
- return true;
-}
-
const MCExpr *TargetLoweringObjectFileMachO::getTTypeGlobalReference(
const GlobalValue *GV, unsigned Encoding, Mangler &Mang,
const TargetMachine &TM, MachineModuleInfo *MMI,
OpenPOWER on IntegriCloud