diff options
author | Nick Kledzik <kledzik@apple.com> | 2008-02-27 22:25:36 +0000 |
---|---|---|
committer | Nick Kledzik <kledzik@apple.com> | 2008-02-27 22:25:36 +0000 |
commit | 91a6dcff327f11bb8ceaed28d4595a98eabdfd6a (patch) | |
tree | 767975d1792aee02feb19dc20a9a392d86c90960 /llvm/tools/lto2/lto.cpp | |
parent | 5f1db0a8de6c328ff90088fb6e0f552e4b1d2267 (diff) | |
download | bcm5719-llvm-91a6dcff327f11bb8ceaed28d4595a98eabdfd6a.tar.gz bcm5719-llvm-91a6dcff327f11bb8ceaed28d4595a98eabdfd6a.zip |
fixes from review of first commit
llvm-svn: 47695
Diffstat (limited to 'llvm/tools/lto2/lto.cpp')
-rw-r--r-- | llvm/tools/lto2/lto.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/llvm/tools/lto2/lto.cpp b/llvm/tools/lto2/lto.cpp index d6f1d98b168..f60f7b5ac09 100644 --- a/llvm/tools/lto2/lto.cpp +++ b/llvm/tools/lto2/lto.cpp @@ -33,7 +33,7 @@ extern const char* lto_get_version() } // -// 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 @@ bool lto_codegen_write_merged_modules(lto_code_gen_t cg, const char* path) // -// 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); |