[PATCH] D91559: Add sysroot/lib to library search path of baremetal toolchain.

Hafiz Abid Qadeer via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 18 03:38:33 PST 2020


abidh marked an inline comment as done.
abidh added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/BareMetal.cpp:39
+    llvm::sys::path::append(SysRoot, "lib");
+    getFilePaths().push_back(std::string(SysRoot.str()));
+  }
----------------
jroelofs wrote:
> Is the explicit `std::string` ctor call necessary here? Since `SmallString` has an `operator std::string() const`, I think this can just be:
> 
> ```
> getFilePaths().push_back(SysRoot);
> ```
That operator is explicit. Although I noticed that I did not need the str() call.


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

https://reviews.llvm.org/D91559



More information about the cfe-commits mailing list