mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +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:
@@ -36,6 +36,7 @@ class InlineAsm;
|
||||
class Instruction;
|
||||
class LLVMContext;
|
||||
class MDNode;
|
||||
class Module;
|
||||
class StringRef;
|
||||
class Twine;
|
||||
class Type;
|
||||
@@ -106,6 +107,13 @@ public:
|
||||
///
|
||||
void print(raw_ostream &O, AssemblyAnnotationWriter *AAW = 0) const;
|
||||
|
||||
/// \brief Print the name of this Value out to the specified raw_ostream.
|
||||
/// This is useful when you just want to print 'int %reg126', not the
|
||||
/// instruction that generated it. If you specify a Module for context, then
|
||||
/// even constanst get pretty-printed; for example, the type of a null
|
||||
/// pointer is printed symbolically.
|
||||
void printAsOperand(raw_ostream &O, bool PrintType = true, const Module *M = 0) const;
|
||||
|
||||
/// All values are typed, get the type of this value.
|
||||
///
|
||||
Type *getType() const { return VTy; }
|
||||
|
Reference in New Issue
Block a user