mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-06 10:38:54 +00:00
Always remove an alias when we rename the target.
Should fix the dragonegg build bots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183845 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d3f7766f23
commit
100fbdd06b
@ -3238,9 +3238,7 @@ bool GlobalOpt::OptimizeGlobalAliases(Module &M) {
|
|||||||
|
|
||||||
if (Used.compilerUsedErase(J))
|
if (Used.compilerUsedErase(J))
|
||||||
Used.compilerUsedInsert(Target);
|
Used.compilerUsedInsert(Target);
|
||||||
}
|
} else if (mayHaveOtherReferences(*J, Used))
|
||||||
|
|
||||||
if (mayHaveOtherReferences(*J, Used))
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Delete the alias.
|
// Delete the alias.
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
; RUN: opt < %s -globalopt -S | FileCheck %s
|
; We use a temporary file so that the test fails when opt crashes.
|
||||||
|
|
||||||
|
; RUN: opt < %s -globalopt -S > %t
|
||||||
|
; RUN: FileCheck %s < %t
|
||||||
|
|
||||||
@foo1 = alias void ()* @foo2
|
@foo1 = alias void ()* @foo2
|
||||||
; CHECK: @foo1 = alias void ()* @foo2
|
; CHECK: @foo1 = alias void ()* @foo2
|
||||||
@ -25,3 +28,11 @@ entry:
|
|||||||
|
|
||||||
ret void
|
ret void
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@foo3 = alias void ()* @bar3
|
||||||
|
; CHECK-NOT: bar3
|
||||||
|
|
||||||
|
define internal void @bar3() {
|
||||||
|
ret void
|
||||||
|
}
|
||||||
|
;CHECK: define void @foo3
|
||||||
|
Loading…
x
Reference in New Issue
Block a user