[PATCH] D90312: [llvm-objdump][test] - Stop using precompiled binary in MachO/disassemble-g-dsym.test
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 29 00:06:44 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG4d11daa659a1: [llvm-objdump][test] - Stop using precompiled binary in MachO/disassemble-g… (authored by grimar).
Changed prior to commit:
https://reviews.llvm.org/D90312?vs=301290&id=301527#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90312/new/
https://reviews.llvm.org/D90312
Files:
llvm/test/tools/llvm-objdump/Inputs/libbogus11.a
llvm/test/tools/llvm-objdump/MachO/disassemble-g-dsym.test
Index: llvm/test/tools/llvm-objdump/MachO/disassemble-g-dsym.test
===================================================================
--- llvm/test/tools/llvm-objdump/MachO/disassemble-g-dsym.test
+++ llvm/test/tools/llvm-objdump/MachO/disassemble-g-dsym.test
@@ -1,17 +1,36 @@
-// RUN: dsymutil -f -oso-prepend-path=%p/../../dsymutil/ %p/../../dsymutil/Inputs/basic.macho.x86_64 -o %t1.dSYM
-// RUN: llvm-objdump -d -g --dsym=%t1.dSYM %p/../../dsymutil/Inputs/basic.macho.x86_64 >%t0
-// RUN: llvm-objdump -dg --dsym=%t1.dSYM %p/../../dsymutil/Inputs/basic.macho.x86_64 >%t1
-// RUN: cmp %t0 %t1
-// RUN: FileCheck --input-file %t0 %s
+# RUN: dsymutil -f -oso-prepend-path=%p/../../dsymutil/ %p/../../dsymutil/Inputs/basic.macho.x86_64 -o %t1.dSYM
+# RUN: llvm-objdump -d -g --dsym=%t1.dSYM %p/../../dsymutil/Inputs/basic.macho.x86_64 >%t0
+# RUN: llvm-objdump -dg --dsym=%t1.dSYM %p/../../dsymutil/Inputs/basic.macho.x86_64 >%t1
+# RUN: cmp %t0 %t1
+# RUN: FileCheck --input-file %t0 %s
-CHECK: Disassembly of section __TEXT,__text:
+# CHECK: Disassembly of section __TEXT,__text:
-// RUN: llvm-objdump --macho -d -g --dsym %p/Inputs/hello-macho-fat.dwarf %p/Inputs/hello-macho-fat | FileCheck --check-prefix MACHO_DSYM %s
-// RUN: llvm-objdump --macho -d -g --dsym %p/Inputs/hello-macho-fat.dwarf %p/Inputs/hello-macho-thin | FileCheck --check-prefix MACHO_DSYM %s
-// RUN: llvm-objdump --macho -d -g --dsym %p/Inputs/hello-macho-thin.dwarf %p/Inputs/hello-macho-thin | FileCheck --check-prefix MACHO_DSYM %s
+# RUN: llvm-objdump --macho -d -g --dsym %p/Inputs/hello-macho-fat.dwarf %p/Inputs/hello-macho-fat | FileCheck --check-prefix MACHO_DSYM %s
+# RUN: llvm-objdump --macho -d -g --dsym %p/Inputs/hello-macho-fat.dwarf %p/Inputs/hello-macho-thin | FileCheck --check-prefix MACHO_DSYM %s
+# RUN: llvm-objdump --macho -d -g --dsym %p/Inputs/hello-macho-thin.dwarf %p/Inputs/hello-macho-thin | FileCheck --check-prefix MACHO_DSYM %s
-MACHO_DSYM: (__TEXT,__text) section
+# MACHO_DSYM: (__TEXT,__text) section
-// RUN: llvm-objdump --macho -d -g --dsym %p/../Inputs/libbogus11.a %p/../../dsymutil/Inputs/basic.macho.x86_64 2>&1 | FileCheck --check-prefix BAD_INPUT %s
+## Check that we report an error when .dSYM file is a valid object, which is
+## neither a Mach-O object nor Universal binary.
-BAD_INPUT: is not a Mach-O or Universal file type.
+# RUN: yaml2obj --docnum=1 %s -o %t.a
+# RUN: llvm-objdump --macho -d -g --dsym %t.a %p/../../dsymutil/Inputs/basic.macho.x86_64 2>&1 | \
+# RUN: FileCheck -DDSYMFILE=%t.a --check-prefix=BAD_INPUT_AR %s
+
+# RUN: yaml2obj --docnum=2 %s -o %t.elf
+# RUN: llvm-objdump --macho -d -g --dsym %t.elf %p/../../dsymutil/Inputs/basic.macho.x86_64 2>&1 | \
+# RUN: FileCheck -DDSYMFILE=%t.elf --check-prefix=BAD_INPUT_OBJ %s
+
+# BAD_INPUT_AR: error: [[DSYMFILE]] is not a Mach-O or Universal file type.
+# BAD_INPUT_OBJ: error: [[DSYMFILE]] is not a Mach-O file type.
+
+--- !Arch
+Members: []
+
+--- !ELF
+FileHeader:
+ Class: ELFCLASS64
+ Data: ELFDATA2LSB
+ Type: ET_REL
Index: llvm/test/tools/llvm-objdump/Inputs/libbogus11.a
===================================================================
--- llvm/test/tools/llvm-objdump/Inputs/libbogus11.a
+++ /dev/null
@@ -1,10 +0,0 @@
-!<arch>
-hello.c 1444941273 ~97& 0 100644 102 `
-#include <stdio.h>
-#include <stdlib.h>
-int
-main()
-{
- printf("Hello World\n");
- return EXIT_SUCCESS;
-}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90312.301527.patch
Type: text/x-patch
Size: 3426 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201029/66d4e7c7/attachment.bin>
More information about the llvm-commits
mailing list