MaskRay added inline comments.

================
Comment at: clang/include/clang/Driver/Options.td:6320-6325
+def pic_level : Separate<["-"], "pic-level">,
+  HelpText<"Value for __PIC__">,
+  MarshallingInfoInt<LangOpts<"PICLevel">>;
+def pic_is_pie : Flag<["-"], "pic-is-pie">,
+  HelpText<"File is for a position independent executable">,
+  MarshallingInfoFlag<LangOpts<"PIE">>;
----------------
awarzynski wrote:
> awarzynski wrote:
> > These are code-gen options to me. While originally located under "Language 
> > Options", I think that it would make more sense to move them near "CodeGen 
> > Options" instead (e.g. near `mrelocation_model`). @MaskRay any thoughts?
> Turns out that in Clang these options are indeed [[ 
> https://github.com/llvm/llvm-project/blob/main/clang/include/clang/Basic/LangOptions.def#L199
>  | LangOptions ]]. That's a bit confusing to me, but oh well.
clang/lib/Frontend/InitPreprocessor.cpp defines `__PIC__`.. IIUC the file does 
not know CodeGenOptions, so LangOptions isn't a bad choice.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131533/new/

https://reviews.llvm.org/D131533

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to