[PATCH] Add Position-independent Code model Module API.

Justin Hibbits jrh29 at alumni.cwru.edu
Tue Oct 21 11:01:10 PDT 2014


>>! In D5882#5, @rafael wrote:
> This should probably include a test showing what llvm-link does when merging these.

Thanks for the review.  I'm updating the patch now, to also fix bugs I found (such as an error being thrown if I specify the command line, as well as the module flag, even if I change it to ModFlagBehavior::Override)

================
Comment at: tools/llc/llc.cpp:290
@@ -289,1 +289,3 @@
 
+  mod->setPICLevel(PLLevel);
+
----------------
rafael wrote:
> Is it intentional that any pre-existing metadata is always discarded?
> 
The intent is to allow you to override the module flag with the command line (-pic-level=small/large).  So, really, this should have a check for if PLLevel != PICLevel::Default.

http://reviews.llvm.org/D5882






More information about the llvm-commits mailing list