[PATCH] D53021: lld-link: Use /pdbsourcepath: for more places when present.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 9 07:05:39 PDT 2018


ruiu added inline comments.


================
Comment at: COFF/PDB.cpp:87
 
+void pdb_make_absolute(SmallVectorImpl<char> &FileName) {
+  if (Config->PDBSourcePath.empty()) {
----------------
pdbMakeAbsolute

Add `static`?


================
Comment at: COFF/PDB.cpp:88
+void pdb_make_absolute(SmallVectorImpl<char> &FileName) {
+  if (Config->PDBSourcePath.empty()) {
+    sys::fs::make_absolute(FileName);
----------------
You are checking if this variable is empty both in this function and before calling this function. Is that necessary?


================
Comment at: COFF/PDB.cpp:92
+  }
+  if (!sys::path::is_absolute(FileName)) {
+    SmallString<128> AbsoluteFileName = Config->PDBSourcePath;
----------------
I'd flip the condition and return early.


https://reviews.llvm.org/D53021





More information about the llvm-commits mailing list