Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGenCXX / virtual-base-ctor.cpp
blob0c10e2087f63ff26cd72de358a817ec18cbcba52
1 // RUN: %clang_cc1 %s -emit-llvm -triple %itanium_abi_triple -o - -O2 | opt - -S -passes=globalopt -o - | FileCheck %s
3 struct B;
4 extern B x;
5 char y;
6 typedef __typeof(sizeof(int)) size_t;
7 struct A { int a; A() { y = ((size_t)this - (size_t)&x) / sizeof(void*); } };
8 struct B : virtual A { void* x; };
9 B x;
11 // CHECK: @y = {{(dso_local )?}}local_unnamed_addr global i8 2