[PATCH] D66431: [PDB] Fix bug when using multiple PCH header objects with the same name.
Zachary Turner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 19 15:31:41 PDT 2019
zturner marked 2 inline comments as done.
zturner added a comment.
I know it's super lame to request this, but would one of you mind submitting on my behalf? I don't have SVN installed and it seems like `git llvm push` still requires it (unless there is a more modern workflow that doesn't require SVN anymore). If I find myself submitting more and more patches then I'll bite the bullet.
================
Comment at: lld/COFF/PDB.cpp:511
+ SmallString<128> path1_norm = sys::path::convert_to_slash(path1);
+ SmallString<128> path2_norm = sys::path::convert_to_slash(path2);
#if defined(_WIN32)
----------------
aganea wrote:
> These two lines do not compile on my PC. I had to change to: `SmallString<128> path1_norm{StringRef(sys::path::convert_to_slash(path1))};`
Actually I'll just make them std::string instead of SmallString. That's what convert_to_slash returns anyway.
================
Comment at: lld/test/COFF/precomp-link-samename.test:1
+RUN: lld-link %S/Inputs/precompb/useprecomp.obj %S/Inputs/precompa/precomp.obj %S/Inputs/precompb/precomp.obj \
+RUN: %S/Inputs/precompa/useprecomp.obj /nodefaultlib /entry:main /debug /pdb:%t.pdb /out:%t.exe \
----------------
Note the order of object files here. It's important.
b/useprecomp -> a/precomp.
This means that when searching the list of input files for b/useprecomp, it will find a/precomp first, and since the filename 'precomp.obj' matches, the existing code would have found it, whereas the new code actually checks matches against `precompa/precomp.obj` , which won't match.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66431/new/
https://reviews.llvm.org/D66431
More information about the llvm-commits
mailing list