Skip to content

Commit 836a0b9

Browse files
committed
IRGen: Remove IRGenModule::CurSourceFile
1 parent ff283d5 commit 836a0b9

File tree

3 files changed

+0
-8
lines changed

3 files changed

+0
-8
lines changed

lib/IRGen/GenDecl.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,6 @@ class PrettySourceFileEmission : public llvm::PrettyStackTraceEntry {
428428
/// Emit all the top-level code in the source file.
429429
void IRGenModule::emitSourceFile(SourceFile &SF) {
430430
PrettySourceFileEmission StackEntry(SF);
431-
llvm::SaveAndRestore<SourceFile *> SetCurSourceFile(CurSourceFile, &SF);
432431

433432
// Emit types and other global decls.
434433
for (auto *decl : SF.getTopLevelDecls())

lib/IRGen/IRGenModule.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,6 @@ class IRGenModule {
542542
SILModuleConventions silConv;
543543
ModuleDecl *ObjCModule = nullptr;
544544
ModuleDecl *ClangImporterModule = nullptr;
545-
SourceFile *CurSourceFile = nullptr;
546545

547546
llvm::StringMap<ModuleDecl*> OriginalModules;
548547
llvm::SmallString<128> OutputFilename;

lib/IRGen/IRGenSIL.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1585,12 +1585,6 @@ void IRGenModule::emitSILFunction(SILFunction *f) {
15851585
return;
15861586

15871587
PrettyStackTraceSILFunction stackTrace("emitting IR", f);
1588-
llvm::SaveAndRestore<SourceFile *> SetCurSourceFile(CurSourceFile);
1589-
if (auto dc = f->getModule().getAssociatedContext()) {
1590-
if (auto sf = dc->getParentSourceFile()) {
1591-
CurSourceFile = sf;
1592-
}
1593-
}
15941588
IRGenSILFunction(*this, f).emitSILFunction();
15951589
}
15961590

0 commit comments

Comments
 (0)