mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
Put the functionality for printing a value to a raw_ostream as an
operand into the Value interface just like the core print method is. That gives a more conistent organization to the IR printing interfaces -- they are all attached to the IR objects themselves. Also, update all the users. This removes the 'Writer.h' header which contained only a single function declaration. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198836 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -18,7 +18,6 @@
|
||||
#include "llvm/IR/Constants.h"
|
||||
#include "llvm/IR/Function.h"
|
||||
#include "llvm/IR/Instructions.h"
|
||||
#include "llvm/IR/Writer.h"
|
||||
#include "llvm/Support/CFG.h"
|
||||
#include "llvm/Support/GraphWriter.h"
|
||||
|
||||
@@ -40,7 +39,7 @@ struct DOTGraphTraits<const Function*> : public DefaultDOTGraphTraits {
|
||||
std::string Str;
|
||||
raw_string_ostream OS(Str);
|
||||
|
||||
WriteAsOperand(OS, Node, false);
|
||||
Node->printAsOperand(OS, false);
|
||||
return OS.str();
|
||||
}
|
||||
|
||||
@@ -51,7 +50,7 @@ struct DOTGraphTraits<const Function*> : public DefaultDOTGraphTraits {
|
||||
raw_string_ostream OS(Str);
|
||||
|
||||
if (Node->getName().empty()) {
|
||||
WriteAsOperand(OS, Node, false);
|
||||
Node->printAsOperand(OS, false);
|
||||
OS << ":";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user