summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2014-12-09 00:14:36 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2014-12-09 00:14:36 +0000
commit0c6387f7599b33436519859757391ea9133c5df8 (patch)
tree6cc37c7687f9fcec57f7d64cf3403ebe04a3ce05 /clang/lib/Frontend/CompilerInstance.cpp
parentae394819c817c20c37cc8f7c4b5180c331321abd (diff)
downloadbcm5719-llvm-0c6387f7599b33436519859757391ea9133c5df8.tar.gz
bcm5719-llvm-0c6387f7599b33436519859757391ea9133c5df8.zip
[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
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index a5165ad6211..93a34b72227 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/lib/Frontend/CompilerInstance.cpp
@@ -1300,7 +1300,9 @@ bool CompilerInstance::loadModuleFile(StringRef FileName) {
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();
OpenPOWER on IntegriCloud