[PATCH] D49148: [DEBUGINFO] Disable unsupported debug info options for NVPTX target.

Eric Christopher via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 25 13:40:44 PDT 2018


echristo 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;
----------------
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.
   


Repository:
  rC Clang

https://reviews.llvm.org/D49148





More information about the cfe-commits mailing list