From 3d5126fbad17647088b7335cd5fea178407211e2 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Wed, 22 Jul 2009 21:33:09 +0000 Subject: Switch some clients to Value::getName(), and other getName() user simplification. - NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76789 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/ScheduleDAGPrinter.cpp | 4 ++-- lib/Target/PIC16/PIC16DebugInfo.cpp | 2 +- lib/Target/TargetAsmInfo.cpp | 26 +++++++++++++------------- lib/VMCore/Mangler.cpp | 2 +- 4 files changed, 17 insertions(+), 17 deletions(-) (limited to 'lib') diff --git a/lib/CodeGen/ScheduleDAGPrinter.cpp b/lib/CodeGen/ScheduleDAGPrinter.cpp index 5efd274eea..4514c77483 100644 --- a/lib/CodeGen/ScheduleDAGPrinter.cpp +++ b/lib/CodeGen/ScheduleDAGPrinter.cpp @@ -87,8 +87,8 @@ void ScheduleDAG::viewGraph() { #ifndef NDEBUG if (BB->getBasicBlock()) ViewGraph(this, "dag." + MF.getFunction()->getName(), false, - "Scheduling-Units Graph for " + MF.getFunction()->getName() + ':' + - BB->getBasicBlock()->getName()); + "Scheduling-Units Graph for " + MF.getFunction()->getName() + + ":" + BB->getBasicBlock()->getName()); else ViewGraph(this, "dag." + MF.getFunction()->getName(), false, "Scheduling-Units Graph for " + MF.getFunction()->getName()); diff --git a/lib/Target/PIC16/PIC16DebugInfo.cpp b/lib/Target/PIC16/PIC16DebugInfo.cpp index 56359b3ff0..bf635f086c 100644 --- a/lib/Target/PIC16/PIC16DebugInfo.cpp +++ b/lib/Target/PIC16/PIC16DebugInfo.cpp @@ -327,7 +327,7 @@ void PIC16DbgInfo::EmitCompositeTypeDecls(Module &M) { // Structures and union declaration's debug info has llvm.dbg.composite // in its name. // FIXME: Checking and relying on llvm.dbg.composite name is not a good idea. - if(I->getName().find("llvm.dbg.composite") != std::string::npos) { + if(I->getNameStr().find("llvm.dbg.composite") != std::string::npos) { GlobalVariable *GV = cast(I); DICompositeType CTy(GV); if (CTy.getTag() == dwarf::DW_TAG_union_type || diff --git a/lib/Target/TargetAsmInfo.cpp b/lib/Target/TargetAsmInfo.cpp index 0f770bd300..a2fe4185e9 100644 --- a/lib/Target/TargetAsmInfo.cpp +++ b/lib/Target/TargetAsmInfo.cpp @@ -349,33 +349,33 @@ TargetAsmInfo::UniqueSectionForGlobal(const GlobalValue* GV, SectionKind::Kind Kind) const { switch (Kind) { case SectionKind::Text: - return ".gnu.linkonce.t." + GV->getName(); + return ".gnu.linkonce.t." + GV->getNameStr(); case SectionKind::Data: - return ".gnu.linkonce.d." + GV->getName(); + return ".gnu.linkonce.d." + GV->getNameStr(); case SectionKind::DataRel: - return ".gnu.linkonce.d.rel" + GV->getName(); + return ".gnu.linkonce.d.rel" + GV->getNameStr(); case SectionKind::DataRelLocal: - return ".gnu.linkonce.d.rel.local" + GV->getName(); + return ".gnu.linkonce.d.rel.local" + GV->getNameStr(); case SectionKind::DataRelRO: - return ".gnu.linkonce.d.rel.ro" + GV->getName(); + return ".gnu.linkonce.d.rel.ro" + GV->getNameStr(); case SectionKind::DataRelROLocal: - return ".gnu.linkonce.d.rel.ro.local" + GV->getName(); + return ".gnu.linkonce.d.rel.ro.local" + GV->getNameStr(); case SectionKind::SmallData: - return ".gnu.linkonce.s." + GV->getName(); + return ".gnu.linkonce.s." + GV->getNameStr(); case SectionKind::BSS: - return ".gnu.linkonce.b." + GV->getName(); + return ".gnu.linkonce.b." + GV->getNameStr(); case SectionKind::SmallBSS: - return ".gnu.linkonce.sb." + GV->getName(); + return ".gnu.linkonce.sb." + GV->getNameStr(); case SectionKind::ROData: case SectionKind::RODataMergeConst: case SectionKind::RODataMergeStr: - return ".gnu.linkonce.r." + GV->getName(); + return ".gnu.linkonce.r." + GV->getNameStr(); case SectionKind::SmallROData: - return ".gnu.linkonce.s2." + GV->getName(); + return ".gnu.linkonce.s2." + GV->getNameStr(); case SectionKind::ThreadData: - return ".gnu.linkonce.td." + GV->getName(); + return ".gnu.linkonce.td." + GV->getNameStr(); case SectionKind::ThreadBSS: - return ".gnu.linkonce.tb." + GV->getName(); + return ".gnu.linkonce.tb." + GV->getNameStr(); default: llvm_unreachable("Unknown section kind"); } diff --git a/lib/VMCore/Mangler.cpp b/lib/VMCore/Mangler.cpp index 5c4672b7e5..44cf778266 100644 --- a/lib/VMCore/Mangler.cpp +++ b/lib/VMCore/Mangler.cpp @@ -146,7 +146,7 @@ std::string Mangler::getMangledName(const GlobalValue *GV, const char *Suffix, GV->hasLinkerPrivateLinkage() ? Mangler::LinkerPrivate : Mangler::Default; if (GV->hasName()) - return makeNameProper(GV->getName() + Suffix, PrefixTy); + return makeNameProper(GV->getNameStr() + Suffix, PrefixTy); // Get the ID for the global, assigning a new one if we haven't got one // already. -- cgit v1.2.3