Skip to content

Commit 10e2373

Browse files
committed
address comments
1 parent 4590322 commit 10e2373

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

clang/test/CIR/CodeGen/throws.cpp

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -205,21 +205,21 @@ void throw_enum_expr() {
205205
throw Test::TestA;
206206
}
207207

208-
//CIR: %[[EXCEPTION_ADDR:.*]] = cir.alloc.exception 4 -> !cir.ptr<!u32i>
209-
//CIR: %[[EXCEPTION_VALUE:.*]] = cir.const #cir.int<0> : !u32i
210-
//CIR: cir.store{{.*}} %[[EXCEPTION_VALUE]], %[[EXCEPTION_ADDR]] : !u32i, !cir.ptr<!u32i>
211-
//CIR: cir.throw %[[EXCEPTION_ADDR]] : !cir.ptr<!u32i>, @_ZTIZ15throw_enum_exprvE4Test
212-
//CIR: cir.unreachable
213-
214-
//LLVM: %[[EXCEPTION_ADDR:.*]] = call ptr @__cxa_allocate_exception(i64 4)
215-
//LLVM: store i32 0, ptr %[[EXCEPTION_ADDR]], align 16
216-
//LLVM: call void @__cxa_throw(ptr %[[EXCEPTION_ADDR]], ptr @_ZTIZ15throw_enum_exprvE4Test, ptr null)
217-
//LLVM: unreachable
218-
219-
//OGCG: %[[EXCEPTION_ADDR:.*]] = call ptr @__cxa_allocate_exception(i64 4)
220-
//OGCG: store i32 0, ptr %[[EXCEPTION_ADDR]], align 16
221-
//OGCG: call void @__cxa_throw(ptr %[[EXCEPTION_ADDR]], ptr @_ZTIZ15throw_enum_exprvE4Test, ptr null)
222-
//OGCG: unreachable
208+
// CIR: %[[EXCEPTION_ADDR:.*]] = cir.alloc.exception 4 -> !cir.ptr<!u32i>
209+
// CIR: %[[EXCEPTION_VALUE:.*]] = cir.const #cir.int<0> : !u32i
210+
// CIR: cir.store{{.*}} %[[EXCEPTION_VALUE]], %[[EXCEPTION_ADDR]] : !u32i, !cir.ptr<!u32i>
211+
// CIR: cir.throw %[[EXCEPTION_ADDR]] : !cir.ptr<!u32i>, @_ZTIZ15throw_enum_exprvE4Test
212+
// CIR: cir.unreachable
213+
214+
// LLVM: %[[EXCEPTION_ADDR:.*]] = call ptr @__cxa_allocate_exception(i64 4)
215+
// LLVM: store i32 0, ptr %[[EXCEPTION_ADDR]], align 16
216+
// LLVM: call void @__cxa_throw(ptr %[[EXCEPTION_ADDR]], ptr @_ZTIZ15throw_enum_exprvE4Test, ptr null)
217+
// LLVM: unreachable
218+
219+
// OGCG: %[[EXCEPTION_ADDR:.*]] = call ptr @__cxa_allocate_exception(i64 4)
220+
// OGCG: store i32 0, ptr %[[EXCEPTION_ADDR]], align 16
221+
// OGCG: call void @__cxa_throw(ptr %[[EXCEPTION_ADDR]], ptr @_ZTIZ15throw_enum_exprvE4Test, ptr null)
222+
// OGCG: unreachable
223223

224224
void throw_enum_class_expr() {
225225
enum class Test {
@@ -229,18 +229,18 @@ void throw_enum_class_expr() {
229229
throw Test::TestA;
230230
}
231231

232-
//CIR: %[[EXCEPTION_ADDR:.*]] = cir.alloc.exception 4 -> !cir.ptr<!s32i>
233-
//CIR: %[[EXCEPTION_VALUE:.*]] = cir.const #cir.int<0> : !s32i
234-
//CIR: cir.store{{.*}} %[[EXCEPTION_VALUE]], %[[EXCEPTION_ADDR]] : !s32i, !cir.ptr<!s32i>
235-
//CIR: cir.throw %[[EXCEPTION_ADDR]] : !cir.ptr<!s32i>, @_ZTIZ21throw_enum_class_exprvE4Test
236-
//CIR: cir.unreachable
237-
238-
//LLVM: %[[EXCEPTION_ADDR:.*]] = call ptr @__cxa_allocate_exception(i64 4)
239-
//LLVM: store i32 0, ptr %[[EXCEPTION_ADDR]], align 16
240-
//LLVM: call void @__cxa_throw(ptr %[[EXCEPTION_ADDR]], ptr @_ZTIZ21throw_enum_class_exprvE4Test, ptr null)
241-
//LLVM: unreachable
242-
243-
//OGCG: %[[EXCEPTION_ADDR:.*]] = call ptr @__cxa_allocate_exception(i64 4)
244-
//OGCG: store i32 0, ptr %[[EXCEPTION_ADDR]], align 16
245-
//OGCG: call void @__cxa_throw(ptr %[[EXCEPTION_ADDR]], ptr @_ZTIZ21throw_enum_class_exprvE4Test, ptr null)
246-
//OGCG: unreachable
232+
// CIR: %[[EXCEPTION_ADDR:.*]] = cir.alloc.exception 4 -> !cir.ptr<!s32i>
233+
// CIR: %[[EXCEPTION_VALUE:.*]] = cir.const #cir.int<0> : !s32i
234+
// CIR: cir.store{{.*}} %[[EXCEPTION_VALUE]], %[[EXCEPTION_ADDR]] : !s32i, !cir.ptr<!s32i>
235+
// CIR: cir.throw %[[EXCEPTION_ADDR]] : !cir.ptr<!s32i>, @_ZTIZ21throw_enum_class_exprvE4Test
236+
// CIR: cir.unreachable
237+
238+
// LLVM: %[[EXCEPTION_ADDR:.*]] = call ptr @__cxa_allocate_exception(i64 4)
239+
// LLVM: store i32 0, ptr %[[EXCEPTION_ADDR]], align 16
240+
// LLVM: call void @__cxa_throw(ptr %[[EXCEPTION_ADDR]], ptr @_ZTIZ21throw_enum_class_exprvE4Test, ptr null)
241+
// LLVM: unreachable
242+
243+
// OGCG: %[[EXCEPTION_ADDR:.*]] = call ptr @__cxa_allocate_exception(i64 4)
244+
// OGCG: store i32 0, ptr %[[EXCEPTION_ADDR]], align 16
245+
// OGCG: call void @__cxa_throw(ptr %[[EXCEPTION_ADDR]], ptr @_ZTIZ21throw_enum_class_exprvE4Test, ptr null)
246+
// OGCG: unreachable

0 commit comments

Comments
 (0)