[PATCH] D87901: [Driver] Filter out <libdir>/gcc and <libdir>/gcc-cross if they do not exists

Manoj Gupta via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Sep 26 10:57:26 PDT 2020


manojgupta added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:1949
+      // Maybe filter out <libdir>/gcc and <libdir>/gcc-cross.
+      GCCDirExists = D.getVFS().exists(LibDir + "/gcc");
+      GCCCrossDirExists = D.getVFS().exists(LibDir + "/gcc-cross");
----------------
Since these are class fields, please initialize these to false in beginning of the function. Otherwise, it might be tempting to use them elsewhere where they may not be initialized.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87901



More information about the cfe-commits mailing list