[llvm] r257664 - dsymutil: Only warn about missing clang modules once.
Adrian Prantl via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 13 12:26:00 PST 2016
Author: adrian
Date: Wed Jan 13 14:26:00 2016
New Revision: 257664
URL: http://llvm.org/viewvc/llvm-project?rev=257664&view=rev
Log:
dsymutil: Only warn about missing clang modules once.
rdar://problem/22269336
Added:
llvm/trunk/test/tools/dsymutil/X86/modules-warnings.test
Modified:
llvm/trunk/test/tools/dsymutil/Inputs/modules/Foo.pcm
llvm/trunk/tools/dsymutil/DwarfLinker.cpp
Modified: llvm/trunk/test/tools/dsymutil/Inputs/modules/Foo.pcm
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/dsymutil/Inputs/modules/Foo.pcm?rev=257664&r1=257663&r2=257664&view=diff
==============================================================================
Binary files llvm/trunk/test/tools/dsymutil/Inputs/modules/Foo.pcm (original) and llvm/trunk/test/tools/dsymutil/Inputs/modules/Foo.pcm Wed Jan 13 14:26:00 2016 differ
Added: llvm/trunk/test/tools/dsymutil/X86/modules-warnings.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/dsymutil/X86/modules-warnings.test?rev=257664&view=auto
==============================================================================
--- llvm/trunk/test/tools/dsymutil/X86/modules-warnings.test (added)
+++ llvm/trunk/test/tools/dsymutil/X86/modules-warnings.test Wed Jan 13 14:26:00 2016
@@ -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
Modified: llvm/trunk/tools/dsymutil/DwarfLinker.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/dsymutil/DwarfLinker.cpp?rev=257664&r1=257663&r2=257664&view=diff
==============================================================================
--- llvm/trunk/tools/dsymutil/DwarfLinker.cpp (original)
+++ llvm/trunk/tools/dsymutil/DwarfLinker.cpp Wed Jan 13 14:26:00 2016
@@ -3237,10 +3237,8 @@ void DwarfLinker::loadClangModule(String
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;
More information about the llvm-commits
mailing list