[lld] r339326 - [LLD][ELF] - Add a test case for parsing -defsym.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 9 03:40:11 PDT 2018


Author: grimar
Date: Thu Aug  9 03:40:11 2018
New Revision: 339326

URL: http://llvm.org/viewvc/llvm-project?rev=339326&view=rev
Log:
[LLD][ELF] - Add a test case for parsing -defsym.

This adds a coverage for the following line of the code:
https://github.com/llvm-mirror/lld/blob/master/ELF/ScriptParser.cpp#L274

Modified:
    lld/trunk/test/ELF/defsym.s

Modified: lld/trunk/test/ELF/defsym.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/defsym.s?rev=339326&r1=339325&r2=339326&view=diff
==============================================================================
--- lld/trunk/test/ELF/defsym.s (original)
+++ lld/trunk/test/ELF/defsym.s Thu Aug  9 03:40:11 2018
@@ -68,8 +68,11 @@
 # EXPR-NEXT:   Section: Absolute
 # EXPR-NEXT: }
 
-# RUN: not ld.lld -o %t %t.o --defsym=foo2=und 2>&1 | FileCheck %s -check-prefix=ERR
-# ERR: error: -defsym:1: symbol not found: und
+# RUN: not ld.lld -o %t %t.o --defsym=foo2=und 2>&1 | FileCheck %s -check-prefix=ERR1
+# ERR1: error: -defsym:1: symbol not found: und
+
+# RUN: not ld.lld -o %t %t.o --defsym=xxx=yyy,zzz 2>&1 | FileCheck %s -check-prefix=ERR2
+# ERR2: -defsym:1: EOF expected, but got ,
 
 .globl foo1
  foo1 = 0x123




More information about the llvm-commits mailing list