aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Assembly
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-02-28 22:34:45 +0000
committerChris Lattner <sabre@nondot.org>2009-02-28 22:34:45 +0000
commit18f9efdd9ef6b529d054ce63f41be7fc33bee995 (patch)
treedad743e12c3f089f1015216a718b12178d4346b2 /include/llvm/Assembly
parentd6c628ed317f0eb39c4187fb8d137d5911a011de (diff)
downloadexternal_llvm-18f9efdd9ef6b529d054ce63f41be7fc33bee995.zip
external_llvm-18f9efdd9ef6b529d054ce63f41be7fc33bee995.tar.gz
external_llvm-18f9efdd9ef6b529d054ce63f41be7fc33bee995.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.h18
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