[lld] Support finding pdb files from outputpath (PR #94153)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 5 08:29:03 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
----------------
GkvJwa wrote:
> The point is that you should run the test without your fix, and make sure it fails first. Then it should suceed with your fix applied.
Oh, so how to run two different lld-links in the test code
https://github.com/llvm/llvm-project/pull/94153
More information about the llvm-commits
mailing list