[llvm-commits] emit-llvm

Nick Lewycky nlewycky at google.com
Thu Jun 3 13:49:52 PDT 2010


 namespace options {
+  enum generate_bc { BC_NO, BC_ALSO, BC_ONLY};
   static bool generate_api_file = false;

Please fix the whitespace; you're missing a space after BC_ONLY before }

+    if (options::generate_bc_file == options::BC_ONLY)
+      exit(0);

Eww!! I assume there's no other way to implement this, or else you would've
done that instead.

Some day, we should teach gold to let a plugin generate the output. It could
be useful for things like ld -r on bitcode files, for example. Until then,
this will have to do.

Nick

On 3 June 2010 13:23, Rafael Espindola <espindola at google.com> wrote:

> With the attached patch we have:
>
> ld ... -o foo -plugin-opt=emit-llvm               produces foo only (a bc
> file).
> ld ... -o foo -plugin-opt=also-emit-llvm          produces foo.bc and foo.
> ld ... -o foo -plugin-opt=also-emit-llvm=bar.bc   produces bar.bc and foo.
>
> is it OK?
>
> Cheers,
> --
> Rafael Ávila de Espíndola
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20100603/496b6c8e/attachment.html>


More information about the llvm-commits mailing list