File tree Expand file tree Collapse file tree 2 files changed +11
-17
lines changed
test/tools/llvm-objcopy/MachO Expand file tree Collapse file tree 2 files changed +11
-17
lines changed Original file line number Diff line number Diff line change 1
- ## This test checks general llvm-install-name-tool behavior
1
+ ## This test checks general llvm-install-name-tool behavior.
2
2
3
3
# RUN: yaml2obj %s -o %t
4
4
5
+ ## Passing something that doesn't exist
6
+ # RUN: not llvm-install-name-tool -add_rpath foo non-existent-binary 2>&1 | FileCheck %s --check-prefix=DOES_NOT_EXIST
7
+
8
+ # DOES_NOT_EXIST: {{.*}}non-existent-binary
9
+
5
10
## Passing a non-Mach-O binary
6
- # RUN: not llvm-install-name-tool -add_rpath foo %t 2>&1 | FileCheck %s --check-prefix=NON_MACH_O
11
+ # RUN: not llvm-install-name-tool -add_rpath foo %t 2>&1 | FileCheck %s --check-prefix=NON_MACH_O -DFILE=%t
7
12
8
- # NON_MACH_O: llvm-install-name-tool: error: input file: {{.*}} is not a Mach-O file
13
+ # NON_MACH_O: llvm-install-name-tool: error: input file: [[FILE]] is not a Mach-O file
9
14
10
15
--- !ELF
11
16
FileHeader:
12
17
Class: ELFCLASS64
13
18
Data: ELFDATA2LSB
14
19
Type: ET_EXEC
15
- Machine: EM_X86_64
16
- Sections:
17
- - Name: .bss
18
- Type: SHT_NOBITS
19
- Flags: [ SHF_ALLOC ]
20
- AddressAlign: 0x0000000000000010
21
- Size: 64
22
- - Name: .text
23
- Type: SHT_PROGBITS
24
- Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
25
- AddressAlign: 0x0000000000000010
26
- Content: "00000000"
Original file line number Diff line number Diff line change 27
27
28
28
using namespace llvm ;
29
29
using namespace llvm ::objcopy;
30
+ using namespace llvm ::object;
30
31
using namespace llvm ::opt;
31
32
32
33
namespace {
@@ -1243,8 +1244,8 @@ objcopy::parseInstallNameToolOptions(ArrayRef<const char *> ArgsArr) {
1243
1244
Config.InputFilename = Positional[0 ];
1244
1245
Config.OutputFilename = Positional[0 ];
1245
1246
1246
- Expected<llvm::object:: OwningBinary<llvm::object:: Binary>> BinaryOrErr =
1247
- llvm::object:: createBinary (Config.InputFilename );
1247
+ Expected<OwningBinary<Binary>> BinaryOrErr =
1248
+ createBinary (Config.InputFilename );
1248
1249
if (!BinaryOrErr)
1249
1250
return createFileError (Config.InputFilename , BinaryOrErr.takeError ());
1250
1251
auto *Binary = (*BinaryOrErr).getBinary ();
You can’t perform that action at this time.
0 commit comments