mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +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:
@@ -20,7 +20,6 @@
|
||||
#include "llvm/DebugInfo.h"
|
||||
#include "llvm/IR/Function.h"
|
||||
#include "llvm/IR/Intrinsics.h"
|
||||
#include "llvm/IR/Writer.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Support/GraphWriter.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
@@ -385,7 +384,7 @@ void SDNode::print_details(raw_ostream &OS, const SelectionDAG *G) const {
|
||||
dyn_cast<GlobalAddressSDNode>(this)) {
|
||||
int64_t offset = GADN->getOffset();
|
||||
OS << '<';
|
||||
WriteAsOperand(OS, GADN->getGlobal());
|
||||
GADN->getGlobal()->printAsOperand(OS);
|
||||
OS << '>';
|
||||
if (offset > 0)
|
||||
OS << " + " << offset;
|
||||
@@ -476,9 +475,9 @@ void SDNode::print_details(raw_ostream &OS, const SelectionDAG *G) const {
|
||||
dyn_cast<BlockAddressSDNode>(this)) {
|
||||
int64_t offset = BA->getOffset();
|
||||
OS << "<";
|
||||
WriteAsOperand(OS, BA->getBlockAddress()->getFunction(), false);
|
||||
BA->getBlockAddress()->getFunction()->printAsOperand(OS, false);
|
||||
OS << ", ";
|
||||
WriteAsOperand(OS, BA->getBlockAddress()->getBasicBlock(), false);
|
||||
BA->getBlockAddress()->getBasicBlock()->printAsOperand(OS, false);
|
||||
OS << ">";
|
||||
if (offset > 0)
|
||||
OS << " + " << offset;
|
||||
|
Reference in New Issue
Block a user