blob: cf22be0ee4254de21c882ce2c4f0ec04534224e9 [file] [log] [blame]
; Make sure that functions are removed successfully if they are referred to by
; a global that is dead. Make sure any globals they refer to die as well.
; RUN: llvm-as < %s | opt -globaldce | llvm-dis | not grep foo
%b = internal global int ()* %foo ;; Unused, kills %foo
%foo = internal global int 7 ;; Should die when function %foo is killed
implementation
internal int %foo() { ;; dies when %b dies.
%ret = load int* %foo
ret int %ret
}