Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
clang/test/CodeGenCXX/dllimport-runtime-fns.cpp
Show All 21 Lines | |||||
void bar(); | void bar(); | ||||
void foo2() noexcept(true) { bar(); } | void foo2() noexcept(true) { bar(); } | ||||
// __std_terminate should not be marked dllimport. | // __std_terminate should not be marked dllimport. | ||||
// MSVC-LABEL: define dso_local void @"?foo2@@YAXXZ" | // MSVC-LABEL: define dso_local void @"?foo2@@YAXXZ" | ||||
// MSVC: call void @__std_terminate() | // MSVC: call void @__std_terminate() | ||||
// MSVC: declare dso_local void @__std_terminate() | // MSVC: declare dso_local void @__std_terminate() | ||||
// _ZSt9terminatev and __cxa_begin_catch should be marked dllimport. | // Itanium doesn't explicitly call these anymore. | ||||
// ITANIUM-LABEL: define linkonce_odr hidden void @__clang_call_terminate(ptr noundef %0) | // ITANIUM-NOT: __clang_call_terminate | ||||
// ITANIUM: call ptr @__cxa_begin_catch({{.*}}) | // ITANIUM-NOT: __cxa_begin_catch | ||||
// ITANIUM: call void @_ZSt9terminatev() | // ITANIUM-NOT: _ZSt9terminatev | ||||
// ITANIUM: declare dllimport ptr @__cxa_begin_catch(ptr) | |||||
// ITANIUM: declare dllimport void @_ZSt9terminatev() | // Nor does mingw. | ||||
// GNU-NOT: __clang_call_terminate | |||||
// .. not for mingw. | // GNU-NOT: __cxa_begin_catch | ||||
// GNU-LABEL: define linkonce_odr hidden void @__clang_call_terminate(ptr noundef %0) | // GNU-NOT: _ZSt9terminatev | ||||
// GNU: call ptr @__cxa_begin_catch({{.*}}) | |||||
// GNU: call void @_ZSt9terminatev() | |||||
// GNU: declare dso_local ptr @__cxa_begin_catch(ptr) | |||||
// GNU: declare dso_local void @_ZSt9terminatev() | |||||
struct A {}; | struct A {}; | ||||
struct B { virtual void f(); }; | struct B { virtual void f(); }; | ||||
struct C : A, virtual B {}; | struct C : A, virtual B {}; | ||||
struct T {}; | struct T {}; | ||||
T *foo3() { return dynamic_cast<T *>((C *)0); } | T *foo3() { return dynamic_cast<T *>((C *)0); } | ||||
// __RTDynamicCast should not be marked dllimport. | // __RTDynamicCast should not be marked dllimport. | ||||
Show All 13 Lines |