summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-07-22 21:33:09 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-07-22 21:33:09 +0000
commit3d5126fbad17647088b7335cd5fea178407211e2 (patch)
tree1a52e36acfe1992a11e24ead88e23bcfdc74a439
parent70c9d17f27d1ef89ed80566aeb529f68d2ad9480 (diff)
downloadllvm-3d5126fbad17647088b7335cd5fea178407211e2.tar.gz
llvm-3d5126fbad17647088b7335cd5fea178407211e2.tar.bz2
llvm-3d5126fbad17647088b7335cd5fea178407211e2.tar.xz
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
-rw-r--r--lib/CodeGen/ScheduleDAGPrinter.cpp4
-rw-r--r--lib/Target/PIC16/PIC16DebugInfo.cpp2
-rw-r--r--lib/Target/TargetAsmInfo.cpp26
-rw-r--r--lib/VMCore/Mangler.cpp2
-rw-r--r--tools/lto/LTOCodeGenerator.cpp4
-rw-r--r--tools/opt/PrintSCC.cpp2
6 files changed, 20 insertions, 20 deletions
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<GlobalVariable >(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.
diff --git a/tools/lto/LTOCodeGenerator.cpp b/tools/lto/LTOCodeGenerator.cpp
index 9aca59cd6a..93689e3528 100644
--- a/tools/lto/LTOCodeGenerator.cpp
+++ b/tools/lto/LTOCodeGenerator.cpp
@@ -375,13 +375,13 @@ void LTOCodeGenerator::applyScopeRestrictions()
e = mergedModule->end(); f != e; ++f) {
if ( !f->isDeclaration()
&& _mustPreserveSymbols.count(mangler.getMangledName(f)) )
- mustPreserveList.push_back(::strdup(f->getName().c_str()));
+ mustPreserveList.push_back(::strdup(f->getNameStr().c_str()));
}
for (Module::global_iterator v = mergedModule->global_begin(),
e = mergedModule->global_end(); v != e; ++v) {
if ( !v->isDeclaration()
&& _mustPreserveSymbols.count(mangler.getMangledName(v)) )
- mustPreserveList.push_back(::strdup(v->getName().c_str()));
+ mustPreserveList.push_back(::strdup(v->getNameStr().c_str()));
}
passes.add(createInternalizePass(mustPreserveList));
}
diff --git a/tools/opt/PrintSCC.cpp b/tools/opt/PrintSCC.cpp
index 2d678ed0be..a0aa4e90e7 100644
--- a/tools/opt/PrintSCC.cpp
+++ b/tools/opt/PrintSCC.cpp
@@ -101,7 +101,7 @@ bool CallGraphSCC::runOnModule(Module &M) {
outs() << "\nSCC #" << ++sccNum << " : ";
for (std::vector<CallGraphNode*>::const_iterator I = nextSCC.begin(),
E = nextSCC.end(); I != E; ++I)
- outs() << ((*I)->getFunction() ? (*I)->getFunction()->getName()
+ outs() << ((*I)->getFunction() ? (*I)->getFunction()->getNameStr()
: std::string("Indirect CallGraph node")) << ", ";
if (nextSCC.size() == 1 && SCCI.hasLoop())
outs() << " (Has self-loop).";