Andy Kaylor 16dda4d3f4
[CIR] Add support for completing forward-declared types (#143176)
This adds the needed handling for completing record types which were
previously declared leading us to create an incomplete record type.
2025-06-06 12:54:43 -07:00

17 lines
320 B
C

// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir
// RUN: FileCheck %s --input-file=%t.cir
extern enum X x;
void f(void) {
x;
}
enum X {
One,
Two
};
// CHECK: cir.global "private" external @x : !u32i
// CHECK: cir.func{{.*}} @f
// CHECK: cir.get_global @x : !cir.ptr<!u32i>