File tree Expand file tree Collapse file tree 7 files changed +8
-25
lines changed Expand file tree Collapse file tree 7 files changed +8
-25
lines changed Original file line number Diff line number Diff line change @@ -872,10 +872,6 @@ class FileUnit : public DeclContext {
872
872
return getParentModule ()->getName ().str ();
873
873
}
874
874
875
- // / If this is a module imported from a parseable interface, return the path
876
- // / to the interface file, otherwise an empty StringRef.
877
- virtual StringRef getParseableInterface () const { return {}; }
878
-
879
875
// / Traverse the decls within this file.
880
876
// /
881
877
// / \returns true if traversal was aborted, false if it completed
Original file line number Diff line number Diff line change @@ -78,6 +78,11 @@ class ModuleFile
78
78
// / The target the module was built for.
79
79
StringRef TargetTriple;
80
80
81
+ // / The name of the module interface this module was compiled from.
82
+ // /
83
+ // / Empty if this module didn't come from an interface file.
84
+ StringRef ModuleInterfacePath;
85
+
81
86
// / The Swift compatibility version in use when this module was built.
82
87
version::Version CompatibilityVersion;
83
88
@@ -762,6 +767,8 @@ class ModuleFile
762
767
void getDisplayDecls (SmallVectorImpl<Decl*> &results);
763
768
764
769
StringRef getModuleFilename () const {
770
+ if (!ModuleInterfacePath.empty ())
771
+ return ModuleInterfacePath;
765
772
// FIXME: This seems fragile, maybe store the filename separately ?
766
773
return ModuleInputBuffer->getBufferIdentifier ();
767
774
}
Original file line number Diff line number Diff line change @@ -251,10 +251,6 @@ class SerializedASTFile final : public LoadedFile {
251
251
252
252
ModuleFile &File;
253
253
254
- // / The parseable interface this module was generated from if any.
255
- // / Used for debug info.
256
- std::string ParseableInterface;
257
-
258
254
bool IsSIB;
259
255
260
256
~SerializedASTFile () = default ;
@@ -351,13 +347,6 @@ class SerializedASTFile final : public LoadedFile {
351
347
352
348
virtual const clang::Module *getUnderlyingClangModule () const override ;
353
349
354
- // / If this is a module imported from a parseable interface, return the path
355
- // / to the interface file, otherwise an empty StringRef.
356
- virtual StringRef getParseableInterface () const override {
357
- return ParseableInterface;
358
- }
359
- void setParseableInterface (StringRef PI) { ParseableInterface = PI; }
360
-
361
350
virtual bool getAllGenericSignatures (
362
351
SmallVectorImpl<GenericSignature*> &genericSignatures)
363
352
override ;
Original file line number Diff line number Diff line change @@ -92,7 +92,6 @@ struct ValidationInfo {
92
92
class ExtendedValidationInfo {
93
93
SmallVector<StringRef, 4 > ExtraClangImporterOpts;
94
94
StringRef SDKPath;
95
- StringRef ParseableInterface;
96
95
struct {
97
96
unsigned ArePrivateImportsEnabled : 1 ;
98
97
unsigned IsSIB : 1 ;
@@ -114,8 +113,6 @@ class ExtendedValidationInfo {
114
113
void addExtraClangImporterOption (StringRef option) {
115
114
ExtraClangImporterOpts.push_back (option);
116
115
}
117
- StringRef getParseableInterface () const { return ParseableInterface; }
118
- void setParseableInterface (StringRef PI) { ParseableInterface = PI; }
119
116
120
117
bool isSIB () const { return Bits.IsSIB ; }
121
118
void setIsSIB (bool val) {
Original file line number Diff line number Diff line change @@ -1249,10 +1249,6 @@ StringRef ModuleDecl::getModuleFilename() const {
1249
1249
// per-file names. Modules can consist of more than one file.
1250
1250
StringRef Result;
1251
1251
for (auto F : getFiles ()) {
1252
- Result = F->getParseableInterface ();
1253
- if (!Result.empty ())
1254
- return Result;
1255
-
1256
1252
if (auto SF = dyn_cast<SourceFile>(F)) {
1257
1253
if (!Result.empty ())
1258
1254
return StringRef ();
Original file line number Diff line number Diff line change @@ -1352,8 +1352,7 @@ ModuleFile::ModuleFile(
1352
1352
break ;
1353
1353
}
1354
1354
case input_block::PARSEABLE_INTERFACE_PATH: {
1355
- if (extInfo)
1356
- extInfo->setParseableInterface (blobData);
1355
+ ModuleInterfacePath = blobData;
1357
1356
break ;
1358
1357
}
1359
1358
default :
Original file line number Diff line number Diff line change @@ -548,7 +548,6 @@ FileUnit *SerializedModuleLoaderBase::loadAST(
548
548
// We've loaded the file. Now try to bring it into the AST.
549
549
auto fileUnit = new (Ctx) SerializedASTFile (M, *loadedModuleFile,
550
550
extendedInfo.isSIB ());
551
- fileUnit->setParseableInterface (extendedInfo.getParseableInterface ());
552
551
M.addFile (*fileUnit);
553
552
if (extendedInfo.isTestable ())
554
553
M.setTestingEnabled ();
You can’t perform that action at this time.
0 commit comments