forked from jeremyhu/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dsymutil/modules: Reword the warning for static libraries without mod…
…ule caches In addition to clarifying the warning message this contains a minor functional change in that it now warns if the *immediate* parent directory in which the missing PCM is expected to be isn't found. This patch also includes a more comprehensive testcase. rdar://problem/25860711 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270269 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
1 parent
116261c
commit d492dcb
Showing
8 changed files
with
58 additions
and
29 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Compile with: | ||
# cat >modules.modulemap <<EOF | ||
# module Foo { | ||
# header "Foo.h" | ||
# export * | ||
# } | ||
# module Bar { | ||
# header "Bar.h" | ||
# export * | ||
# } | ||
# EOF | ||
# echo 'typedef int bar;' >Bar.h | ||
# echo '@import Bar; typedef bar foo;' >Foo.h | ||
# echo '@import Foo; foo f() { return 0; }' >module-warnings.m | ||
# clang -cc1 -emit-obj -fmodules -fmodule-map-file=modules.modulemap \ | ||
# -fmodule-format=obj -debug-info-kind=standalone -dwarf-ext-refs \ | ||
# -fmodules-cache-path=ModuleCache \ | ||
# -fdisable-module-hash module-warnings.m -o 1.o | ||
# | ||
# Test for module-related warnings. | ||
# | ||
# RUN: rm -rf %t.dir && mkdir %t.dir && mkdir %t.dir/ModuleCache | ||
# RUN: cp %p/../Inputs/module-warnings/1.o %t.dir | ||
# RUN: cp %p/../Inputs/module-warnings/Foo.pcm %t.dir/ModuleCache | ||
# | ||
# 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. | ||
# The exact error message depends on the OS so we don't check for it. | ||
# CHECK: warning: {{.*}}Bar.pcm: | ||
# CHECK-NOT: warning: {{.*}}Bar.pcm: | ||
# | ||
# RUN: cp %p/../Inputs/module-warnings/libstatic.a %t.dir | ||
# RUN: llvm-dsymutil -f -oso-prepend-path=%t.dir -y %s -o %t 2>&1 | FileCheck %s | ||
# CHECK: rebuild the module cache | ||
# CHECK-NOT: static libraries | ||
# | ||
# RUN: rm -rf %t.dir/ModuleCache | ||
# RUN: llvm-dsymutil -f -oso-prepend-path=%t.dir -y %s -o %t 2>&1 \ | ||
# RUN: | FileCheck %s --check-prefix=STATIC | ||
# STATIC: warning: {{.*}}Bar.pcm: | ||
# STATIC: note: Linking a static library | ||
# STATIC: warning: {{.*}}Foo.pcm: | ||
# STATIC-NOT: note: | ||
|
||
--- | ||
triple: 'x86_64-apple-darwin' | ||
objects: | ||
- filename: libstatic.a(1.o) | ||
symbols: | ||
- { sym: __Z3foov, objAddr: 0x0, binAddr: 0x10000, size: 0x10 } | ||
... |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters