summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/tools/dsymutil/X86/basic-linking-x86.test15
-rw-r--r--llvm/test/tools/dsymutil/X86/update-one-CU.test35
-rw-r--r--llvm/test/tools/dsymutil/cmdline.test1
3 files changed, 51 insertions, 0 deletions
diff --git a/llvm/test/tools/dsymutil/X86/basic-linking-x86.test b/llvm/test/tools/dsymutil/X86/basic-linking-x86.test
index d9b0ee9b10f..4e6c6f668db 100644
--- a/llvm/test/tools/dsymutil/X86/basic-linking-x86.test
+++ b/llvm/test/tools/dsymutil/X86/basic-linking-x86.test
@@ -8,6 +8,21 @@ RUN: llvm-dsymutil -f -o - -oso-prepend-path=%p/.. %p/../Inputs/basic-archive.ma
RUN: llvm-dsymutil -dump-debug-map -oso-prepend-path=%p/.. %p/../Inputs/basic.macho.x86_64 | llvm-dsymutil -f -y -o - - | llvm-dwarfdump -a - | FileCheck %s --check-prefix=CHECK --check-prefix=BASIC
RUN: llvm-dsymutil -dump-debug-map -oso-prepend-path=%p/.. %p/../Inputs/basic-archive.macho.x86_64 | llvm-dsymutil -f -o - -y - | llvm-dwarfdump -a - | FileCheck %s --check-prefix=CHECK --check-prefix=ARCHIVE
+# Update tests
+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: llvm-dwarfdump -a %t.dir/basic.dSYM/Contents/Resources/DWARF/basic | FileCheck %s
+RUN: llvm-dsymutil --update %t.dir/basic.dSYM
+RUN: llvm-dwarfdump -a %t.dir/basic.dSYM/Contents/Resources/DWARF/basic | FileCheck %s
+RUN: llvm-dsymutil -u %t.dir/basic.dSYM
+RUN: llvm-dwarfdump -a %t.dir/basic.dSYM/Contents/Resources/DWARF/basic | FileCheck %s
+RUN: llvm-dsymutil --update %t.dir/basic.dSYM -o %t.dir/updated.dSYM
+RUN: llvm-dwarfdump -a %t.dir/updated.dSYM/Contents/Resources/DWARF/basic | FileCheck %s
+RUN: llvm-dsymutil -f -u %t2 -o %t3
+RUN: llvm-dwarfdump -a %t3 | FileCheck %s
+
CHECK: file format Mach-O 64-bit x86-64
CHECK: debug_info contents
diff --git a/llvm/test/tools/dsymutil/X86/update-one-CU.test b/llvm/test/tools/dsymutil/X86/update-one-CU.test
new file mode 100644
index 00000000000..aec9b2f44f1
--- /dev/null
+++ b/llvm/test/tools/dsymutil/X86/update-one-CU.test
@@ -0,0 +1,35 @@
+RUN: llvm-dsymutil -oso-prepend-path=%p/.. %p/../Inputs/objc.macho.x86_64 -o %t.dSYM
+RUN: llvm-dsymutil -update %t.dSYM
+RUN: llvm-dwarfdump -apple-types -apple-objc %t.dSYM/Contents/Resources/DWARF/objc.macho.x86_64 | FileCheck %s
+
+CHECK: .apple_types contents:
+CHECK: Hash 0x2b5e6 [
+CHECK-NEXT: Name@0x145 {
+CHECK-NEXT: String: 0x00000066 "A"
+CHECK-NEXT: Data 0 [
+CHECK-NEXT: Atom[0]: 0x0000012d
+CHECK-NEXT: Atom[1]: 0x0013
+CHECK-NEXT: Atom[2]: 0x02
+CHECK-NEXT: Atom[3]: 0x0b87b15a
+CHECK-NEXT: ]
+CHECK-NEXT: }
+CHECK-NEXT: ]
+
+CHECK: .apple_objc contents:
+CHECK: Hash 0x2b5e6
+CHECK-NEXT: Name@0x38 {
+CHECK-NEXT: String: 0x00000066 "A"
+CHECK-NEXT: Data 0 [
+CHECK-NEXT: Atom[0]: 0x00000027
+CHECK-NEXT: ]
+CHECK-NEXT: Data 1 [
+CHECK-NEXT: Atom[0]: 0x0000007a
+CHECK-NEXT: ]
+CHECK-NEXT: }
+CHECK: Hash 0x3fa0f4b5
+CHECK-NEXT: Name@0x4c {
+CHECK-NEXT: String: 0x0000009d "A(Category)"
+CHECK-NEXT: Data 0 [
+CHECK-NEXT: Atom[0]: 0x0000007a
+CHECK-NEXT: ]
+CHECK-NEXT: }
diff --git a/llvm/test/tools/dsymutil/cmdline.test b/llvm/test/tools/dsymutil/cmdline.test
index 561f3718ef2..d246a14d32e 100644
--- a/llvm/test/tools/dsymutil/cmdline.test
+++ b/llvm/test/tools/dsymutil/cmdline.test
@@ -14,6 +14,7 @@ HELP: -num-threads=<n>
HELP: -o=<filename>
HELP: -oso-prepend-path=<path>
HELP: -symtab
+HELP: -update
HELP: -verbose
HELP: -verify
HELP: -y
OpenPOWER on IntegriCloud