Skip to content
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Commit e13e0e4

Browse files
committed
CodeGen: fix runtime function dll storage
Properly attribute DLL storage to runtime functions. When generating the runtime function, scan for an existing declaration which may provide an explicit declaration (local storage) or a DLL import or export storage from the user. Honour that if available. Otherwise, if building with a local visibility of the public or standard namespaces (-flto-visibility-public-std), give the symbols local storage (it indicates a /MT[d] link, so static runtime). Otherwise, assume that the link is dynamic, and give the runtime function dllimport storage. This allows for implementations to get the correct storage as long as they are properly declared, the user to override the import storage, and in case no explicit storage is given, use of the import storage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289776 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 676b68f commit e13e0e4

8 files changed

+238
-21
lines changed

Diff for: lib/CodeGen/CGDeclCXX.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,8 @@ void CodeGenFunction::registerGlobalDtorWithAtExit(const VarDecl &VD,
237237
llvm::FunctionType::get(IntTy, dtorStub->getType(), false);
238238

239239
llvm::Constant *atexit =
240-
CGM.CreateRuntimeFunction(atexitTy, "atexit");
240+
CGM.CreateRuntimeFunction(atexitTy, "atexit", llvm::AttributeSet(),
241+
/*Local=*/true);
241242
if (llvm::Function *atexitFn = dyn_cast<llvm::Function>(atexit))
242243
atexitFn->setDoesNotThrow();
243244

Diff for: lib/CodeGen/CGException.cpp

+3-4
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,9 @@ const EHPersonality &EHPersonality::get(CodeGenFunction &CGF) {
221221

222222
static llvm::Constant *getPersonalityFn(CodeGenModule &CGM,
223223
const EHPersonality &Personality) {
224-
llvm::Constant *Fn =
225-
CGM.CreateRuntimeFunction(llvm::FunctionType::get(CGM.Int32Ty, true),
226-
Personality.PersonalityFn);
227-
return Fn;
224+
return CGM.CreateRuntimeFunction(llvm::FunctionType::get(CGM.Int32Ty, true),
225+
Personality.PersonalityFn,
226+
llvm::AttributeSet(), /*Local=*/true);
228227
}
229228

230229
static llvm::Constant *getOpaquePersonalityFn(CodeGenModule &CGM,

Diff for: lib/CodeGen/CGObjC.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -1811,7 +1811,8 @@ static llvm::Constant *createARCRuntimeFunction(CodeGenModule &CGM,
18111811
// If the target runtime doesn't naturally support ARC, emit weak
18121812
// references to the runtime support library. We don't really
18131813
// permit this to fail, but we need a particular relocation style.
1814-
if (!CGM.getLangOpts().ObjCRuntime.hasNativeARC()) {
1814+
if (!CGM.getLangOpts().ObjCRuntime.hasNativeARC() &&
1815+
!CGM.getTriple().isOSBinFormatCOFF()) {
18151816
f->setLinkage(llvm::Function::ExternalWeakLinkage);
18161817
} else if (fnName == "objc_retain" || fnName == "objc_release") {
18171818
// If we have Native ARC, set nonlazybind attribute for these APIs for

Diff for: lib/CodeGen/CodeGenModule.cpp

+58-6
Original file line numberDiff line numberDiff line change
@@ -2038,18 +2038,70 @@ llvm::Constant *CodeGenModule::GetAddrOfFunction(GlobalDecl GD,
20382038
IsForDefinition);
20392039
}
20402040

2041+
static const FunctionDecl *
2042+
GetRuntimeFunctionDecl(ASTContext &C, StringRef Name) {
2043+
TranslationUnitDecl *TUDecl = C.getTranslationUnitDecl();
2044+
DeclContext *DC = TranslationUnitDecl::castToDeclContext(TUDecl);
2045+
2046+
IdentifierInfo &CII = C.Idents.get(Name);
2047+
for (const auto &Result : DC->lookup(&CII))
2048+
if (const auto FD = dyn_cast<FunctionDecl>(Result))
2049+
return FD;
2050+
2051+
if (!C.getLangOpts().CPlusPlus)
2052+
return nullptr;
2053+
2054+
// Demangle the premangled name from getTerminateFn()
2055+
IdentifierInfo &CXXII =
2056+
(Name == "_ZSt9terminatev" || Name == "\01?terminate@@YAXXZ")
2057+
? C.Idents.get("terminate")
2058+
: C.Idents.get(Name);
2059+
2060+
for (const auto &N : {"__cxxabiv1", "std"}) {
2061+
IdentifierInfo &NS = C.Idents.get(N);
2062+
for (const auto &Result : DC->lookup(&NS)) {
2063+
NamespaceDecl *ND = dyn_cast<NamespaceDecl>(Result);
2064+
if (auto LSD = dyn_cast<LinkageSpecDecl>(Result))
2065+
for (const auto &Result : LSD->lookup(&NS))
2066+
if ((ND = dyn_cast<NamespaceDecl>(Result)))
2067+
break;
2068+
2069+
if (ND)
2070+
for (const auto &Result : ND->lookup(&CXXII))
2071+
if (const auto *FD = dyn_cast<FunctionDecl>(Result))
2072+
return FD;
2073+
}
2074+
}
2075+
2076+
return nullptr;
2077+
}
2078+
20412079
/// CreateRuntimeFunction - Create a new runtime function with the specified
20422080
/// type and name.
20432081
llvm::Constant *
2044-
CodeGenModule::CreateRuntimeFunction(llvm::FunctionType *FTy,
2045-
StringRef Name,
2046-
llvm::AttributeSet ExtraAttrs) {
2082+
CodeGenModule::CreateRuntimeFunction(llvm::FunctionType *FTy, StringRef Name,
2083+
llvm::AttributeSet ExtraAttrs,
2084+
bool Local) {
20472085
llvm::Constant *C =
20482086
GetOrCreateLLVMFunction(Name, FTy, GlobalDecl(), /*ForVTable=*/false,
2049-
/*DontDefer=*/false, /*IsThunk=*/false, ExtraAttrs);
2050-
if (auto *F = dyn_cast<llvm::Function>(C))
2051-
if (F->empty())
2087+
/*DontDefer=*/false, /*IsThunk=*/false,
2088+
ExtraAttrs);
2089+
2090+
if (auto *F = dyn_cast<llvm::Function>(C)) {
2091+
if (F->empty()) {
20522092
F->setCallingConv(getRuntimeCC());
2093+
2094+
if (!Local && getTriple().isOSBinFormatCOFF() &&
2095+
!getCodeGenOpts().LTOVisibilityPublicStd) {
2096+
const FunctionDecl *FD = GetRuntimeFunctionDecl(Context, Name);
2097+
if (!FD || FD->hasAttr<DLLImportAttr>()) {
2098+
F->setDLLStorageClass(llvm::GlobalValue::DLLImportStorageClass);
2099+
F->setLinkage(llvm::GlobalValue::ExternalLinkage);
2100+
}
2101+
}
2102+
}
2103+
}
2104+
20532105
return C;
20542106
}
20552107

Diff for: lib/CodeGen/CodeGenModule.h

+5-4
Original file line numberDiff line numberDiff line change
@@ -876,10 +876,11 @@ class CodeGenModule : public CodeGenTypeCache {
876876
}
877877

878878
/// Create a new runtime function with the specified type and name.
879-
llvm::Constant *CreateRuntimeFunction(llvm::FunctionType *Ty,
880-
StringRef Name,
881-
llvm::AttributeSet ExtraAttrs =
882-
llvm::AttributeSet());
879+
llvm::Constant *
880+
CreateRuntimeFunction(llvm::FunctionType *Ty, StringRef Name,
881+
llvm::AttributeSet ExtraAttrs = llvm::AttributeSet(),
882+
bool Local = false);
883+
883884
/// Create a new compiler builtin function with the specified type and name.
884885
llvm::Constant *CreateBuiltinFunction(llvm::FunctionType *Ty,
885886
StringRef Name,

Diff for: lib/CodeGen/ItaniumCXXABI.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -3899,7 +3899,8 @@ static llvm::Constant *getClangCallTerminateFn(CodeGenModule &CGM) {
38993899
llvm::FunctionType *fnTy =
39003900
llvm::FunctionType::get(CGM.VoidTy, CGM.Int8PtrTy, /*IsVarArgs=*/false);
39013901
llvm::Constant *fnRef =
3902-
CGM.CreateRuntimeFunction(fnTy, "__clang_call_terminate");
3902+
CGM.CreateRuntimeFunction(fnTy, "__clang_call_terminate",
3903+
llvm::AttributeSet(), /*Local=*/true);
39033904

39043905
llvm::Function *fn = dyn_cast<llvm::Function>(fnRef);
39053906
if (fn && fn->empty()) {

Diff for: lib/CodeGen/MicrosoftCXXABI.cpp

+8-4
Original file line numberDiff line numberDiff line change
@@ -2204,7 +2204,8 @@ static void emitGlobalDtorWithTLRegDtor(CodeGenFunction &CGF, const VarDecl &VD,
22042204
CGF.IntTy, DtorStub->getType(), /*IsVarArg=*/false);
22052205

22062206
llvm::Constant *TLRegDtor =
2207-
CGF.CGM.CreateRuntimeFunction(TLRegDtorTy, "__tlregdtor");
2207+
CGF.CGM.CreateRuntimeFunction(TLRegDtorTy, "__tlregdtor",
2208+
llvm::AttributeSet(), /*Local=*/true);
22082209
if (llvm::Function *TLRegDtorFn = dyn_cast<llvm::Function>(TLRegDtor))
22092210
TLRegDtorFn->setDoesNotThrow();
22102211

@@ -2302,7 +2303,8 @@ static llvm::Constant *getInitThreadHeaderFn(CodeGenModule &CGM) {
23022303
FTy, "_Init_thread_header",
23032304
llvm::AttributeSet::get(CGM.getLLVMContext(),
23042305
llvm::AttributeSet::FunctionIndex,
2305-
llvm::Attribute::NoUnwind));
2306+
llvm::Attribute::NoUnwind),
2307+
/*Local=*/true);
23062308
}
23072309

23082310
static llvm::Constant *getInitThreadFooterFn(CodeGenModule &CGM) {
@@ -2313,7 +2315,8 @@ static llvm::Constant *getInitThreadFooterFn(CodeGenModule &CGM) {
23132315
FTy, "_Init_thread_footer",
23142316
llvm::AttributeSet::get(CGM.getLLVMContext(),
23152317
llvm::AttributeSet::FunctionIndex,
2316-
llvm::Attribute::NoUnwind));
2318+
llvm::Attribute::NoUnwind),
2319+
/*Local=*/true);
23172320
}
23182321

23192322
static llvm::Constant *getInitThreadAbortFn(CodeGenModule &CGM) {
@@ -2324,7 +2327,8 @@ static llvm::Constant *getInitThreadAbortFn(CodeGenModule &CGM) {
23242327
FTy, "_Init_thread_abort",
23252328
llvm::AttributeSet::get(CGM.getLLVMContext(),
23262329
llvm::AttributeSet::FunctionIndex,
2327-
llvm::Attribute::NoUnwind));
2330+
llvm::Attribute::NoUnwind),
2331+
/*Local=*/true);
23282332
}
23292333

23302334
namespace {

Diff for: test/CodeGenCXX/runtime-dllstorage.cpp

+158
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
// RUN: %clang_cc1 -triple i686-windows-msvc -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK-MS -check-prefix CHECK-MS-DYNAMIC
2+
// RUN: %clang_cc1 -triple i686-windows-msvc -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -flto-visibility-public-std -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK-MS -check-prefix CHECK-MS-STATIC
3+
4+
// RUN: %clang_cc1 -triple i686-windows-itanium -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK-IA -check-prefix CHECK-DYNAMIC-IA -check-prefix CHECK-DYNAMIC-NODECL-IA -check-prefix CHECK-DYANMIC-IA-CXA-ATEXIT
5+
// RUN: %clang_cc1 -triple i686-windows-itanium -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -flto-visibility-public-std -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK-IA -check-prefix CHECK-STATIC-IA -check-prefix CHECK-STATIC-NODECL-IA -check-prefix CHECK-IA-STATIC-CXA-ATEXIT
6+
// RUN: %clang_cc1 -triple i686-windows-itanium -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -DIMPORT_DECLARATIONS -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK-IA -check-prefix CHECK-DYNAMIC-IA -check-prefix CHECK-DYNAMIC-IMPORT-IA -check-prefix CHECK-DYANMIC-IA-CXA-ATEXIT
7+
// RUN: %clang_cc1 -triple i686-windows-itanium -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -flto-visibility-public-std -DIMPORT_DECLARATIONS -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK-IA -check-prefix CHECK-STATIC-IA -check-prefix CHECK-STATIC-IMPORT-IA -check-prefix CHECK-IA-STATIC-CXA-ATEXIT
8+
// RUN: %clang_cc1 -triple i686-windows-itanium -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -DEXPORT_DECLARATIONS -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK-IA -check-prefix CHECK-DYNAMIC-IA -check-prefix CHECK-DYANMIC-IA-CXA-ATEXIT
9+
// RUN: %clang_cc1 -triple i686-windows-itanium -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -flto-visibility-public-std -DEXPORT_DECLARATIONS -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK-IA -check-prefix CHECK-STATIC-IA -check-prefix CHECK-IA-STATIC-CXA-ATEXIT
10+
// RUN: %clang_cc1 -triple i686-windows-itanium -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -DDECL -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK-IA -check-prefix CHECK-DYNAMIC-IA -check-prefix CHECK-DYNAMIC-DECL-IA -check-prefix CHECK-DYANMIC-IA-CXA-ATEXIT
11+
// RUN: %clang_cc1 -triple i686-windows-itanium -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -flto-visibility-public-std -DDECL -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK-IA -check-prefix CHECK-STATIC-IA -check-prefix CHECK-STATIC-DECL-IA -check-prefix CHECK-IA-STATIC-CXA-ATEXIT
12+
// %clang_cc1 -triple i686-windows-itanium -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -fno-use-cxa-atexit -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK-IA -check-prefix CHECK-DYNAMIC-IA -check-prefix CHECK-DYNAMIC-IA-ATEXIT
13+
// %clang_cc1 -triple i686-windows-itanium -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -fno-use-cxa-atexit -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK-IA -check-prefix CHECK-STATIC-IA -check-prefix CHECK-STATIC-IA-ATEXIT
14+
15+
// RUN: %clang_cc1 -triple i686-windows-gnu -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK-IA -check-prefix CHECK-DYNAMIC-IA
16+
// RUN: %clang_cc1 -triple i686-windows-gnu -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -flto-visibility-public-std -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK-IA -check-prefix CHECK-STATIC-IA
17+
// RUN: %clang_cc1 -triple i686-windows-cygnus -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK-IA -check-prefix CHECK-DYNAMIC-IA
18+
// RUN: %clang_cc1 -triple i686-windows-cygnus -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -flto-visibility-public-std -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK-IA -check-prefix CHECK-STATIC-IA
19+
20+
#if defined(IMPORT_DECLARATIONS)
21+
namespace __cxxabiv1 {
22+
extern "C" {
23+
__declspec(dllimport) void __cxa_guard_acquire(unsigned long long *);
24+
__declspec(dllimport) unsigned char *__cxa_allocate_exception(unsigned long);
25+
}
26+
extern "C" __declspec(dllimport) void __cxa_guard_release(unsigned long long *);
27+
}
28+
namespace std {
29+
__declspec(dllimport) __declspec(noreturn) void terminate();
30+
}
31+
#elif defined(EXPORT_DECLARATIONS)
32+
namespace __cxxabiv1 {
33+
extern "C" {
34+
__declspec(dllexport) void __cxa_guard_acquire(unsigned long long *);
35+
__declspec(dllexport) unsigned char *__cxa_allocate_exception(unsigned long);
36+
}
37+
extern "C" void __declspec(dllexport) __cxa_guard_release(unsigned long long *);
38+
}
39+
namespace std {
40+
__declspec(dllexport) __declspec(noreturn) void terminate();
41+
}
42+
#elif defined(DECL)
43+
namespace __cxxabiv1 {
44+
extern "C" unsigned char *__cxa_allocate_exception(unsigned long);
45+
}
46+
namespace std {
47+
__declspec(noreturn) void terminate();
48+
}
49+
#else
50+
namespace std {
51+
__declspec(noreturn) void terminate();
52+
}
53+
#endif
54+
55+
struct s {
56+
s() = default;
57+
s(unsigned char) { throw 0; }
58+
int m() const;
59+
};
60+
61+
struct t {
62+
~t();
63+
int m() const;
64+
};
65+
66+
struct u {
67+
~u();
68+
};
69+
70+
s o;
71+
thread_local t t;
72+
u v;
73+
__declspec(thread) s q;
74+
75+
void __declspec(noinline) f() {
76+
throw 0;
77+
}
78+
79+
void g();
80+
void __declspec(noinline) h() {
81+
try {
82+
g();
83+
} catch (const int &) {
84+
return;
85+
} catch (...) {
86+
throw;
87+
}
88+
}
89+
90+
void i() {
91+
s r(static_cast<unsigned char>('\t'));
92+
}
93+
94+
int j() {
95+
static thread_local struct t v;
96+
static struct t *w = new struct t;
97+
return w->m() ? v.m() : w->m();
98+
}
99+
100+
void k() noexcept {
101+
g();
102+
}
103+
104+
void l() {
105+
std::terminate();
106+
}
107+
108+
// CHECK-MS-DAG: @_Init_thread_epoch = external thread_local global i32
109+
// CHECK-MS-DAG: declare i32 @__tlregdtor(void ()*)
110+
// CHECK-MS-DAG: declare i32 @atexit(void ()*)
111+
// CHECK-MS-DYNAMIC-DAG: declare dllimport {{.*}} void @_CxxThrowException
112+
// CHECK-MS-STATIC-DAG: declare {{.*}} void @_CxxThrowException
113+
// CHECK-MS-DAG: declare noalias i8* @"\01??2@YAPAXI@Z"
114+
// CHECK-MS-DAG: declare void @_Init_thread_header(i32*)
115+
// CHECK-MS-DAG: declare void @_Init_thread_footer(i32*)
116+
117+
// CHECK-IA-DAG: declare i32 @__gxx_personality_v0(...)
118+
// CHECK-IA-DAG: define linkonce_odr hidden void @__clang_call_terminate(i8*)
119+
120+
// CHECK-DYNAMIC-IA-DAG: declare dllimport i32 @__cxa_thread_atexit(void (i8*)*, i8*, i8*)
121+
// CHECK-DYNAMIC-IA-DAG: declare dllimport i32 @__cxa_atexit(void (i8*)*, i8*, i8*)
122+
// CHECK-DYNAMIC-IA-DECL-DAG: declare i8* @__cxa_allocate_exception(i32)
123+
// CHECK-DYNAMIC-IA-NODECL-DAG: declare dllimport i8* @__cxa_allocate_exception(i32)
124+
// CHECK-DYNAMIC-IA-IMPORT-DAG: declare dllimport i8* @__cxa_allocate_exception(i32)
125+
// CHECK-DYNAMIC-IA-EXPORT-DAG: declare dllimport i8* @__cxa_allocate_exception(i32)
126+
// CHECK-DYNAMIC-IA-DAG: declare dllimport void @__cxa_throw(i8*, i8*, i8*)
127+
// CHECK-DYNAMIC-DECL-IA-DAG: declare dllimport i32 @__cxa_guard_acquire(i64*)
128+
// CHECK-DYNAMIC-NODECL-IA-DAG: declare dllimport i32 @__cxa_guard_acquire(i64*)
129+
// CHECK-DYNAMIC-IMPORT-IA-DAG: declare dllimport i32 @__cxa_guard_acquire(i64*)
130+
// CHECK-DYNAMIC-EXPORT-IA-DAG: declare dllexport i32 @__cxa_guard_acquire(i64*)
131+
// CHECK-IA-DAG: declare noalias i8* @_Znwj(i32)
132+
// CHECK-DYNAMIC-DECL-IA-DAG: declare dllimport void @__cxa_guard_release(i64*)
133+
// CHECK-DYNAMIC-NODECL-IA-DAG: declare dllimport void @__cxa_guard_release(i64*)
134+
// CHECK-DYNAMIC-IMPORT-IA-DAG: declare dllimport void @__cxa_guard_release(i64*)
135+
// CHECK-DYNAMIC-EXPORT-IA-DAG: declare dllimport void @__cxa_guard_release(i64*)
136+
// CHECK-DYANMIC-IA-DAG: declare dllimport void @_ZSt9terminatev()
137+
// CHECK-DYNAMIC-NODECL-IA-DAG: declare void @_ZSt9terminatev()
138+
// CHECK-DYNAMIC-IMPORT-IA-DAG: declare dllimport void @_ZSt9terminatev()
139+
// CHECK-DYNAMIC-EXPORT-IA-DAG: declare dllexport void @_ZSt9terminatev()
140+
141+
// CHECK-STATIC-IA-DAG: declare i32 @__cxa_thread_atexit(void (i8*)*, i8*, i8*)
142+
// CHECK-STATIC-IA-DAG: declare i32 @__cxa_atexit(void (i8*)*, i8*, i8*)
143+
// CHECK-STATIC-IA-DAG: declare i8* @__cxa_allocate_exception(i32)
144+
// CHECK-STATIC-IA-DAG: declare void @__cxa_throw(i8*, i8*, i8*)
145+
// CHECK-STATIC-DECL-IA-DAG: declare i32 @__cxa_guard_acquire(i64*)
146+
// CHECK-STATIC-NODECL-IA-DAG: declare i32 @__cxa_guard_acquire(i64*)
147+
// CHECK-STATIC-IMPORT-IA-DAG: declare i32 @__cxa_guard_acquire(i64*)
148+
// CHECK-STATIC-EXPORT-IA-DAG: declare i32 @__cxa_guard_acquire(i64*)
149+
// CHECK-IA-DAG: declare noalias i8* @_Znwj(i32)
150+
// CHECK-STATIC-DECL-IA-DAG: declare void @__cxa_guard_release(i64*)
151+
// CHECK-STATIC-NODECL-IA-DAG: declare void @__cxa_guard_release(i64*)
152+
// CHECK-STATIC-IMPORT-IA-DAG: declare void @__cxa_guard_release(i64*)
153+
// CHECK-STATIC-EXPORT-IA-DAG: declare void @__cxa_guard_release(i64*)
154+
// CHECK-STATIC-IA-DAG: declare void @_ZSt9terminatev()
155+
// CHECK-STATIC-NODECL-IA-DAG: declare void @_ZSt9terminatev()
156+
// CHECK-STATIC-IMPORT-IA-DAG: declare void @_ZSt9terminatev()
157+
// CHECK-STATIC-EXPORT-IA-DAG: declare dllexport void @_ZSt9terminatev()
158+

0 commit comments

Comments
 (0)