[test] Fix tools/gold/X86/weak.ll after D94202
authorFangrui Song <i@maskray.me>
Mon, 26 Apr 2021 23:04:22 +0000 (16:04 -0700)
committerFangrui Song <i@maskray.me>
Mon, 26 Apr 2021 23:04:22 +0000 (16:04 -0700)
The order regressed after D94202: after `a b`, when adding `a c`, we may reorder
`a` to the right of `b`, causing the final order to be `b a c`.

llvm/test/tools/gold/X86/Inputs/weak.ll
llvm/test/tools/gold/X86/weak.ll

index 5209d34..8aba5b2 100644 (file)
@@ -1,3 +1,4 @@
+target triple = "x86_64-unknown-linux-gnu"
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 
 @a = weak global i32 41
index 384a0ab..340de10 100644 (file)
@@ -6,6 +6,7 @@
 ; RUN:    -shared %t.o %t2.o -o %t3.o
 ; RUN: llvm-dis %t3.o -o - | FileCheck %s
 
+target triple = "x86_64-unknown-linux-gnu"
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 
 @a = weak global i32 42
@@ -13,6 +14,6 @@ target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 
 ; Test that @b and @c end up pointing to the same variable.
 
-; CHECK: @a = weak global i32 42
 ; CHECK: @b = global i32* @a{{$}}
+; CHECK: @a = weak global i32 42
 ; CHECK: @c = global i32* @a{{$}}