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 {
466
466
// / If \p BufID is already in the set, do nothing.
467
467
void recordPrimaryInputBuffer (unsigned BufID);
468
468
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
-
473
469
bool isWholeModuleCompilation () { return PrimaryBufferIDs.empty (); }
474
470
475
471
public:
Original file line number Diff line number Diff line change @@ -198,15 +198,6 @@ void CompilerInstance::recordPrimaryInputBuffer(unsigned BufID) {
198
198
PrimaryBufferIDs.insert (BufID);
199
199
}
200
200
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
-
210
201
bool CompilerInstance::setUpASTContextIfNeeded () {
211
202
if (Invocation.getFrontendOptions ().RequestedAction ==
212
203
FrontendOptions::ActionType::CompileModuleFromInterface) {
@@ -966,8 +957,11 @@ SourceFile *CompilerInstance::createSourceFileForMainModule(
966
957
Invocation.getLangOptions ().BuildSyntaxTree , opts);
967
958
MainModule->addFile (*inputFile);
968
959
969
- if (isPrimary)
970
- recordPrimarySourceFile (inputFile);
960
+ if (isPrimary) {
961
+ PrimarySourceFiles.push_back (inputFile);
962
+ inputFile->enableInterfaceHash ();
963
+ inputFile->createReferencedNameTracker ();
964
+ }
971
965
972
966
if (bufferID == SourceMgr.getCodeCompletionBufferID ()) {
973
967
assert (!CodeCompletionFile && " Multiple code completion files?" );
You can’t perform that action at this time.
0 commit comments