[lld] r287739 - Better formatting.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 22 21:14:01 PST 2016


Author: ruiu
Date: Tue Nov 22 23:14:01 2016
New Revision: 287739

URL: http://llvm.org/viewvc/llvm-project?rev=287739&view=rev
Log:
Better formatting.

If a line is too long, its error message becomes hard to read.

Modified:
    lld/trunk/test/ELF/Inputs/verdef-defaultver.s
    lld/trunk/test/ELF/verdef-defaultver.s
    lld/trunk/test/ELF/verdef-dependency.s
    lld/trunk/test/ELF/verdef.s
    lld/trunk/test/ELF/version-script-extern.s

Modified: lld/trunk/test/ELF/Inputs/verdef-defaultver.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/Inputs/verdef-defaultver.s?rev=287739&r1=287738&r2=287739&view=diff
==============================================================================
--- lld/trunk/test/ELF/Inputs/verdef-defaultver.s (original)
+++ lld/trunk/test/ELF/Inputs/verdef-defaultver.s Tue Nov 22 23:14:01 2016
@@ -1,5 +1,5 @@
-b at LIBSAMPLE_1.0 = b_1
-b@@LIBSAMPLE_2.0 = b_2
+b at V1 = b_1
+b@@V2 = b_2
 
 .globl a
 .type  a, at function

Modified: lld/trunk/test/ELF/verdef-defaultver.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/verdef-defaultver.s?rev=287739&r1=287738&r2=287739&view=diff
==============================================================================
--- lld/trunk/test/ELF/verdef-defaultver.s (original)
+++ lld/trunk/test/ELF/verdef-defaultver.s Tue Nov 22 23:14:01 2016
@@ -1,12 +1,8 @@
 # REQUIRES: x86
 
 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/verdef-defaultver.s -o %t1
-# RUN: echo "LIBSAMPLE_1.0{               \
-# RUN:          global: a;                \
-# RUN:          local: *; };              \
-# RUN:       LIBSAMPLE_2.0{               \
-# RUN:          global: b; c;             \
-# RUN:       }LIBSAMPLE_1.0;" > %t.script
+# RUN: echo "V1 { global: a; local: *; };" > %t.script
+# RUN: echo "V2 { global: b; c; } V1;" >> %t.script
 # RUN: ld.lld -shared -soname shared %t1 --version-script %t.script -o %t.so
 # RUN: llvm-readobj -V -dyn-symbols %t.so | FileCheck --check-prefix=DSO %s
 
@@ -21,7 +17,7 @@
 # DSO-NEXT:      Section: Undefined
 # DSO-NEXT:    }
 # DSO-NEXT:    Symbol {
-# DSO-NEXT:      Name: a@@LIBSAMPLE_1.0
+# DSO-NEXT:      Name: a@@V1
 # DSO-NEXT:      Value: 0x1000
 # DSO-NEXT:      Size: 0
 # DSO-NEXT:      Binding: Global
@@ -30,7 +26,7 @@
 # DSO-NEXT:      Section: .text
 # DSO-NEXT:    }
 # DSO-NEXT:    Symbol {
-# DSO-NEXT:      Name: b@@LIBSAMPLE_2.0
+# DSO-NEXT:      Name: b@@V2
 # DSO-NEXT:      Value: 0x1002
 # DSO-NEXT:      Size: 0
 # DSO-NEXT:      Binding: Global
@@ -39,7 +35,7 @@
 # DSO-NEXT:      Section: .text
 # DSO-NEXT:    }
 # DSO-NEXT:    Symbol {
-# DSO-NEXT:      Name: b at LIBSAMPLE_1.0
+# DSO-NEXT:      Name: b at V1
 # DSO-NEXT:      Value: 0x1001
 # DSO-NEXT:      Size: 0
 # DSO-NEXT:      Binding: Global
@@ -48,7 +44,7 @@
 # DSO-NEXT:      Section: .text
 # DSO-NEXT:    }
 # DSO-NEXT:    Symbol {
-# DSO-NEXT:      Name: c@@LIBSAMPLE_2.0
+# DSO-NEXT:      Name: c@@V2
 # DSO-NEXT:      Value: 0x1003
 # DSO-NEXT:      Size: 0
 # DSO-NEXT:      Binding: Global
@@ -69,19 +65,19 @@
 # DSO-NEXT:      }
 # DSO-NEXT:      Symbol {
 # DSO-NEXT:        Version: 2
-# DSO-NEXT:        Name: a@@LIBSAMPLE_1.0
+# DSO-NEXT:        Name: a@@V1
 # DSO-NEXT:      }
 # DSO-NEXT:      Symbol {
 # DSO-NEXT:        Version: 3
-# DSO-NEXT:        Name: b@@LIBSAMPLE_2.0
+# DSO-NEXT:        Name: b@@V2
 # DSO-NEXT:      }
 # DSO-NEXT:      Symbol {
 # DSO-NEXT:        Version: 2
-# DSO-NEXT:        Name: b at LIBSAMPLE_1.0
+# DSO-NEXT:        Name: b at V1
 # DSO-NEXT:      }
 # DSO-NEXT:      Symbol {
 # DSO-NEXT:        Version: 3
-# DSO-NEXT:        Name: c@@LIBSAMPLE_2.0
+# DSO-NEXT:        Name: c@@V2
 # DSO-NEXT:      }
 # DSO-NEXT:    ]
 # DSO-NEXT:  }
@@ -97,15 +93,15 @@
 # DSO-NEXT:      Version: 1
 # DSO-NEXT:      Flags: 0x0
 # DSO-NEXT:      Index: 2
-# DSO-NEXT:      Hash: 98457184
-# DSO-NEXT:      Name: LIBSAMPLE_1.0
+# DSO-NEXT:      Hash: 1425
+# DSO-NEXT:      Name: V1
 # DSO-NEXT:    }
 # DSO-NEXT:    Definition {
 # DSO-NEXT:      Version: 1
 # DSO-NEXT:      Flags: 0x0
 # DSO-NEXT:      Index: 3
-# DSO-NEXT:      Hash: 98456416
-# DSO-NEXT:      Name: LIBSAMPLE_2.0
+# DSO-NEXT:      Hash: 1426
+# DSO-NEXT:      Name: V2
 # DSO-NEXT:    }
 # DSO-NEXT:  }
 
@@ -125,7 +121,7 @@
 # EXE-NEXT:      Section: Undefined
 # EXE-NEXT:    }
 # EXE-NEXT:    Symbol {
-# EXE-NEXT:      Name: a at LIBSAMPLE_1.0
+# EXE-NEXT:      Name: a at V1
 # EXE-NEXT:      Value: 0x11020
 # EXE-NEXT:      Size: 0
 # EXE-NEXT:      Binding: Global
@@ -134,7 +130,7 @@
 # EXE-NEXT:      Section: Undefined
 # EXE-NEXT:    }
 # EXE-NEXT:    Symbol {
-# EXE-NEXT:      Name: b at LIBSAMPLE_2.0
+# EXE-NEXT:      Name: b at V2
 # EXE-NEXT:      Value: 0x11030
 # EXE-NEXT:      Size: 0
 # EXE-NEXT:      Binding: Global
@@ -143,7 +139,7 @@
 # EXE-NEXT:      Section: Undefined
 # EXE-NEXT:    }
 # EXE-NEXT:    Symbol {
-# EXE-NEXT:      Name: c at LIBSAMPLE_2.0
+# EXE-NEXT:      Name: c at V2
 # EXE-NEXT:      Value: 0x11040
 # EXE-NEXT:      Size: 0
 # EXE-NEXT:      Binding: Global
@@ -164,15 +160,15 @@
 # EXE-NEXT:      }
 # EXE-NEXT:      Symbol {
 # EXE-NEXT:        Version: 2
-# EXE-NEXT:        Name: a at LIBSAMPLE_1.0
+# EXE-NEXT:        Name: a at V1
 # EXE-NEXT:      }
 # EXE-NEXT:      Symbol {
 # EXE-NEXT:        Version: 3
-# EXE-NEXT:        Name: b at LIBSAMPLE_2.0
+# EXE-NEXT:        Name: b at V2
 # EXE-NEXT:      }
 # EXE-NEXT:      Symbol {
 # EXE-NEXT:        Version: 3
-# EXE-NEXT:        Name: c at LIBSAMPLE_2.0
+# EXE-NEXT:        Name: c at V2
 # EXE-NEXT:      }
 # EXE-NEXT:    ]
 # EXE-NEXT:  }
@@ -184,16 +180,16 @@
 # EXE-NEXT:      Count: 2
 # EXE-NEXT:      FileName: shared
 # EXE-NEXT:      Entry {
-# EXE-NEXT:        Hash: 98457184
+# EXE-NEXT:        Hash: 1425
 # EXE-NEXT:        Flags: 0x0
 # EXE-NEXT:        Index: 2
-# EXE-NEXT:        Name: LIBSAMPLE_1.0
+# EXE-NEXT:        Name: V1
 # EXE-NEXT:      }
 # EXE-NEXT:      Entry {
-# EXE-NEXT:        Hash: 98456416
+# EXE-NEXT:        Hash: 1426
 # EXE-NEXT:        Flags: 0x0
 # EXE-NEXT:        Index: 3
-# EXE-NEXT:        Name: LIBSAMPLE_2.0
+# EXE-NEXT:        Name: V2
 # EXE-NEXT:      }
 # EXE-NEXT:    }
 # EXE-NEXT:  }

Modified: lld/trunk/test/ELF/verdef-dependency.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/verdef-dependency.s?rev=287739&r1=287738&r2=287739&view=diff
==============================================================================
--- lld/trunk/test/ELF/verdef-dependency.s (original)
+++ lld/trunk/test/ELF/verdef-dependency.s Tue Nov 22 23:14:01 2016
@@ -1,14 +1,8 @@
 # REQUIRES: x86
 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
-# RUN: echo "LIBSAMPLE_1.0{               \
-# RUN:          global: a;                \
-# RUN:          local: *; };              \
-# RUN:       LIBSAMPLE_2.0{               \
-# RUN:          global: b;                \
-# RUN:          local: *; }LIBSAMPLE_1.0; \
-# RUN:       LIBSAMPLE_3.0{               \
-# RUN:          global: c;                \
-# RUN:       }LIBSAMPLE_2.0;" > %t.script
+# RUN: echo "LIBSAMPLE_1.0 { global: a; local: *; };" > %t.script
+# RUN: echo "LIBSAMPLE_2.0 { global: b; local: *; } LIBSAMPLE_1.0;" >> %t.script
+# RUN: echo "LIBSAMPLE_3.0 { global: c; } LIBSAMPLE_2.0;" >> %t.script
 # RUN: ld.lld --version-script %t.script -shared -soname shared %t.o -o %t.so
 # RUN: llvm-readobj -V -dyn-symbols %t.so | FileCheck --check-prefix=DSO %s
 

Modified: lld/trunk/test/ELF/verdef.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/verdef.s?rev=287739&r1=287738&r2=287739&view=diff
==============================================================================
--- lld/trunk/test/ELF/verdef.s (original)
+++ lld/trunk/test/ELF/verdef.s Tue Nov 22 23:14:01 2016
@@ -1,14 +1,8 @@
 # REQUIRES: x86
 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
-# RUN: echo "LIBSAMPLE_1.0{  \
-# RUN:          global: a;   \
-# RUN:          local: *; }; \
-# RUN:       LIBSAMPLE_2.0{  \
-# RUN:          global: b;   \
-# RUN:          local: *; }; \
-# RUN:       LIBSAMPLE_3.0{  \
-# RUN:          global: c;   \
-# RUN:          local: *; };" > %t.script
+# RUN: echo "LIBSAMPLE_1.0 { global: a; local: *; };" > %t.script
+# RUN: echo "LIBSAMPLE_2.0 { global: b; local: *; };" >> %t.script
+# RUN: echo "LIBSAMPLE_3.0 { global: c; local: *; };" >> %t.script
 # RUN: ld.lld --version-script %t.script -shared -soname shared %t.o -o %t.so
 # RUN: llvm-readobj -V -dyn-symbols %t.so | FileCheck --check-prefix=DSO %s
 
@@ -101,11 +95,11 @@
 # MAIN-NEXT: SHT_GNU_verdef {
 # MAIN-NEXT: }
 
-# RUN: echo "VERSION { \
-# RUN:       LIBSAMPLE_1.0 { global: a; local: *; }; \
-# RUN:       LIBSAMPLE_2.0 { global: b; local: *; }; \
-# RUN:       LIBSAMPLE_3.0 { global: c; local: *; }; \
-# RUN:       }" > %t.script
+# RUN: echo "VERSION {" > %t.script
+# RUN: echo "LIBSAMPLE_1.0 { global: a; local: *; };" >> %t.script
+# RUN: echo "LIBSAMPLE_2.0 { global: b; local: *; };" >> %t.script
+# RUN: echo "LIBSAMPLE_3.0 { global: c; local: *; };" >> %t.script
+# RUN: echo "}" >> %t.script
 # RUN: ld.lld --script %t.script -shared -soname shared %t.o -o %t2.so
 # RUN: llvm-readobj -V -dyn-symbols %t2.so | FileCheck --check-prefix=DSO %s
 

Modified: lld/trunk/test/ELF/version-script-extern.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/version-script-extern.s?rev=287739&r1=287738&r2=287739&view=diff
==============================================================================
--- lld/trunk/test/ELF/version-script-extern.s (original)
+++ lld/trunk/test/ELF/version-script-extern.s Tue Nov 22 23:14:01 2016
@@ -1,20 +1,12 @@
 # REQUIRES: x86
 
 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
-# RUN: echo "LIBSAMPLE_1.0 { \
-# RUN:   global:             \
-# RUN:      extern \"C++\" { \
-# RUN:         \"foo(int)\"; \
-# RUN:         \"zed(int)\"; \
-# RUN:         \"abc::abc()\"; \
-# RUN:   };                  \
-# RUN: };                    \
-# RUN: LIBSAMPLE_2.0 {       \
-# RUN:   global:             \
-# RUN:     extern \"C++\" {  \
-# RUN:       \"bar(int)\";   \
-# RUN:   };                  \
-# RUN: }; " > %t.script
+# RUN: echo "LIBSAMPLE_1.0 { global:" > %t.script
+# RUN: echo '  extern "C++" { "foo(int)"; "zed(int)"; "abc::abc()"; };' >> %t.script
+# RUN: echo "};" >> %t.script
+# RUN: echo "LIBSAMPLE_2.0 { global:" >> %t.script
+# RUN: echo '  extern "C++" { "bar(int)"; };' >> %t.script
+# RUN: echo "};" >> %t.script
 # RUN: ld.lld --version-script %t.script -shared %t.o -o %t.so
 # RUN: llvm-readobj -V -dyn-symbols %t.so | FileCheck --check-prefix=DSO %s
 




More information about the llvm-commits mailing list