mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-27 03:56:08 +00:00

This adds -no-opaque-pointers to clang tests whose output will change when opaque pointers are enabled by default. This is intended to be part of the migration approach described in https://discourse.llvm.org/t/enabling-opaque-pointers-by-default/61322/9. The patch has been produced by replacing %clang_cc1 with %clang_cc1 -no-opaque-pointers for tests that fail with opaque pointers enabled. Worth noting that this doesn't cover all tests, there's a remaining ~40 tests not using %clang_cc1 that will need a followup change. Differential Revision: https://reviews.llvm.org/D123115
28 lines
952 B
C++
28 lines
952 B
C++
// RUN: %clang_cc1 -no-opaque-pointers %s -fexceptions -exception-model=seh -emit-llvm -triple x86_64-w64-windows-gnu -o - | FileCheck %s --check-prefix=X64
|
|
// RUN: %clang_cc1 -no-opaque-pointers %s -fexceptions -exception-model=dwarf -emit-llvm -triple i686-w64-windows-gnu -o - | FileCheck %s --check-prefix=X86
|
|
// RUN: %clang_cc1 -no-opaque-pointers %s -fexceptions -emit-llvm -triple i686-w64-windows-gnu -o - | FileCheck %s --check-prefix=X86
|
|
|
|
extern "C" void foo();
|
|
extern "C" void bar();
|
|
|
|
struct Cleanup {
|
|
~Cleanup() {
|
|
bar();
|
|
}
|
|
};
|
|
|
|
extern "C" void test() {
|
|
Cleanup x;
|
|
foo();
|
|
}
|
|
|
|
// X64: define dso_local void @test()
|
|
// X64-SAME: personality i8* bitcast (i32 (...)* @__gxx_personality_seh0 to i8*)
|
|
// X64: invoke void @foo()
|
|
// X64: landingpad { i8*, i32 }
|
|
|
|
// X86: define dso_local void @test()
|
|
// X86-SAME: personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
|
|
// X86: invoke void @foo()
|
|
// X86: landingpad { i8*, i32 }
|