[PATCH] D144190: [AIX][clang] Storage Locations for Constant Pointers
Hubert Tong via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 8 22:12:14 PST 2023
hubert.reinterpretcast added inline comments.
================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:5250
+ if (Args.hasArg(options::OPT_mroptr) || Args.hasArg(options::OPT_mno_roptr)) {
+ bool HasRoptr =
----------------
This only checks for `-m[no-]roptr` when the front-end is invoked. When the driver is used just for linking, we get no diagnostic at all for using these options on other platforms.
@MaskRay:
As Clang code owner for the Driver, are you concerned if platform-specific options are sometimes silently ignored on other platforms? Is there a better place for the diagnostic?
For info, in this case, the option would have effects on AIX at both compile-from-C/C++ time and at link time.
Also, should `-Wunused-command-line-argument` warnings be generated for cases where the option has no effect (e.g., `-emit-llvm` or `-fsyntax-only`)? I think `-flto` is a bit of an exception because it may be unfriendly to expect users to change other aspects of their compile invocations when adding `-flto`. At the same time, it can be argued instead that generating a `-Wunused-command-line-argument` warning for "back-end" options on `-flto` compiles helps the user realize that they need to provide the option on their link step.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144190/new/
https://reviews.llvm.org/D144190
More information about the cfe-commits
mailing list