6 changes: 3 additions & 3 deletions llvm/test/tools/dsymutil/X86/minimize.test
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
RUN: llvm-dsymutil -f -o - -oso-prepend-path=%p/.. %p/../Inputs/basic.macho.x86_64 | llvm-readobj -sections - | FileCheck %s --check-prefix=FULL
RUN: llvm-dsymutil --minimize -f -o - -oso-prepend-path=%p/.. %p/../Inputs/basic.macho.x86_64 | llvm-readobj -sections - | FileCheck %s
RUN: llvm-dsymutil -z -f -o - -oso-prepend-path=%p/.. %p/../Inputs/basic.macho.x86_64 | llvm-readobj -sections - | FileCheck %s
RUN: dsymutil -f -o - -oso-prepend-path=%p/.. %p/../Inputs/basic.macho.x86_64 | llvm-readobj -sections - | FileCheck %s --check-prefix=FULL
RUN: dsymutil --minimize -f -o - -oso-prepend-path=%p/.. %p/../Inputs/basic.macho.x86_64 | llvm-readobj -sections - | FileCheck %s
RUN: dsymutil -z -f -o - -oso-prepend-path=%p/.. %p/../Inputs/basic.macho.x86_64 | llvm-readobj -sections - | FileCheck %s

FULL: Name: __debug_pubnames
FULL: Name: __debug_pubtypes
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/tools/dsymutil/X86/mismatch.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// RUN: rm -rf %t.dir && mkdir %t.dir
// RUN: cp %p/../Inputs/mismatch/1.o %p/../Inputs/mismatch/mismatch.pcm %t.dir
// RUN: cp %p/../Inputs/mismatch/1.o %t.dir/2.o
// RUN: llvm-dsymutil --verbose -f -oso-prepend-path=%t.dir \
// RUN: dsymutil --verbose -f -oso-prepend-path=%t.dir \
// RUN: -y %p/dummy-debug-map.map -o %t.bin 2>&1 | FileCheck %s

@import mismatch;
Expand Down
6 changes: 3 additions & 3 deletions llvm/test/tools/dsymutil/X86/module-warnings.test
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# 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: 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.
Expand All @@ -32,12 +32,12 @@
# 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
# RUN: 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: 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
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/tools/dsymutil/X86/modules-dwarf-version.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// RUN: mkdir %t.dir
// RUN: cp %p/../Inputs/modules/Bar.pcm %t.dir
// RUN: cp %p/../Inputs/modules-dwarf-version/1.o %t.dir
// RUN: llvm-dsymutil -f -oso-prepend-path=%t.dir \
// RUN: dsymutil -f -oso-prepend-path=%t.dir \
// RUN: -y %p/dummy-debug-map.map -o - \
// RUN: | llvm-dwarfdump --debug-info - | FileCheck %s

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/tools/dsymutil/X86/modules-empty.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// RUN: rm -rf %t.dir
// RUN: mkdir %t.dir
// RUN: cp %p/../Inputs/modules-empty/1.o %p/../Inputs/modules-empty/Empty.pcm %t.dir
// RUN: llvm-dsymutil -f -oso-prepend-path=%t.dir \
// RUN: dsymutil -f -oso-prepend-path=%t.dir \
// RUN: -y %p/dummy-debug-map.map -o - \
// RUN: | llvm-dwarfdump --debug-info - | FileCheck %s

Expand Down
4 changes: 2 additions & 2 deletions llvm/test/tools/dsymutil/X86/modules.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
clang -c -g odr_violation.c -o 2.o
*/

// RUN: llvm-dsymutil -f -oso-prepend-path=%p/../Inputs/modules \
// RUN: dsymutil -f -oso-prepend-path=%p/../Inputs/modules \
// RUN: -y %p/dummy-debug-map.map -o - \
// RUN: | llvm-dwarfdump -v --debug-info - | FileCheck %s

// RUN: llvm-dsymutil -f -oso-prepend-path=%p/../Inputs/modules -y \
// RUN: dsymutil -f -oso-prepend-path=%p/../Inputs/modules -y \
// RUN: %p/dummy-debug-map.map -o %t 2>&1 | FileCheck --check-prefix=WARN %s

// WARN-NOT: warning: hash mismatch
Expand Down
6 changes: 3 additions & 3 deletions llvm/test/tools/dsymutil/X86/multiple-inputs.test
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RUN: cat %p/../Inputs/basic-lto.macho.x86_64 > %t/basic-lto.macho.x86_64
RUN: cat %p/../Inputs/basic-lto-dw4.macho.x86_64 > %t/basic-lto-dw4.macho.x86_64

# Multiple inputs in flat mode
RUN: llvm-dsymutil -f -oso-prepend-path=%p/.. %t/basic.macho.x86_64 %t/basic-archive.macho.x86_64 %t/basic-lto.macho.x86_64 %t/basic-lto-dw4.macho.x86_64
RUN: dsymutil -f -oso-prepend-path=%p/.. %t/basic.macho.x86_64 %t/basic-archive.macho.x86_64 %t/basic-lto.macho.x86_64 %t/basic-lto-dw4.macho.x86_64
RUN: llvm-dwarfdump -a %t/basic.macho.x86_64.dwarf \
RUN: | FileCheck %S/basic-linking-x86.test --check-prefix=CHECK --check-prefix=BASIC
RUN: llvm-dwarfdump -a %t/basic-archive.macho.x86_64.dwarf \
Expand All @@ -16,7 +16,7 @@ RUN: llvm-dwarfdump -a %t/basic-lto.macho.x86_64.dwarf | FileCheck %S/basic-lto-
RUN: llvm-dwarfdump -a %t/basic-lto-dw4.macho.x86_64.dwarf | FileCheck %S/basic-lto-dw4-linking-x86.test

# Multiple inputs that end up in the same named bundle
RUN: llvm-dsymutil -oso-prepend-path=%p/.. %t/basic.macho.x86_64 %t/basic-archive.macho.x86_64 %t/basic-lto.macho.x86_64 %t/basic-lto-dw4.macho.x86_64 -o %t.dSYM
RUN: dsymutil -oso-prepend-path=%p/.. %t/basic.macho.x86_64 %t/basic-archive.macho.x86_64 %t/basic-lto.macho.x86_64 %t/basic-lto-dw4.macho.x86_64 -o %t.dSYM
RUN: llvm-dwarfdump -a %t.dSYM/Contents/Resources/DWARF/basic.macho.x86_64 \
RUN: | FileCheck %S/basic-linking-x86.test --check-prefix=CHECK --check-prefix=BASIC
RUN: llvm-dwarfdump -a %t.dSYM/Contents/Resources/DWARF/basic-archive.macho.x86_64 \
Expand All @@ -25,7 +25,7 @@ RUN: llvm-dwarfdump -a %t.dSYM/Contents/Resources/DWARF/basic-lto.macho.x86_64 |
RUN: llvm-dwarfdump -a %t.dSYM/Contents/Resources/DWARF/basic-lto-dw4.macho.x86_64 | FileCheck %S/basic-lto-dw4-linking-x86.test

# Multiple inputs in a named bundle in flat mode... impossible.
RUN: not llvm-dsymutil -f -oso-prepend-path=%p/.. %t/basic.macho.x86_64 %t/basic-archive.macho.x86_64 %t/basic-lto.macho.x86_64 %t/basic-lto-dw4.macho.x86_64 -o %t.dSYM 2>&1 | FileCheck %s
RUN: not dsymutil -f -oso-prepend-path=%p/.. %t/basic.macho.x86_64 %t/basic-archive.macho.x86_64 %t/basic-lto.macho.x86_64 %t/basic-lto-dw4.macho.x86_64 -o %t.dSYM 2>&1 | FileCheck %s

CHECK: error: cannot use -o with multiple inputs in flat mode

2 changes: 1 addition & 1 deletion llvm/test/tools/dsymutil/X86/objc.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
RUN: llvm-dsymutil -f -oso-prepend-path=%p/.. %p/../Inputs/objc.macho.x86_64 -o - \
RUN: dsymutil -f -oso-prepend-path=%p/.. %p/../Inputs/objc.macho.x86_64 -o - \
RUN: | llvm-dwarfdump -apple-types -apple-objc - | FileCheck %s

CHECK: .apple_types contents:
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/tools/dsymutil/X86/odr-anon-namespace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
done
*/

// RUN: llvm-dsymutil -f -oso-prepend-path=%p/../Inputs/odr-anon-namespace -y %p/dummy-debug-map.map -o - | llvm-dwarfdump -debug-info - | FileCheck %s
// RUN: dsymutil -f -oso-prepend-path=%p/../Inputs/odr-anon-namespace -y %p/dummy-debug-map.map -o - | llvm-dwarfdump -debug-info - | FileCheck %s

#ifdef FILE1
// Currently llvm-dsymutil will unique the contents of anonymous
// Currently dsymutil will unique the contents of anonymous
// namespaces if they are from the same file/line. Force this
// namespace to appear different eventhough it's the same (this
// uniquing is actually a bug kept for backward compatibility, see the
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/tools/dsymutil/X86/odr-fwd-declaration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
done
*/

// RUN: llvm-dsymutil -f -oso-prepend-path=%p/../Inputs/odr-fwd-declaration -y %p/dummy-debug-map.map -o - | llvm-dwarfdump -v -debug-info - | FileCheck %s
// RUN: dsymutil -f -oso-prepend-path=%p/../Inputs/odr-fwd-declaration -y %p/dummy-debug-map.map -o - | llvm-dwarfdump -v -debug-info - | FileCheck %s

#ifdef FILE1
# 1 "Header.h" 1
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/tools/dsymutil/X86/odr-fwd-declaration2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
done
*/

// RUN: llvm-dsymutil -f -oso-prepend-path=%p/../Inputs/odr-fwd-declaration2 -y %p/dummy-debug-map.map -o - | llvm-dwarfdump -v -debug-info - | FileCheck %s
// RUN: dsymutil -f -oso-prepend-path=%p/../Inputs/odr-fwd-declaration2 -y %p/dummy-debug-map.map -o - | llvm-dwarfdump -v -debug-info - | FileCheck %s

#ifdef FILE1
# 1 "Header.h" 1
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/tools/dsymutil/X86/odr-member-functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
done
*/

// RUN: llvm-dsymutil -f -oso-prepend-path=%p/../Inputs/odr-member-functions -y %p/dummy-debug-map.map -o - | llvm-dwarfdump -debug-info - | FileCheck %s
// RUN: dsymutil -f -oso-prepend-path=%p/../Inputs/odr-member-functions -y %p/dummy-debug-map.map -o - | llvm-dwarfdump -debug-info - | FileCheck %s

struct S {
__attribute__((always_inline)) void foo() { bar(); }
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/tools/dsymutil/X86/odr-uniquing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
- without ODR uniquing: all types are re-emited in the second CU
*/

// RUN: llvm-dsymutil -f -oso-prepend-path=%p/../Inputs/odr-uniquing -y %p/dummy-debug-map.map -o - | llvm-dwarfdump -v -debug-info - | FileCheck -check-prefix=ODR -check-prefix=CHECK %s
// RUN: llvm-dsymutil -f -oso-prepend-path=%p/../Inputs/odr-uniquing -y %p/dummy-debug-map.map -no-odr -o - | llvm-dwarfdump -v -debug-info - | FileCheck -check-prefix=NOODR -check-prefix=CHECK %s
// RUN: dsymutil -f -oso-prepend-path=%p/../Inputs/odr-uniquing -y %p/dummy-debug-map.map -o - | llvm-dwarfdump -v -debug-info - | FileCheck -check-prefix=ODR -check-prefix=CHECK %s
// RUN: dsymutil -f -oso-prepend-path=%p/../Inputs/odr-uniquing -y %p/dummy-debug-map.map -no-odr -o - | llvm-dwarfdump -v -debug-info - | FileCheck -check-prefix=NOODR -check-prefix=CHECK %s

// The first compile unit contains all the types:
// CHECK: TAG_compile_unit
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/tools/dsymutil/X86/submodules.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
-fdisable-module-hash submodules.m -o 1.o
*/

// RUN: llvm-dsymutil -f -oso-prepend-path=%p/../Inputs/submodules \
// RUN: dsymutil -f -oso-prepend-path=%p/../Inputs/submodules \
// RUN: -y %p/dummy-debug-map.map -o - \
// RUN: | llvm-dwarfdump -v --debug-info - | FileCheck %s

Expand Down
4 changes: 2 additions & 2 deletions llvm/test/tools/dsymutil/X86/swift-ast-x86_64.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
RUN: llvm-dsymutil -oso-prepend-path %p/.. %p/../Inputs/swift-ast.macho.x86_64 -o %T/swift-ast.dSYM -verbose -no-swiftmodule-timestamp | FileCheck %s --check-prefix=DSYMUTIL
RUN: dsymutil -oso-prepend-path %p/.. %p/../Inputs/swift-ast.macho.x86_64 -o %T/swift-ast.dSYM -verbose -no-swiftmodule-timestamp | FileCheck %s --check-prefix=DSYMUTIL
RUN: llvm-readobj -sections -section-data %T/swift-ast.dSYM/Contents/Resources/DWARF/swift-ast.macho.x86_64 | FileCheck %s --check-prefix=READOBJ

The tested object file has been created by the dummy Swift code:
Expand All @@ -15,5 +15,5 @@ READOBJ: Name:{{.*}}__swift_ast
READOBJ: |SWIFTMODULE DATA|
READOBJ-NEXT: |.|

RUN: llvm-dsymutil -oso-prepend-path %p/.. %p/../Inputs/swift-ast.macho.x86_64 -no-output -verbose 2>&1 | FileCheck %s --check-prefix=TIMESTAMP
RUN: dsymutil -oso-prepend-path %p/.. %p/../Inputs/swift-ast.macho.x86_64 -no-output -verbose 2>&1 | FileCheck %s --check-prefix=TIMESTAMP
TIMESTAMP: warning: Timestamp mismatch
2 changes: 1 addition & 1 deletion llvm/test/tools/dsymutil/X86/swift-dwarf-loc.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
RUN: llvm-dsymutil -oso-prepend-path %p/../Inputs %p/../Inputs/swift-dwarf-loc.macho.x86_64 -no-output -verbose | FileCheck %s
RUN: dsymutil -oso-prepend-path %p/../Inputs %p/../Inputs/swift-dwarf-loc.macho.x86_64 -no-output -verbose | FileCheck %s

This test checks that dsymutil generates a valid dwarf location for a symbol with no flags set.

Expand Down
4 changes: 2 additions & 2 deletions llvm/test/tools/dsymutil/X86/update-one-CU.test
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
UNSUPPORTED: system-windows
Remove UNSUPPORTED once we figure out why this fails on Windows.

RUN: llvm-dsymutil -oso-prepend-path=%p/.. %p/../Inputs/objc.macho.x86_64 -o %t.dSYM
RUN: llvm-dsymutil -update %t.dSYM
RUN: dsymutil -oso-prepend-path=%p/.. %p/../Inputs/objc.macho.x86_64 -o %t.dSYM
RUN: dsymutil -update %t.dSYM
RUN: llvm-dwarfdump -apple-types -apple-objc %t.dSYM | FileCheck %s

CHECK: .apple_types contents:
Expand Down
12 changes: 6 additions & 6 deletions llvm/test/tools/dsymutil/X86/update.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ Remove UNSUPPORTED once we figure out why this fails on Windows.
RUN: rm -rf %t.dir
RUN: mkdir -p %t.dir
RUN: cat %p/../Inputs/basic.macho.x86_64 > %t.dir/basic
RUN: llvm-dsymutil -oso-prepend-path=%p/.. %t.dir/basic
RUN: dsymutil -oso-prepend-path=%p/.. %t.dir/basic
RUN: llvm-dwarfdump -a %t.dir/basic.dSYM | FileCheck %S/basic-linking-x86.test
RUN: llvm-dsymutil --update %t.dir/basic.dSYM
RUN: dsymutil --update %t.dir/basic.dSYM
RUN: llvm-dwarfdump -a %t.dir/basic.dSYM | FileCheck %S/basic-linking-x86.test
RUN: llvm-dsymutil -u %t.dir/basic.dSYM
RUN: dsymutil -u %t.dir/basic.dSYM
RUN: llvm-dwarfdump -a %t.dir/basic.dSYM | FileCheck %S/basic-linking-x86.test
RUN: llvm-dsymutil --update %t.dir/basic.dSYM -o %t.dir/updated.dSYM
RUN: dsymutil --update %t.dir/basic.dSYM -o %t.dir/updated.dSYM
RUN: llvm-dwarfdump -a %t.dir/updated.dSYM | FileCheck %S/basic-linking-x86.test

RUN: llvm-dsymutil -f -o %t2 -oso-prepend-path=%p/.. %p/../Inputs/basic.macho.x86_64
RUN: llvm-dsymutil -f -u %t2 -o %t3
RUN: dsymutil -f -o %t2 -oso-prepend-path=%p/.. %p/../Inputs/basic.macho.x86_64
RUN: dsymutil -f -u %t2 -o %t3
RUN: llvm-dwarfdump -a %t3 | FileCheck %S/basic-linking-x86.test
8 changes: 4 additions & 4 deletions llvm/test/tools/dsymutil/X86/verify.test
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Positive tests in regular and verbose mode.
# RUN: llvm-dsymutil -verify -oso-prepend-path=%p/.. %p/../Inputs/basic.macho.x86_64 %p/../Inputs/basic-archive.macho.x86_64 %p/../Inputs/basic-lto.macho.x86_64 %p/../Inputs/basic-lto-dw4.macho.x86_64 -o %t 2>&1 | FileCheck %s --allow-empty --check-prefix=QUIET-SUCCESS
# RUN: llvm-dsymutil -verify -verbose -oso-prepend-path=%p/.. %p/../Inputs/basic.macho.x86_64 %p/../Inputs/basic-archive.macho.x86_64 %p/../Inputs/basic-lto.macho.x86_64 %p/../Inputs/basic-lto-dw4.macho.x86_64 -o %t 2>&1 | FileCheck %s --check-prefix=QUIET-SUCCESS --check-prefix=VERBOSE
# RUN: dsymutil -verify -oso-prepend-path=%p/.. %p/../Inputs/basic.macho.x86_64 %p/../Inputs/basic-archive.macho.x86_64 %p/../Inputs/basic-lto.macho.x86_64 %p/../Inputs/basic-lto-dw4.macho.x86_64 -o %t 2>&1 | FileCheck %s --allow-empty --check-prefix=QUIET-SUCCESS
# RUN: dsymutil -verify -verbose -oso-prepend-path=%p/.. %p/../Inputs/basic.macho.x86_64 %p/../Inputs/basic-archive.macho.x86_64 %p/../Inputs/basic-lto.macho.x86_64 %p/../Inputs/basic-lto-dw4.macho.x86_64 -o %t 2>&1 | FileCheck %s --check-prefix=QUIET-SUCCESS --check-prefix=VERBOSE

# VERBOSE: Verifying DWARF for architecture: x86_64
# QUIET-SUCCESS-NOT: error: verification failed

# Negative tests in regular and verbose mode.
# (Invalid object generated from ../Inputs/invalid.s by modified the low PC.)
# RUN: not llvm-dsymutil -verify -oso-prepend-path=%p/../Inputs -y %s -o %t 2>&1 | FileCheck %s --check-prefix=QUIET-FAIL
# RUN: not llvm-dsymutil -verify -verbose -oso-prepend-path=%p/../Inputs -y %s -o %t 2>&1 | FileCheck %s --check-prefix=QUIET-FAIL --check-prefix=VERBOSE
# RUN: not dsymutil -verify -oso-prepend-path=%p/../Inputs -y %s -o %t 2>&1 | FileCheck %s --check-prefix=QUIET-FAIL
# RUN: not dsymutil -verify -verbose -oso-prepend-path=%p/../Inputs -y %s -o %t 2>&1 | FileCheck %s --check-prefix=QUIET-FAIL --check-prefix=VERBOSE

# QUIET-FAIL: error: verification failed

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/tools/dsymutil/absolute_symbol.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
RUN: llvm-dsymutil -dump-debug-map -oso-prepend-path %p %p/Inputs/absolute_sym.macho.i386 | FileCheck %s
RUN: dsymutil -dump-debug-map -oso-prepend-path %p %p/Inputs/absolute_sym.macho.i386 | FileCheck %s

The tested object file has been created by the dummy Objective-C code:
@interface Foo
Expand Down
18 changes: 9 additions & 9 deletions llvm/test/tools/dsymutil/arch-option.test
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
Processing of the -arch option happens at debug map parsing time, thus just
looking at the dumped debug maps is enough to validate their effects.

RUN: llvm-dsymutil -oso-prepend-path %p -dump-debug-map %p/Inputs/fat-test.arm.dylib | FileCheck %s -check-prefix=ARM64 -check-prefix=ARMV7S -check-prefix=ARMV7 -check-prefix=CHECK
RUN: llvm-dsymutil -oso-prepend-path %p -dump-debug-map %p/Inputs/fat-test.arm.dylib -arch all | FileCheck %s -check-prefix=ARM64 -check-prefix=ARMV7S -check-prefix=ARMV7 -check-prefix=CHECK
RUN: llvm-dsymutil -oso-prepend-path %p -dump-debug-map %p/Inputs/fat-test.arm.dylib -arch='*' | FileCheck %s -check-prefix=ARM64 -check-prefix=ARMV7S -check-prefix=ARMV7 -check-prefix=CHECK
RUN: llvm-dsymutil -oso-prepend-path %p -dump-debug-map %p/Inputs/fat-test.arm.dylib -arch arm64 | FileCheck %s -check-prefix=ARM64 -check-prefix=CHECK
RUN: llvm-dsymutil -oso-prepend-path %p -dump-debug-map %p/Inputs/fat-test.arm.dylib -arch arm | FileCheck %s -check-prefix=ARMV7S -check-prefix=ARMV7 -check-prefix=CHECK
RUN: llvm-dsymutil -oso-prepend-path %p -dump-debug-map %p/Inputs/fat-test.arm.dylib -arch armv7 | FileCheck %s -check-prefix=ARMV7 -check-prefix=CHECK
RUN: llvm-dsymutil -oso-prepend-path %p -dump-debug-map %p/Inputs/fat-test.arm.dylib -arch arm64 -arch armv7s | FileCheck %s -check-prefix=ARM64 -check-prefix=ARMV7S -check-prefix=CHECK
RUN: not llvm-dsymutil -oso-prepend-path %p -dump-debug-map %p/Inputs/fat-test.arm.dylib -arch arm42 2>&1 | FileCheck %s -check-prefix=BADARCH
RUN: not llvm-dsymutil -oso-prepend-path %p -dump-debug-map %p/Inputs/fat-test.arm.dylib -arch i386 2>&1 | FileCheck %s -check-prefix=EMPTY
RUN: dsymutil -oso-prepend-path %p -dump-debug-map %p/Inputs/fat-test.arm.dylib | FileCheck %s -check-prefix=ARM64 -check-prefix=ARMV7S -check-prefix=ARMV7 -check-prefix=CHECK
RUN: dsymutil -oso-prepend-path %p -dump-debug-map %p/Inputs/fat-test.arm.dylib -arch all | FileCheck %s -check-prefix=ARM64 -check-prefix=ARMV7S -check-prefix=ARMV7 -check-prefix=CHECK
RUN: dsymutil -oso-prepend-path %p -dump-debug-map %p/Inputs/fat-test.arm.dylib -arch='*' | FileCheck %s -check-prefix=ARM64 -check-prefix=ARMV7S -check-prefix=ARMV7 -check-prefix=CHECK
RUN: dsymutil -oso-prepend-path %p -dump-debug-map %p/Inputs/fat-test.arm.dylib -arch arm64 | FileCheck %s -check-prefix=ARM64 -check-prefix=CHECK
RUN: dsymutil -oso-prepend-path %p -dump-debug-map %p/Inputs/fat-test.arm.dylib -arch arm | FileCheck %s -check-prefix=ARMV7S -check-prefix=ARMV7 -check-prefix=CHECK
RUN: dsymutil -oso-prepend-path %p -dump-debug-map %p/Inputs/fat-test.arm.dylib -arch armv7 | FileCheck %s -check-prefix=ARMV7 -check-prefix=CHECK
RUN: dsymutil -oso-prepend-path %p -dump-debug-map %p/Inputs/fat-test.arm.dylib -arch arm64 -arch armv7s | FileCheck %s -check-prefix=ARM64 -check-prefix=ARMV7S -check-prefix=CHECK
RUN: not dsymutil -oso-prepend-path %p -dump-debug-map %p/Inputs/fat-test.arm.dylib -arch arm42 2>&1 | FileCheck %s -check-prefix=BADARCH
RUN: not dsymutil -oso-prepend-path %p -dump-debug-map %p/Inputs/fat-test.arm.dylib -arch i386 2>&1 | FileCheck %s -check-prefix=EMPTY


ARMV7: ---
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/tools/dsymutil/archive-timestamp.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RUN: llvm-dsymutil -no-output -oso-prepend-path=%p -y %s 2>&1 | FileCheck %s
# RUN: dsymutil -no-output -oso-prepend-path=%p -y %s 2>&1 | FileCheck %s

# This is the archive member part of basic-archive.macho.x86_64 debug map with corrupted timestamps.

Expand Down
8 changes: 4 additions & 4 deletions llvm/test/tools/dsymutil/basic-linking.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
RUN: llvm-dsymutil -no-output -verbose -oso-prepend-path=%p %p/Inputs/basic.macho.x86_64 | FileCheck %s
RUN: llvm-dsymutil -no-output -verbose -oso-prepend-path=%p %p/Inputs/basic-lto.macho.x86_64 | FileCheck %s --check-prefix=CHECK-LTO
RUN: llvm-dsymutil -no-output -verbose -oso-prepend-path=%p %p/Inputs/basic-archive.macho.x86_64 | FileCheck %s --check-prefix=CHECK-ARCHIVE
RUN: llvm-dsymutil -no-output -verbose -oso-prepend-path=%p %p/Inputs/basic.macho.x86_64 %p/Inputs/basic-lto.macho.x86_64 %p/Inputs/basic-archive.macho.x86_64 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-LTO --check-prefix=CHECK-ARCHIVE
RUN: dsymutil -no-output -verbose -oso-prepend-path=%p %p/Inputs/basic.macho.x86_64 | FileCheck %s
RUN: dsymutil -no-output -verbose -oso-prepend-path=%p %p/Inputs/basic-lto.macho.x86_64 | FileCheck %s --check-prefix=CHECK-LTO
RUN: dsymutil -no-output -verbose -oso-prepend-path=%p %p/Inputs/basic-archive.macho.x86_64 | FileCheck %s --check-prefix=CHECK-ARCHIVE
RUN: dsymutil -no-output -verbose -oso-prepend-path=%p %p/Inputs/basic.macho.x86_64 %p/Inputs/basic-lto.macho.x86_64 %p/Inputs/basic-archive.macho.x86_64 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-LTO --check-prefix=CHECK-ARCHIVE

This test check the basic Dwarf linking process through the debug dumps.

Expand Down
6 changes: 3 additions & 3 deletions llvm/test/tools/dsymutil/cmdline.test
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
RUN: llvm-dsymutil -help 2>&1 | FileCheck --check-prefix=HELP %s
RUN: dsymutil -help 2>&1 | FileCheck --check-prefix=HELP %s
HELP: OVERVIEW: manipulate archived DWARF debug symbol files.
HELP: USAGE: llvm-dsymutil{{[^ ]*}} [options] <input files>
HELP: USAGE: dsymutil{{[^ ]*}} [options] <input files>
HELP-NOT: -reverse-iterate
HELP: Specific Options:
HELP: -arch=<arch>
Expand All @@ -21,5 +21,5 @@ HELP: -verify
HELP: -y
HELP-NOT: -reverse-iterate

RUN: llvm-dsymutil --version 2>&1 | FileCheck --check-prefix=VERSION %s
RUN: dsymutil --version 2>&1 | FileCheck --check-prefix=VERSION %s
VERSION: {{ version }}
10 changes: 5 additions & 5 deletions llvm/test/tools/dsymutil/debug-map-parsing.test
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
RUN: llvm-dsymutil -dump-debug-map -oso-prepend-path=%p %p/Inputs/basic.macho.x86_64 | FileCheck %s
RUN: llvm-dsymutil -dump-debug-map -oso-prepend-path=%p %p/Inputs/basic-lto.macho.x86_64 | FileCheck %s --check-prefix=CHECK-LTO
RUN: llvm-dsymutil -verbose -dump-debug-map -oso-prepend-path=%p %p/Inputs/basic-archive.macho.x86_64 | FileCheck %s --check-prefix=CHECK-ARCHIVE
RUN: llvm-dsymutil -dump-debug-map %p/Inputs/basic.macho.x86_64 2>&1 | FileCheck %s --check-prefix=NOT-FOUND
RUN: not llvm-dsymutil -dump-debug-map %p/Inputs/inexistant 2>&1 | FileCheck %s --check-prefix=NO-EXECUTABLE
RUN: dsymutil -dump-debug-map -oso-prepend-path=%p %p/Inputs/basic.macho.x86_64 | FileCheck %s
RUN: dsymutil -dump-debug-map -oso-prepend-path=%p %p/Inputs/basic-lto.macho.x86_64 | FileCheck %s --check-prefix=CHECK-LTO
RUN: dsymutil -verbose -dump-debug-map -oso-prepend-path=%p %p/Inputs/basic-archive.macho.x86_64 | FileCheck %s --check-prefix=CHECK-ARCHIVE
RUN: dsymutil -dump-debug-map %p/Inputs/basic.macho.x86_64 2>&1 | FileCheck %s --check-prefix=NOT-FOUND
RUN: not dsymutil -dump-debug-map %p/Inputs/inexistant 2>&1 | FileCheck %s --check-prefix=NO-EXECUTABLE


Check that We can parse the debug map of the basic executable.
Expand Down
6 changes: 3 additions & 3 deletions llvm/test/tools/dsymutil/dump-symtab.test
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
RUN: llvm-dsymutil -s %p/Inputs/fat-test.dylib | FileCheck -check-prefix=ALL -check-prefix=I386 %s
RUN: llvm-dsymutil -arch i386 -s %p/Inputs/fat-test.dylib | FileCheck -check-prefix=I386 -check-prefix=ONE %s
RUN: dsymutil -s %p/Inputs/fat-test.dylib | FileCheck -check-prefix=ALL -check-prefix=I386 %s
RUN: dsymutil -arch i386 -s %p/Inputs/fat-test.dylib | FileCheck -check-prefix=I386 -check-prefix=ONE %s


ALL: ----------------------------------------------------------------------
Expand Down Expand Up @@ -41,4 +41,4 @@ ALL-NEXT: [ 2] 00000016 66 (N_OSO ) 08 0001 0000000055b1d0b9 '
ALL-NEXT: [ 3] 00000029 20 (N_GSYM ) 00 0000 0000000000000000 '_x86_64h_var'
ALL-NEXT: [ 4] 00000001 64 (N_SO ) 01 0000 0000000000000000
ALL-NEXT: [ 5] 00000036 0f ( SECT EXT) 02 0000 0000000000001000 '_x86_64h_var'
ALL-NEXT: [ 6] 00000043 01 ( UNDF EXT) 00 0100 0000000000000000 'dyld_stub_binder'
ALL-NEXT: [ 6] 00000043 01 ( UNDF EXT) 00 0100 0000000000000000 'dyld_stub_binder'
2 changes: 1 addition & 1 deletion llvm/test/tools/dsymutil/fat-binary-output.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
RUN: llvm-dsymutil -f -verbose -no-output %p/Inputs/fat-test.dylib -oso-prepend-path %p | FileCheck %s
RUN: dsymutil -f -verbose -no-output %p/Inputs/fat-test.dylib -oso-prepend-path %p | FileCheck %s

This test doesn't produce any filesytstem output, we just look at the verbose
log output.
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/tools/dsymutil/null-die.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#RUN: llvm-dsymutil -f -oso-prepend-path=%p/Inputs/ -y %s -no-output 2>&1 \
#RUN: dsymutil -f -oso-prepend-path=%p/Inputs/ -y %s -no-output 2>&1 \
#RUN: | FileCheck %s

# CHECK: warning: could not find referenced DIE
Expand Down Expand Up @@ -26,7 +26,7 @@
# To generate the debug map:
#
# $ ld -arch x86_64 -macosx_version_min 10.13.0 -lSystem null_die.o -o null_die
# $ llvm-dsymutil -dump-debug-map null_die
# $ dsymutil -dump-debug-map null_die

---
triple: 'x86_64-apple-darwin'
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/tools/dsymutil/yaml-object-address-rewrite.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RUN: llvm-dsymutil -dump-debug-map -oso-prepend-path=%p -y %s | FileCheck %s
# RUN: dsymutil -dump-debug-map -oso-prepend-path=%p -y %s | FileCheck %s
#
# The YAML debug map bellow is the one from basic-archive.macho.x86_64 with
# the object addresses set to zero. Check that the YAML import is able to
Expand Down
6 changes: 3 additions & 3 deletions llvm/tools/dsymutil/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set(LLVM_LINK_COMPONENTS
Target
)

add_llvm_tool(llvm-dsymutil
add_llvm_tool(dsymutil
dsymutil.cpp
BinaryHolder.cpp
CFBundle.cpp
Expand All @@ -23,10 +23,10 @@ add_llvm_tool(llvm-dsymutil
)

if(APPLE)
target_link_libraries(llvm-dsymutil PRIVATE "-framework CoreFoundation")
target_link_libraries(dsymutil PRIVATE "-framework CoreFoundation")
endif(APPLE)

if(LLVM_INSTALL_CCTOOLS_SYMLINKS)
add_llvm_tool_symlink(dsymutil llvm-dsymutil)
add_llvm_tool_symlink(dsymutil dsymutil)
endif()

9 changes: 4 additions & 5 deletions llvm/tools/dsymutil/DebugMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,10 @@ MappingTraits<dsymutil::DebugMapObject>::YamlDMO::denormalize(IO &IO) {
if (auto EC = ErrOrObjectFiles.getError()) {
warn_ostream() << "Unable to open " << Path << " " << EC.message() << '\n';
} else if (auto ErrOrObjectFile = BinHolder.Get(Ctxt.BinaryTriple)) {
// Rewrite the object file symbol addresses in the debug map. The
// YAML input is mainly used to test llvm-dsymutil without
// requiring binaries checked-in. If we generate the object files
// during the test, we can't hard-code the symbols addresses, so
// look them up here and rewrite them.
// Rewrite the object file symbol addresses in the debug map. The YAML
// input is mainly used to test dsymutil without requiring binaries
// checked-in. If we generate the object files during the test, we can't
// hard-code the symbols addresses, so look them up here and rewrite them.
for (const auto &Sym : ErrOrObjectFile->symbols()) {
uint64_t Address = Sym.getValue();
Expected<StringRef> Name = Sym.getName();
Expand Down
2 changes: 1 addition & 1 deletion llvm/tools/dsymutil/LLVMBuild.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@

[component_0]
type = Tool
name = llvm-dsymutil
name = dsymutil
parent = Tools
required_libraries = AsmPrinter DebugInfoDWARF MC Object Support all-targets