[PATCH] Add PIC-level support to Clang.

Rafael Ávila de Espíndola rafael.espindola at gmail.com
Mon Nov 17 11:29:43 PST 2014


LGTM with a nit.

================
Comment at: lib/CodeGen/CodeGenModule.cpp:395
@@ +394,3 @@
+  uint32_t PLevel = Context.getLangOpts().PICLevel;
+  if (PLevel) {
+    llvm::PICLevel::Level PL = llvm::PICLevel::Default;
----------------
You can fold the variable declaration into the if:

if (uint32_t PLevel = Context.getLangOpts().PICLevel) {

http://reviews.llvm.org/D5400






More information about the llvm-commits mailing list