mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Re-apply "[serialization] Reject loading a module with the wrong case."
This included a test that failed on case-sensitive filesystems. Test fixed. (Aside: Why not just have this fail with "no such module"? Why use a different error? Because even if "import FOO" picks up a module named 'Foo', there may actually be a module named 'FOO' on the system (in another folder), and we should be able to find that. Fixing that is tracked by rdar://problem/18691936.) rdar://problem/15632996 (again) Swift SVN r22856
This commit is contained in:
@@ -64,6 +64,9 @@ class ModuleFile : public LazyMemberLoader {
|
||||
llvm::BitstreamCursor SILCursor;
|
||||
llvm::BitstreamCursor SILIndexCursor;
|
||||
|
||||
/// The name of the module.
|
||||
StringRef Name;
|
||||
|
||||
/// The data blob containing all of the module's identifiers.
|
||||
StringRef IdentifierData;
|
||||
|
||||
@@ -478,6 +481,11 @@ public:
|
||||
return ModuleInputBuffer->getBufferIdentifier();
|
||||
}
|
||||
|
||||
/// Returns the module name as stored in the serialized data.
|
||||
StringRef getModuleName() const {
|
||||
return Name;
|
||||
}
|
||||
|
||||
/// AST-verify imported decls.
|
||||
///
|
||||
/// Has no effect in NDEBUG builds.
|
||||
|
||||
Reference in New Issue
Block a user