[lld] Support finding pdb files from outputpath (PR #94153)
Alexandre Ganea via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 5 08:34:58 PDT 2024
================
@@ -0,0 +1,34 @@
+Replicate this scenario:
+
+$ cat a.c
+struct Foo { int x; };
+int g(struct Foo *p);
+int main() {
+ struct Foo f = {42};
+ return g(&f);
+}
+
+$ cat b.c
+struct Foo { int x; };
+int g(struct Foo *p) { return p->x; }
+
+$ cl -c a.c b.c -Zi -Fdts.pdb
+
+$ lld-link a.obj b.obj -debug -entry:main -nodefaultlib -out:t.exe
+
+RUN: rm -rf %t && mkdir -p %t && mkdir -p %t/lib && cd %t
+
+RUN: yaml2obj %S/Inputs/pdb-type-server-simple-a.yaml -o lib/a.obj
+RUN: yaml2obj %S/Inputs/pdb-type-server-simple-b.yaml -o lib/b.obj
+RUN: llvm-pdbutil yaml2pdb %S/Inputs/pdb-type-server-simple-ts.yaml -pdb ts.pdb
+
+RUN: lld-link lib/a.obj lib/b.obj -debug -entry:main -nodefaultlib -out:t.exe
----------------
aganea wrote:
What I mean you should revert your code changes from your local git branch, and only keep the test. Compil & run, the test should fail. Then unstash or reapply your code changes, compil & run, the test should now pass.
https://github.com/llvm/llvm-project/pull/94153
More information about the llvm-commits
mailing list