blob: 3e94620193f6e971033bc53e05ce13c3f8b3f940 [file] [log] [blame]
Alexey Samsonov50f9de52013-04-05 07:47:28 +00001// RUN: %clang_cc1 -fsanitize=address,init-order -emit-llvm -o - %s | FileCheck %s
2
3struct PODStruct {
4 int x;
5};
6PODStruct s1;
7
8struct PODWithDtor {
9 ~PODWithDtor() { }
10 int x;
11};
12PODWithDtor s2;
13
14struct PODWithCtorAndDtor {
15 PODWithCtorAndDtor() { }
16 ~PODWithCtorAndDtor() { }
17 int x;
18};
19PODWithCtorAndDtor s3;
20
21// Check that ASan init-order checking ignores structs with trivial default
22// constructor.
23// CHECK: !llvm.asan.dynamically_initialized_globals = !{[[GLOB:![0-9]+]]}
24// CHECK: [[GLOB]] = metadata !{%struct.PODWithCtorAndDtor