diff options
author | Chris Lattner <sabre@nondot.org> | 2009-02-28 22:34:45 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-02-28 22:34:45 +0000 |
commit | d8030a7179a0d301dd3fb4c42c65a8f01dfe398e (patch) | |
tree | dad743e12c3f089f1015216a718b12178d4346b2 /include/llvm/Assembly | |
parent | d3fc0a15c752c75b9c9a4d8842372d950d26a04f (diff) | |
download | external_llvm-d8030a7179a0d301dd3fb4c42c65a8f01dfe398e.zip external_llvm-d8030a7179a0d301dd3fb4c42c65a8f01dfe398e.tar.gz external_llvm-d8030a7179a0d301dd3fb4c42c65a8f01dfe398e.tar.bz2 |
expose TypePrinting as a public API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65729 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Assembly')
-rw-r--r-- | include/llvm/Assembly/Writer.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/llvm/Assembly/Writer.h b/include/llvm/Assembly/Writer.h index 8e79b27..343539a 100644 --- a/include/llvm/Assembly/Writer.h +++ b/include/llvm/Assembly/Writer.h @@ -25,6 +25,24 @@ class Type; class Module; class Value; class raw_ostream; +template <typename T> class SmallVectorImpl; + +/// TypePrinting - Type printing machinery. +class TypePrinting { + void *TypeNames; +public: + TypePrinting(const Module *M); + ~TypePrinting(); + + void clear(); + + void print(const Type *Ty, raw_ostream &OS); + void printAtLeastOneLevel(const Type *Ty, raw_ostream &OS); + +private: + void CalcTypeName(const Type *Ty, SmallVectorImpl<const Type *> &TypeStack, + raw_ostream &OS); +}; // WriteTypeSymbolic - This attempts to write the specified type as a symbolic // type, if there is an entry in the Module's symbol table for the specified |