blob: a710d272edc787d76667793b009a40adf7b2c158 [file] [log] [blame]
Rafael Espindolac2bb73f2013-07-20 23:33:15 +00001; RUN: opt < %s -globalopt -S | FileCheck %s
2
3; Test that when all members of llvm.compiler.used are found to be redundant
4; we delete it instead of crashing.
5
6define void @foo() {
7 ret void
8}
9
10@llvm.used = appending global [1 x i8*] [i8* bitcast (void ()* @foo to i8*)], section "llvm.metadata"
11
12@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (void ()* @foo to i8*)], section "llvm.metadata"
13
14; CHECK-NOT: @llvm.compiler.used
15; CHECK: @llvm.used = appending global [1 x i8*] [i8* bitcast (void ()* @foo to i8*)], section "llvm.metadata"
16; CHECK-NOT: @llvm.compiler.used