[PATCH] D33373: [lld] Infer relocation model from module flags in relocatable LTO link

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 19 17:54:25 PDT 2017


ruiu added inline comments.


================
Comment at: ELF/LTO.cpp:76-79
+  if (Config->Relocatable)
+    Conf.RelocModel = None;
+  else
+    Conf.RelocModel = Config->Pic ? Reloc::PIC_ : Reloc::Static;
----------------
davide wrote:
> I'll leave the final decision to @ruiu, but I feel 
> ```
>  if ()
>    [...]
>  else if()
>    [...]
>   else()
> ```
> would be more readable in this case.
> Not strong about this  one either :)
I was about to say the same. :)


Repository:
  rL LLVM

https://reviews.llvm.org/D33373





More information about the llvm-commits mailing list