Skip to content

Commit

Permalink
dsymutil: Only warn about missing clang modules once.
Browse files Browse the repository at this point in the history
rdar://problem/22269336

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257664 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
adrian-prantl committed Jan 13, 2016
1 parent 307c714 commit f6ffec9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
Binary file modified test/tools/dsymutil/Inputs/modules/Foo.pcm
Binary file not shown.
12 changes: 12 additions & 0 deletions test/tools/dsymutil/X86/modules-warnings.test
Original file line number Diff line number Diff line change
@@ -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
4 changes: 1 addition & 3 deletions tools/dsymutil/DwarfLinker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit f6ffec9

Please sign in to comment.