[PATCH] Add PIC-level support to Clang.

Justin Hibbits jrh29 at alumni.cwru.edu
Mon Nov 17 15:23:10 PST 2014


Thanks for the review, Rafael!

================
Comment at: lib/CodeGen/CodeGenModule.cpp:395
@@ +394,3 @@
+  uint32_t PLevel = Context.getLangOpts().PICLevel;
+  if (PLevel) {
+    llvm::PICLevel::Level PL = llvm::PICLevel::Default;
----------------
rafael wrote:
> You can fold the variable declaration into the if:
> 
> if (uint32_t PLevel = Context.getLangOpts().PICLevel) {
That may be legal C++, but it makes me really uncomfortable, and makes it (trivially, I guess) less readable, I think.

http://reviews.llvm.org/D5400






More information about the llvm-commits mailing list