File tree Expand file tree Collapse file tree 2 files changed +5
-15
lines changed
Expand file tree Collapse file tree 2 files changed +5
-15
lines changed Original file line number Diff line number Diff line change @@ -466,10 +466,6 @@ class CompilerInstance {
466466 // / If \p BufID is already in the set, do nothing.
467467 void recordPrimaryInputBuffer (unsigned BufID);
468468
469- // / Record in PrimarySourceFiles the fact that \p SF is a primary, and
470- // / call recordPrimaryInputBuffer on \p SF's buffer (if it exists).
471- void recordPrimarySourceFile (SourceFile *SF);
472-
473469 bool isWholeModuleCompilation () { return PrimaryBufferIDs.empty (); }
474470
475471public:
Original file line number Diff line number Diff line change @@ -198,15 +198,6 @@ void CompilerInstance::recordPrimaryInputBuffer(unsigned BufID) {
198198 PrimaryBufferIDs.insert (BufID);
199199}
200200
201- void CompilerInstance::recordPrimarySourceFile (SourceFile *SF) {
202- assert (MainModule && " main module not created yet" );
203- PrimarySourceFiles.push_back (SF);
204- SF->enableInterfaceHash ();
205- SF->createReferencedNameTracker ();
206- if (SF->getBufferID ().hasValue ())
207- recordPrimaryInputBuffer (SF->getBufferID ().getValue ());
208- }
209-
210201bool CompilerInstance::setUpASTContextIfNeeded () {
211202 if (Invocation.getFrontendOptions ().RequestedAction ==
212203 FrontendOptions::ActionType::CompileModuleFromInterface) {
@@ -966,8 +957,11 @@ SourceFile *CompilerInstance::createSourceFileForMainModule(
966957 Invocation.getLangOptions ().BuildSyntaxTree , opts);
967958 MainModule->addFile (*inputFile);
968959
969- if (isPrimary)
970- recordPrimarySourceFile (inputFile);
960+ if (isPrimary) {
961+ PrimarySourceFiles.push_back (inputFile);
962+ inputFile->enableInterfaceHash ();
963+ inputFile->createReferencedNameTracker ();
964+ }
971965
972966 if (bufferID == SourceMgr.getCodeCompletionBufferID ()) {
973967 assert (!CodeCompletionFile && " Multiple code completion files?" );
You can’t perform that action at this time.
0 commit comments