Skip to content

Commit 2d1359f

Browse files
committed
Fix a few places that are missing IGM.DebugInfo->emitArtificialFunction
1 parent 7aea3ec commit 2d1359f

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

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)