summaryrefslogtreecommitdiff
path: root/include/llvm/IR/Value.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/IR/Value.h')
-rw-r--r--include/llvm/IR/Value.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/IR/Value.h b/include/llvm/IR/Value.h
index c6734695e4..858c6e3f4f 100644
--- a/include/llvm/IR/Value.h
+++ b/include/llvm/IR/Value.h
@@ -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; }