summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAnders Waldenborg <anders@0x63.nu>2013-10-16 18:00:54 +0000
committerAnders Waldenborg <anders@0x63.nu>2013-10-16 18:00:54 +0000
commit2906b519d1f47f1b269ed1be9c70f752b3dca928 (patch)
treebda283465c17ed6f3941e8a54c1b29a7b25f17c9 /include
parentfc1604ec7274e9b724ff9b2512c288a691167427 (diff)
downloadllvm-2906b519d1f47f1b269ed1be9c70f752b3dca928.tar.gz
llvm-2906b519d1f47f1b269ed1be9c70f752b3dca928.tar.bz2
llvm-2906b519d1f47f1b269ed1be9c70f752b3dca928.tar.xz
[llvm-c] Add LLVMPrintModuleToString.
Like LLVMDumpModule but returns the string (that needs to be freed with LLVMDisposeMessage) instead of printing it to stderr. Differential Revision: http://llvm-reviews.chandlerc.com/D1941 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192821 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm-c/Core.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm-c/Core.h b/include/llvm-c/Core.h
index 57834c5292..caadab1bac 100644
--- a/include/llvm-c/Core.h
+++ b/include/llvm-c/Core.h
@@ -541,6 +541,14 @@ LLVMBool LLVMPrintModuleToFile(LLVMModuleRef M, const char *Filename,
char **ErrorMessage);
/**
+ * Return a string representation of the module. Use
+ * LLVMDisposeMessage to free the string.
+ *
+ * @see Module::print()
+ */
+char *LLVMPrintModuleToString(LLVMModuleRef M);
+
+/**
* Set inline assembly for a module.
*
* @see Module::setModuleInlineAsm()