1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/test/Transforms/GlobalOpt/deaddeclaration.ll
Mehdi Amini c1f737b153 [GlobalOpt] Dead Eliminate declarations
GlobalOpt is already dead-code-eliminating global definitions. With
this change it also takes care of declarations.
Hopefully this should make it now a strict superset of GlobalDCE.
This is important for LTO/ThinLTO as we don't want the linker to see
"undefined reference" when it processes the input files: it could
prevent proper internalization (or even load an extra file from a
static archive, changing the behavior of the program!).

llvm-svn: 281653
2016-09-15 20:26:27 +00:00

8 lines
123 B
LLVM

; RUN: opt < %s -globalopt -S | FileCheck %s
; CHECK-NOT: aa
; CHECK-NOT: bb
declare void @aa()
@bb = external global i8