Skip to content

Commit

Permalink
[test] Fix tools/gold/X86/weak.ll after D94202
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
MaskRay committed Apr 26, 2021
1 parent 262a72f commit a41f076
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions llvm/test/tools/gold/X86/Inputs/weak.ll
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 2 additions & 1 deletion llvm/test/tools/gold/X86/weak.ll
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@
; 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
@b = global i32* @a

; 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{{$}}

0 comments on commit a41f076

Please sign in to comment.