brintos

brintos / llvm-project-archived public Read only

0
0
Text · 714 B · c7749be Raw
30 lines · cpp
1// RUN: %clang_cc1 -emit-llvm %s -o -  | FileCheck %s2 3namespace Common {4enum RenderMode {5  kRenderEGA,6  kRenderCGA7};8class C;9class A {10  A();11  C *_vm;12  unsigned char _highlightColorTableVGA[];13  static const unsigned char b[];14};15// CHECK: [[Common_A_b:@[^ ]+]] = {{(dso_local )?}}constant [1 x i8] zeroinitializer16class B {17public:18  Common::RenderMode _configRenderMode;19};20class C : public B {};21A::A() {22  0 == Common::kRenderCGA || _vm->_configRenderMode == Common::kRenderEGA23      ? b24      : _highlightColorTableVGA;25// Make sure the PHI value is casted correctly to the PHI type26// CHECK: %{{.*}} = phi ptr [ [[Common_A_b]], %{{.*}} ], [ %{{.*}}, %{{.*}} ]27}28const unsigned char A::b[] = { 0 };29}30