Skip to content

Commit 5a46517

Browse files
committed
Fix a few places that are missing IGM.DebugInfo->emitArtificialFunction
1 parent fa70442 commit 5a46517

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

lib/IRGen/GenDecl.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1967,6 +1967,8 @@ void IRGenerator::emitEagerClassInitialization() {
19671967
"_swift_eager_class_initialization");
19681968
IGM->Module.getFunctionList().push_back(RegisterFn);
19691969
IRGenFunction RegisterIGF(*IGM, RegisterFn);
1970+
if (IGM->DebugInfo)
1971+
IGM->DebugInfo->emitArtificialFunction(RegisterIGF, RegisterIGF.CurFn);
19701972
RegisterFn->setAttributes(IGM->constructInitialAttributes());
19711973
RegisterFn->setCallingConv(IGM->DefaultCC);
19721974

@@ -2008,6 +2010,8 @@ void IRGenerator::emitObjCActorsNeedingSuperclassSwizzle() {
20082010
"_swift_objc_actor_initialization");
20092011
IGM->Module.getFunctionList().push_back(RegisterFn);
20102012
IRGenFunction RegisterIGF(*IGM, RegisterFn);
2013+
if (IGM->DebugInfo)
2014+
IGM->DebugInfo->emitArtificialFunction(RegisterIGF, RegisterIGF.CurFn);
20112015
RegisterFn->setAttributes(IGM->constructInitialAttributes());
20122016
RegisterFn->setCallingConv(IGM->DefaultCC);
20132017

lib/IRGen/GenEnum.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1710,6 +1710,8 @@ namespace {
17101710

17111711
IRGenFunction IGF(IGM, func);
17121712
Explosion src = IGF.collectParameters();
1713+
if (IGM.DebugInfo)
1714+
IGM.DebugInfo->emitArtificialFunction(IGF, IGF.CurFn);
17131715

17141716
EnumPayload payload;
17151717
llvm::Value *extraTag;
@@ -1747,6 +1749,8 @@ namespace {
17471749

17481750
IRGenFunction IGF(IGM, func);
17491751
Explosion src = IGF.collectParameters();
1752+
if (IGM.DebugInfo)
1753+
IGM.DebugInfo->emitArtificialFunction(IGF, IGF.CurFn);
17501754

17511755
EnumPayload payload;
17521756
llvm::Value *extraTag;
@@ -3532,7 +3536,8 @@ namespace {
35323536

35333537
IRGenFunction IGF(IGM, func);
35343538
Explosion src = IGF.collectParameters();
3535-
3539+
if (IGM.DebugInfo)
3540+
IGM.DebugInfo->emitArtificialFunction(IGF, IGF.CurFn);
35363541
auto parts = destructureAndTagLoadableEnumFromOutlined(IGF, src);
35373542

35383543
forNontrivialPayloads(IGF, parts.tag, [&](unsigned tagIndex,
@@ -3561,6 +3566,8 @@ namespace {
35613566
auto func = createOutlineLLVMFunction(IGM, name, PayloadTypesAndTagType);
35623567

35633568
IRGenFunction IGF(IGM, func);
3569+
if (IGM.DebugInfo)
3570+
IGM.DebugInfo->emitArtificialFunction(IGF, IGF.CurFn);
35643571
Explosion src = IGF.collectParameters();
35653572
auto parts = destructureAndTagLoadableEnumFromOutlined(IGF, src);
35663573

lib/IRGen/MetadataRequest.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2325,6 +2325,8 @@ MetadataResponse irgen::emitGenericTypeMetadataAccessFunction(
23252325
subIGF.CurFn->setOnlyReadsMemory();
23262326
subIGF.CurFn->setWillReturn();
23272327
subIGF.CurFn->setCallingConv(IGM.SwiftCC);
2328+
if (IGM.DebugInfo)
2329+
IGM.DebugInfo->emitArtificialFunction(subIGF, subIGF.CurFn);
23282330
IGM.setHasNoFramePointer(subIGF.CurFn);
23292331

23302332
auto params = subIGF.collectParameters();
@@ -2913,6 +2915,8 @@ emitMetadataAccessByMangledName(IRGenFunction &IGF, CanType type,
29132915
subIGF.CurFn->setOnlyReadsMemory();
29142916
subIGF.CurFn->setWillReturn();
29152917
IGM.setHasNoFramePointer(subIGF.CurFn);
2918+
if (IGM.DebugInfo)
2919+
IGM.DebugInfo->emitArtificialFunction(subIGF, subIGF.CurFn);
29162920

29172921
auto params = subIGF.collectParameters();
29182922
auto cache = params.claimNext();

0 commit comments

Comments
 (0)