mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-14 15:25:25 +00:00
Add a getName function to MachineFunction. Use it in places that previously did getFunction()->getName(). Remove includes of Function.h that are no longer needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162347 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -288,6 +288,11 @@ void MachineFunction::dump() const {
|
||||
print(dbgs());
|
||||
}
|
||||
|
||||
StringRef MachineFunction::getName() const {
|
||||
assert(getFunction() && "No function!");
|
||||
return getFunction()->getName();
|
||||
}
|
||||
|
||||
void MachineFunction::print(raw_ostream &OS, SlotIndexes *Indexes) const {
|
||||
OS << "# Machine code for function " << Fn->getName() << ": ";
|
||||
if (RegInfo) {
|
||||
@@ -344,7 +349,7 @@ namespace llvm {
|
||||
DOTGraphTraits (bool isSimple=false) : DefaultDOTGraphTraits(isSimple) {}
|
||||
|
||||
static std::string getGraphName(const MachineFunction *F) {
|
||||
return "CFG for '" + F->getFunction()->getName().str() + "' function";
|
||||
return "CFG for '" + F->getName().str() + "' function";
|
||||
}
|
||||
|
||||
std::string getNodeLabel(const MachineBasicBlock *Node,
|
||||
|
Reference in New Issue
Block a user