Home | History | Annotate | Download | only in CodeGen
      1 // RUN: %clang_cc1 -fsanitize=address,init-order -emit-llvm -o - %s | FileCheck %s
      2 
      3 struct PODStruct {
      4   int x;
      5 };
      6 PODStruct s1;
      7 
      8 struct PODWithDtor {
      9   ~PODWithDtor() { }
     10   int x;
     11 };
     12 PODWithDtor s2;
     13 
     14 struct PODWithCtorAndDtor {
     15   PODWithCtorAndDtor() { }
     16   ~PODWithCtorAndDtor() { }
     17   int x;
     18 };
     19 PODWithCtorAndDtor 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
     25