diff options
| author | Daniel Jasper <djasper@google.com> | 2014-02-19 12:26:01 +0000 |
|---|---|---|
| committer | Daniel Jasper <djasper@google.com> | 2014-02-19 12:26:01 +0000 |
| commit | 7e198ad862cddf373edcb51801a9800c4637d52e (patch) | |
| tree | 7a97a155d36e3ccc331ec56d3e18a7eefae5c408 /llvm/lib/CodeGen/TargetLoweringBase.cpp | |
| parent | d495642c5410f11345c03fcaa35fd346ad9ab207 (diff) | |
| download | bcm5719-llvm-7e198ad862cddf373edcb51801a9800c4637d52e.tar.gz bcm5719-llvm-7e198ad862cddf373edcb51801a9800c4637d52e.zip | |
Revert r201622 and r201608.
This causes the LLVMgold plugin to segfault. More information on the
replies to r201608.
llvm-svn: 201669
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringBase.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/TargetLoweringBase.cpp | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp index d3c42be5e6c..bdcb7216a56 100644 --- a/llvm/lib/CodeGen/TargetLoweringBase.cpp +++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp @@ -24,9 +24,7 @@ #include "llvm/IR/DataLayout.h" #include "llvm/IR/DerivedTypes.h" #include "llvm/IR/GlobalVariable.h" -#include "llvm/IR/Mangler.h" #include "llvm/MC/MCAsmInfo.h" -#include "llvm/MC/MCContext.h" #include "llvm/MC/MCExpr.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/ErrorHandling.h" @@ -1428,30 +1426,3 @@ bool TargetLoweringBase::isLegalAddressingMode(const AddrMode &AM, return true; } - -void TargetLoweringBase::getNameWithPrefix(SmallVectorImpl<char> &Name, - const GlobalValue *GV, - Mangler &Mang, - bool MayAlwaysUsePrivate) const { - if (MayAlwaysUsePrivate || !GV->hasPrivateLinkage()) { - // Simple case: If GV is not private, it is not important to find out if - // private labels are legal in this case or not. - Mang.getNameWithPrefix(Name, GV, false); - return; - } - SectionKind GVKind = - TargetLoweringObjectFile::getKindForGlobal(GV, getTargetMachine()); - const TargetLoweringObjectFile &TLOF = getObjFileLowering(); - const MCSection *TheSection = - TLOF.SectionForGlobal(GV, GVKind, Mang, getTargetMachine()); - bool CannotUsePrivateLabel = TLOF.isSectionAtomizableBySymbols(*TheSection); - Mang.getNameWithPrefix(Name, GV, CannotUsePrivateLabel); -} - -MCSymbol *TargetLoweringBase::getSymbol(const GlobalValue *GV, - Mangler &Mang) const { - SmallString<60> NameStr; - getNameWithPrefix(NameStr, GV, Mang); - const TargetLoweringObjectFile &TLOF = getObjFileLowering(); - return TLOF.getContext().GetOrCreateSymbol(NameStr.str()); -} |

