summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm-c
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
commit84355db7f9dc50cec5de4127d03fc40a84772f78 (patch)
tree723b9d895aeb7b36b39d26cf3c2e985a66865bd5 /llvm/include/llvm-c
parenta66582470b19616f9eba40efef020f4ad7bde11a (diff)
downloadbcm5719-llvm-84355db7f9dc50cec5de4127d03fc40a84772f78.tar.gz
bcm5719-llvm-84355db7f9dc50cec5de4127d03fc40a84772f78.zip
[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 llvm-svn: 192821
Diffstat (limited to 'llvm/include/llvm-c')
-rw-r--r--llvm/include/llvm-c/Core.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/include/llvm-c/Core.h b/llvm/include/llvm-c/Core.h
index 57834c52928..caadab1bac2 100644
--- a/llvm/include/llvm-c/Core.h
+++ b/llvm/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()
OpenPOWER on IntegriCloud