dsymutil: Only warn about missing clang modules once.

rdar://problem/22269336

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257664 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Adrian Prantl 2016-01-13 20:26:00 +00:00
parent 307c714edd
commit f6ffec95e3
3 changed files with 13 additions and 3 deletions

View File

@ -0,0 +1,12 @@
Test for module-related warnings.
This reuses the files from the modules.m testcase.
RUN: rm -rf %t.dir && mkdir %t.dir
RUN: cp %p/../Inputs/modules/1.o %p/../Inputs/modules/Foo.pcm %t.dir
RUN: llvm-dsymutil -f -oso-prepend-path=%t.dir -y \
RUN: %p/dummy-debug-map.map -o %t 2>&1 | FileCheck %s
Module-not-found should be reported only once.
CHECK: warning: {{.*}}Bar.pcm: No such file or directory
CHECK-NOT: warning: {{.*}}Bar.pcm: No such file or directory

View File

@ -3237,10 +3237,8 @@ void DwarfLinker::loadClangModule(StringRef Filename, StringRef ModulePath,
auto &Obj =
ModuleMap.addDebugMapObject(Path, sys::TimeValue::PosixZeroTime());
auto ErrOrObj = loadObject(ObjHolder, Obj, ModuleMap);
if (!ErrOrObj) {
ClangModules.erase(ClangModules.find(Filename));
if (!ErrOrObj)
return;
}
std::unique_ptr<CompileUnit> Unit;