Skip to content

Commit a459c97

Browse files
author
Zak Kent
committed
[SILGen] [Test] Address code review comments
1 parent 41cd9fb commit a459c97

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

lib/SILGen/SILGen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1099,7 +1099,7 @@ void SILGenModule::emitFunctionDefinition(SILDeclRef constant, SILFunction *f) {
10991099
auto *File = constant.getFileUnit();
11001100
// In script mode
11011101
assert(isa<SourceFile>(File) && "Emitting entry-point of non source file?!");
1102-
auto *SF = dyn_cast<SourceFile>(File);
1102+
auto *SF = cast<SourceFile>(File);
11031103
emitEntryPoint(SF, f);
11041104
return;
11051105
}

lib/SILGen/SILGenTopLevel.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ void SILGenModule::emitEntryPoint(SourceFile *SF, SILFunction *TopLevel) {
3636

3737
TopLevel->createProfiler(EntryRef);
3838

39-
SILGenFunction TopLevelSGF(*this, *TopLevel, SF, true);
39+
SILGenFunction TopLevelSGF(*this, *TopLevel, SF,
40+
/* IsEmittingTopLevelCode */ true);
4041
TopLevelSGF.MagicFunctionName = SwiftModule->getName();
4142
auto moduleCleanupLoc = CleanupLocation::getModuleCleanupLocation();
4243

test/DebugInfo/test-foundation.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ import ObjectiveC
1212
import Foundation
1313

1414
class MyObject : NSObject {
15-
16-
1715
// Ensure we don't emit linetable entries for ObjC thunks.
1816
// LOC-CHECK: define {{.*}} @"$s4main8MyObjectC0B3ArrSo7NSArrayCvgTo"
1917
// LOC-CHECK: ret {{.*}}, !dbg ![[DBG:.*]]

0 commit comments

Comments
 (0)