[DAGCombiner] Add target hook function to decide folding (mul (add x, c1), c2)
[llvm-project.git] / llvm / test / MC / ELF / lto-discard.s
blob0ca728e3958e94d0cfb5dd5226e3892f19f03654
1 // Check that ".lto_discard" ignores symbol assignments and attribute changes
2 // for the specified symbols.
3 // RUN: llvm-mc -triple x86_64-pc-linux-gnu < %s | FileCheck %s
5 // Check that ".lto_discard" only accepts identifiers.
6 // RUN: not llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu --defsym ERR=1 %s 2>&1 |\
7 // RUN: FileCheck %s --check-prefix=ERR
9 // CHECK-NOT: .weak foo
10 // CHECK-NOT: foo:
11 // CHECK: .weak bar
12 // CHECK: bar:
13 // CHECK: .byte 2
15 .lto_discard foo
16 .weak foo
17 foo:
18 .byte 1
20 .lto_discard
21 .weak bar
22 bar:
23 .byte 2
26 .ifdef ERR
27 .text
28 # ERR: {{.*}}.s:[[#@LINE+1]]:14: error: expected identifier
29 .lto_discard 1
30 .endif