1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

Always remove an alias when we rename the target.

Should fix the dragonegg build bots.

llvm-svn: 183845
This commit is contained in:
Rafael Espindola 2013-06-12 16:45:47 +00:00
parent c3adf026a8
commit 38b04ade79
2 changed files with 13 additions and 4 deletions

View File

@ -3238,9 +3238,7 @@ bool GlobalOpt::OptimizeGlobalAliases(Module &M) {
if (Used.compilerUsedErase(J))
Used.compilerUsedInsert(Target);
}
if (mayHaveOtherReferences(*J, Used))
} else if (mayHaveOtherReferences(*J, Used))
continue;
// Delete the alias.

View File

@ -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
; CHECK: @foo1 = alias void ()* @foo2
@ -25,3 +28,11 @@ entry:
ret void
}
@foo3 = alias void ()* @bar3
; CHECK-NOT: bar3
define internal void @bar3() {
ret void
}
;CHECK: define void @foo3