From 1f316e321a8f2fa0e193c5444584a67a8aabe9a8 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Tue, 14 Jul 2009 16:25:11 +0000 Subject: Revert r7561{9,8,7,6}, which depend on r75610. --- Reverse-merging r75619 into '.': U lib/Target/DarwinTargetAsmInfo.cpp U lib/CodeGen/AsmPrinter/AsmPrinter.cpp --- Reverse-merging r75618 into '.': U lib/CodeGen/ELFWriter.cpp U lib/CodeGen/MachOCodeEmitter.cpp U lib/CodeGen/MachOWriter.cpp --- Reverse-merging r75617 into '.': U lib/Target/CBackend/CBackend.cpp --- Reverse-merging r75616 into '.': U tools/bugpoint/Miscompilation.cpp U tools/lto/LTOCodeGenerator.cpp U tools/lto/LTOModule.cpp git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75638 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/CBackend/CBackend.cpp | 2 +- lib/Target/DarwinTargetAsmInfo.cpp | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) (limited to 'lib/Target') diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp index 38ce218..c3c2b0e 100644 --- a/lib/Target/CBackend/CBackend.cpp +++ b/lib/Target/CBackend/CBackend.cpp @@ -1432,7 +1432,7 @@ void CWriter::printConstantWithCast(Constant* CPV, unsigned Opcode) { std::string CWriter::GetValueName(const Value *Operand) { // Mangle globals with the standard mangler interface for LLC compatibility. if (const GlobalValue *GV = dyn_cast(Operand)) - return Mang->getMangledName(GV); + return Mang->getValueName(GV); std::string Name = Operand->getName(); diff --git a/lib/Target/DarwinTargetAsmInfo.cpp b/lib/Target/DarwinTargetAsmInfo.cpp index d331467..6094976 100644 --- a/lib/Target/DarwinTargetAsmInfo.cpp +++ b/lib/Target/DarwinTargetAsmInfo.cpp @@ -103,21 +103,18 @@ DarwinTargetAsmInfo::DarwinTargetAsmInfo(const TargetMachine &TM) /// emitUsedDirectiveFor - On Darwin, internally linked data beginning with /// the PrivateGlobalPrefix or the LessPrivateGlobalPrefix does not have the /// directive emitted (this occurs in ObjC metadata). + bool DarwinTargetAsmInfo::emitUsedDirectiveFor(const GlobalValue* GV, Mangler *Mang) const { if (GV==0) return false; - - /// FIXME: WHAT IS THIS? - if (GV->hasLocalLinkage() && !isa(GV) && ((strlen(getPrivateGlobalPrefix()) != 0 && - Mang->getMangledName(GV).substr(0,strlen(getPrivateGlobalPrefix())) == + Mang->getValueName(GV).substr(0,strlen(getPrivateGlobalPrefix())) == getPrivateGlobalPrefix()) || (strlen(getLessPrivateGlobalPrefix()) != 0 && - Mang->getMangledName(GV).substr(0, - strlen(getLessPrivateGlobalPrefix())) == + Mang->getValueName(GV).substr(0,strlen(getLessPrivateGlobalPrefix())) == getLessPrivateGlobalPrefix()))) return false; return true; -- cgit v1.1