[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
diff --git a/llvm/include/llvm-c/Core.h b/llvm/include/llvm-c/Core.h
index 57834c5..caadab1 100644
--- a/llvm/include/llvm-c/Core.h
+++ b/llvm/include/llvm-c/Core.h
@@ -541,6 +541,14 @@
                                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()