[PATCH] D44921: [PowerPC] Option for secure plt mode

Nemanja Ivanovic via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 27 17:25:27 PDT 2018


nemanjai added a comment.

I'll let Justin give the actual ACK, but this looks fine to me. The only question that I have (since I don't know anything about secure PLT) is whether this is a PPC-specific thing (since the option is a PPC option).



================
Comment at: include/clang/Driver/Options.td:1941
 def mno_vsx : Flag<["-"], "mno-vsx">, Group<m_ppc_Features_Group>;
+def msecure_plt : Flag<["-"], "msecure-plt">, Group<m_ppc_Features_Group>;
 def mpower8_vector : Flag<["-"], "mpower8-vector">,
----------------
Do we not want the negated option?


================
Comment at: lib/Driver/ToolChains/Arch/PPC.cpp:116
+ppc::ReadGOTPtrMode ppc::getPPCReadGOTPtrMode(const Driver &D, const ArgList &Args) {
+  ppc::ReadGOTPtrMode ReadGOT = ppc::ReadGOTPtrMode::Bss;
+  if (Args.getLastArg(options::OPT_msecure_plt))
----------------
Just a style question out of curiosity. Why the temporary? Since there are just two possible values, why not just return the respective enumerator?


https://reviews.llvm.org/D44921





More information about the cfe-commits mailing list