diff options
author | Anders Waldenborg <anders@0x63.nu> | 2013-10-16 18:00:54 +0000 |
---|---|---|
committer | Anders Waldenborg <anders@0x63.nu> | 2013-10-16 18:00:54 +0000 |
commit | 2906b519d1f47f1b269ed1be9c70f752b3dca928 (patch) | |
tree | bda283465c17ed6f3941e8a54c1b29a7b25f17c9 /include | |
parent | fc1604ec7274e9b724ff9b2512c288a691167427 (diff) | |
download | external_llvm-2906b519d1f47f1b269ed1be9c70f752b3dca928.zip external_llvm-2906b519d1f47f1b269ed1be9c70f752b3dca928.tar.gz external_llvm-2906b519d1f47f1b269ed1be9c70f752b3dca928.tar.bz2 |
[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.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm-c/Core.h b/include/llvm-c/Core.h index 57834c5..caadab1 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() |