Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / asan / TestCases / Darwin / cstring_section.c
blobd72b0ba8a8bb3322edd2058cdfb1150b7a96ec85
1 // Test that AddressSanitizer moves constant strings into a separate section.
3 // RUN: %clang_asan -c -o %t %s
4 // RUN: llvm-objdump -s %t | FileCheck %s
6 // Check that "Hello.\n" is in __asan_cstring and not in __cstring.
7 // CHECK: Contents of section {{.*}}__asan_cstring:
8 // CHECK: 48656c6c {{.*}} Hello.
9 // CHECK: Contents of section {{.*}}__const:
10 // CHECK-NOT: 48656c6c {{.*}} Hello.
11 // CHECK: Contents of section {{.*}}__cstring:
12 // CHECK-NOT: 48656c6c {{.*}} Hello.
14 int main(int argc, char *argv[]) {
15 argv[0] = "Hello.\n";
16 return 0;