print(*cerr.stream());
}
-void MachineFunction::print(std::ostream &OS,
- const PrefixPrinter &prefix) const {
- OS << "# Machine code for " << Fn->getName () << "():\n";
+void MachineFunction::print(std::ostream &OS) const {
+ OS << "# Machine code for " << Fn->getNameStr () << "():\n";
// Print Frame Information
FrameInfo->print(*this, OS);
OS << "\n";
}
- for (const_iterator BB = begin(); BB != end(); ++BB) {
- OS << prefix(*BB);
- BB->print(OS, prefix);
- }
+ for (const_iterator BB = begin(); BB != end(); ++BB)
+ BB->print(OS);
- OS << "\n# End machine code for " << Fn->getName () << "().\n\n";
+ OS << "\n# End machine code for " << Fn->getNameStr () << "().\n\n";
}
namespace llvm {
template<>
struct DOTGraphTraits<const MachineFunction*> : public DefaultDOTGraphTraits {
static std::string getGraphName(const MachineFunction *F) {
- return "CFG for '" + F->getFunction()->getName() + "' function";
+ return "CFG for '" + F->getFunction()->getNameStr() + "' function";
}
static std::string getNodeLabel(const MachineBasicBlock *Node,
bool ShortNames) {
if (ShortNames && Node->getBasicBlock() &&
!Node->getBasicBlock()->getName().empty())
- return Node->getBasicBlock()->getName() + ":";
+ return Node->getBasicBlock()->getNameStr() + ":";
std::ostringstream Out;
if (ShortNames) {
void MachineFunction::viewCFG() const
{
#ifndef NDEBUG
- ViewGraph(this, "mf" + getFunction()->getName());
+ ViewGraph(this, "mf" + getFunction()->getNameStr());
#else
cerr << "SelectionDAG::viewGraph is only available in debug builds on "
<< "systems with Graphviz or gv!\n";
void MachineFunction::viewCFGOnly() const
{
#ifndef NDEBUG
- ViewGraph(this, "mf" + getFunction()->getName(), true);
+ ViewGraph(this, "mf" + getFunction()->getNameStr(), true);
#else
cerr << "SelectionDAG::viewGraph is only available in debug builds on "
<< "systems with Graphviz or gv!\n";
const Type *MachineConstantPoolEntry::getType() const {
if (isMachineConstantPoolEntry())
- return Val.MachineCPVal->getType();
+ return Val.MachineCPVal->getType();
return Val.ConstVal->getType();
}
+
+unsigned MachineConstantPoolEntry::getRelocationInfo() const {
+ if (isMachineConstantPoolEntry())
+ return Val.MachineCPVal->getRelocationInfo();
+ return Val.ConstVal->getRelocationInfo();
+}
+
MachineConstantPool::~MachineConstantPool() {
for (unsigned i = 0, e = Constants.size(); i != e; ++i)
if (Constants[i].isMachineConstantPoolEntry())