[PATCH] D49148: [DEBUGINFO] Disable unsupported debug info options for NVPTX target.
Alexey Bataev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 26 13:30:22 PDT 2018
ABataev marked an inline comment as done.
ABataev added inline comments.
================
Comment at: lib/Driver/ToolChains/Clang.cpp:933-938
+ if (TC.supportsDebugInfoOption(A)) {
+ Action();
+ return true;
+ }
+ reportUnsupportedDebugInfoOption(A, Args, D, TC.getTriple());
+ return false;
----------------
echristo wrote:
> I'd probably simplify this as:
>
> ```
> if (TC.supportsDebugInfoOption(A))
> return true;
> reportUnsupportedDebugInfoOption(A, Args, D, TC.getTriple());
> return false;
> ```
>
> And just leave the action part in the rest of the code. I think that means you could also leave the bool off.
>
> As another optimization here you could, instead, just check all of the arguments ahead of time by getting the full list of debug info and just checking them all. That's probably not worth it though TBH.
>
Done, but I need boolean result in most cases.
Repository:
rC Clang
https://reviews.llvm.org/D49148
More information about the cfe-commits
mailing list