[modules] If the same .pcm file is imported via two different paths, don't
complain that the contained modules are defined twice.
llvm-svn: 223724
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index a5165ad..93a34b7 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/lib/Frontend/CompilerInstance.cpp
@@ -1300,7 +1300,9 @@
TopFileIsModule = true;
auto &ModuleFile = CI.ModuleFileOverrides[ModuleName];
- if (!ModuleFile.empty() && ModuleFile != ModuleFileStack.back())
+ if (!ModuleFile.empty() &&
+ CI.getFileManager().getFile(ModuleFile) !=
+ CI.getFileManager().getFile(ModuleFileStack.back()))
CI.getDiagnostics().Report(SourceLocation(),
diag::err_conflicting_module_files)
<< ModuleName << ModuleFile << ModuleFileStack.back();