blob: 1357be27aea07e5a5a2bafe3c329714319fba638 [file] [log] [blame]
Renato Goline7b3d5d2014-05-27 16:46:27 +00001// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
2
3namespace Common {
4enum RenderMode {
5 kRenderEGA,
6 kRenderCGA
7};
8class C;
9class A {
10 A();
11 C *_vm;
12 unsigned char _highlightColorTableVGA[];
13 static const unsigned char b[];
14};
15class B {
16public:
17 Common::RenderMode _configRenderMode;
18};
19class C : public B {};
20A::A() {
21 0 == Common::kRenderCGA || _vm->_configRenderMode == Common::kRenderEGA
22 ? b
23 : _highlightColorTableVGA;
24// Make sure the PHI value is casted correctly to the PHI type
Renato Golina627a102014-05-27 17:01:21 +000025// CHECK: %{{.*}} = phi [0 x i8]* [ bitcast ([1 x i8]* @_ZN6Common1A1bE to [0 x i8]*), %{{.*}} ], [ %{{.*}}, %{{.*}} ]
Renato Goline7b3d5d2014-05-27 16:46:27 +000026}
27const unsigned char A::b[] = { 0 };
28}