[PATCH] D18843: Always have clang pass -pie-level and -pic-level values to the code generator

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 6 16:34:55 PDT 2016


rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

lgtm

There are similar flags, like -O, which define preprocessor macros and get fed to the backend. In that case, we actually have duplicate LangOpts and CodeGenOpts. I don't think we need to do that in this case, though.


================
Comment at: lib/Frontend/CompilerInvocation.cpp:2139
@@ -2138,3 +2138,3 @@
   ParseHeaderSearchArgs(Res.getHeaderSearchOpts(), Args);
   if (DashX == IK_AST || DashX == IK_LLVM_IR) {
     // ObjCAAutoRefCount and Sanitize LangOpts are used to setup the
----------------
This code would probably be cleaner with a local variable `LanguageOptions &LangOpts = *Res.getLangOpts()`


http://reviews.llvm.org/D18843





More information about the cfe-commits mailing list