[PATCH] D42299: [ELF] Add test for interaction of --gc-sections and undefined references

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 22 02:51:59 PST 2018


jhenderson added inline comments.


================
Comment at: test/ELF/gc-sections-no-undef-error.s:7-8
+# gc-sections.
+# RUN: not ld.lld %t.o -o %t 2> %t.err
+# RUN: FileCheck %s --input-file %t.err
+# CHECK: error: undefined symbol: undefined
----------------
ruiu wrote:
> You can write this in one line.
> 
>   not ld.lld %t.o -o %t 2>&1 | FileCheck %s
Thanks Rui. I thought I'd read somewhere on the mailing lists advising against doing that for some reason, but I can't find it now, so I may be misremembering it.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D42299





More information about the llvm-commits mailing list