fixes from review of first commit

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47695 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/lto2/lto.cpp b/tools/lto2/lto.cpp
index d6f1d98..f60f7b5 100644
--- a/tools/lto2/lto.cpp
+++ b/tools/lto2/lto.cpp
@@ -33,7 +33,7 @@
 }
 
 //
-// returns the last error string or NULL if last operation was sucessful
+// returns the last error string or NULL if last operation was successful
 //
 const char* lto_get_error_message()
 {
@@ -224,13 +224,14 @@
 
 
 //
-// generates code for all added modules into one object file
-// On sucess returns a pointer to a generated mach-o buffer and
-// length set to the buffer size.  Client must free() the buffer
-// when done.
-// On failure, returns NULL (check lto_get_error_message() for details)
+// Generates code for all added modules into one native object file.
+// On sucess returns a pointer to a generated mach-o/ELF buffer and
+// length set to the buffer size.  The buffer is owned by the 
+// lto_code_gen_t and will be freed when lto_codegen_dispose()
+// is called, or lto_codegen_compile() is called again.
+// On failure, returns NULL (check lto_get_error_message() for details).
 //
-extern void*
+extern const void*
 lto_codegen_compile(lto_code_gen_t cg, size_t* length)
 {
     return cg->compile(length, sLastErrorString);