mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-20 18:52:46 +00:00
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
This commit is contained in:
parent
70c9d17f27
commit
3d5126fbad
@ -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());
|
||||
|
@ -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 ||
|
||||
|
@ -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");
|
||||
}
|
||||
|
@ -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.
|
||||
|
@ -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));
|
||||
}
|
||||
|
@ -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).";
|
||||
|
Loading…
x
Reference in New Issue
Block a user