Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/SILGen/SILGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1106,7 +1106,7 @@ void SILGenModule::emitFunctionDefinition(SILDeclRef constant, SILFunction *f) {

// TODO: Handle main SourceFile emission (currently done by
// SourceFileScope).
auto loc = RegularLocation::getModuleLocation();
auto loc = constant.getAsRegularLocation();
preEmitFunction(constant, f, loc);
auto *decl = constant.getDecl();
auto *dc = decl->getDeclContext();
Expand Down
4 changes: 2 additions & 2 deletions lib/SILGen/SILGenFunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ void SILGenFunction::emitArtificialTopLevel(Decl *mainDecl) {
// Emit a call to the main static function.
// return Module.$main();
auto *mainFunc = cast<FuncDecl>(mainDecl);
auto moduleLoc = RegularLocation::getModuleLocation();
auto moduleLoc = SILLocation(mainDecl);
auto *entryBlock = B.getInsertionBB();

SILDeclRef mainFunctionDeclRef(mainFunc, SILDeclRef::Kind::Func);
Expand Down Expand Up @@ -1001,7 +1001,7 @@ void SILGenFunction::emitArtificialTopLevel(Decl *mainDecl) {
}

void SILGenFunction::emitAsyncMainThreadStart(SILDeclRef entryPoint) {
auto moduleLoc = RegularLocation::getModuleLocation();
auto moduleLoc = entryPoint.getAsRegularLocation();
auto *entryBlock = B.getInsertionBB();
auto paramTypeIter = F.getConventions()
.getParameterSILTypes(getTypeExpansionContext())
Expand Down