[llvm] c0da287 - [yaml2obj][MachO] Rename PayloadString to Content
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 26 09:04:58 PDT 2021
Author: Fangrui Song
Date: 2021-07-26T09:04:51-07:00
New Revision: c0da287c30c9f511ccb07fdd42c997be2caea9ec
URL: https://github.com/llvm/llvm-project/commit/c0da287c30c9f511ccb07fdd42c997be2caea9ec
DIFF: https://github.com/llvm/llvm-project/commit/c0da287c30c9f511ccb07fdd42c997be2caea9ec.diff
LOG: [yaml2obj][MachO] Rename PayloadString to Content
The new name is conciser and matches yaml2obj ELF & DWARF.
Reviewed By: #lld-macho, thakis
Differential Revision: https://reviews.llvm.org/D106759
Added:
Modified:
lld/test/MachO/dylib-stub.yaml
lld/test/MachO/zippered.yaml
llvm/include/llvm/ObjectYAML/MachOYAML.h
llvm/lib/ObjectYAML/MachOEmitter.cpp
llvm/lib/ObjectYAML/MachOYAML.cpp
llvm/test/ObjectYAML/MachO/dylib_dylinker_command.yaml
llvm/test/ObjectYAML/MachO/export_trie.yaml
llvm/test/ObjectYAML/MachO/null_string_entries.yaml
llvm/test/ObjectYAML/MachO/out_of_order_linkedit.yaml
llvm/test/ObjectYAML/MachO/symtab.yaml
llvm/test/tools/llvm-dwarfdump/uuid.yaml
llvm/test/tools/llvm-dwarfdump/uuid32.yaml
llvm/test/tools/llvm-lipo/Inputs/CPU10-slice.yaml
llvm/test/tools/llvm-lipo/Inputs/armv7-slice-big.yaml
llvm/test/tools/llvm-objcopy/MachO/Inputs/strip-all.yaml
llvm/test/tools/llvm-objcopy/MachO/basic-executable-copy.test
llvm/test/tools/llvm-objcopy/MachO/install-name-tool-change.test
llvm/test/tools/llvm-objcopy/MachO/install-name-tool-delete-rpath.test
llvm/test/tools/llvm-objcopy/MachO/install-name-tool-id.test
llvm/test/tools/llvm-objcopy/MachO/install-name-tool-rpath.test
llvm/test/tools/llvm-objcopy/MachO/lc-load-weak-dylib.test
llvm/test/tools/llvm-objcopy/MachO/remove-lc-index-update.test
llvm/test/tools/llvm-objcopy/MachO/segment-size-alignment.test
llvm/test/tools/llvm-objcopy/MachO/segments-vmsize.test
llvm/test/tools/llvm-readobj/MachO/needed-libs.test
llvm/test/tools/llvm-tapi-diff/Inputs/macho.yaml
llvm/tools/obj2yaml/macho2yaml.cpp
Removed:
################################################################################
diff --git a/lld/test/MachO/dylib-stub.yaml b/lld/test/MachO/dylib-stub.yaml
index fc50be35bdf0f..617fbfc056cca 100644
--- a/lld/test/MachO/dylib-stub.yaml
+++ b/lld/test/MachO/dylib-stub.yaml
@@ -88,7 +88,7 @@ Slices:
timestamp: 1
current_version: 0
compatibility_version: 0
- PayloadString: foo.dylib
+ Content: foo.dylib
ZeroPadBytes: 7
- cmd: LC_DYLD_INFO_ONLY
cmdsize: 48
diff --git a/lld/test/MachO/zippered.yaml b/lld/test/MachO/zippered.yaml
index 40fd1efba3149..0b7c520b6b2e3 100644
--- a/lld/test/MachO/zippered.yaml
+++ b/lld/test/MachO/zippered.yaml
@@ -29,7 +29,7 @@ LoadCommands:
timestamp: 1
current_version: 0
compatibility_version: 0
- PayloadString: test
+ Content: test
ZeroPadBytes: 4
- cmd: LC_DYLD_INFO_ONLY
cmdsize: 48
diff --git a/llvm/include/llvm/ObjectYAML/MachOYAML.h b/llvm/include/llvm/ObjectYAML/MachOYAML.h
index 94e66c5ae787f..5d1d3ee235948 100644
--- a/llvm/include/llvm/ObjectYAML/MachOYAML.h
+++ b/llvm/include/llvm/ObjectYAML/MachOYAML.h
@@ -76,7 +76,7 @@ struct LoadCommand {
std::vector<Section> Sections;
std::vector<MachO::build_tool_version> Tools;
std::vector<llvm::yaml::Hex8> PayloadBytes;
- std::string PayloadString;
+ std::string Content;
uint64_t ZeroPadBytes;
};
diff --git a/llvm/lib/ObjectYAML/MachOEmitter.cpp b/llvm/lib/ObjectYAML/MachOEmitter.cpp
index dec9c9f6960b8..46e4dd05a737f 100644
--- a/llvm/lib/ObjectYAML/MachOEmitter.cpp
+++ b/llvm/lib/ObjectYAML/MachOEmitter.cpp
@@ -155,9 +155,9 @@ size_t writeLoadCommandData<MachO::segment_command_64>(
size_t writePayloadString(MachOYAML::LoadCommand &LC, raw_ostream &OS) {
size_t BytesWritten = 0;
- if (!LC.PayloadString.empty()) {
- OS.write(LC.PayloadString.c_str(), LC.PayloadString.length());
- BytesWritten = LC.PayloadString.length();
+ if (!LC.Content.empty()) {
+ OS.write(LC.Content.c_str(), LC.Content.length());
+ BytesWritten = LC.Content.length();
}
return BytesWritten;
}
diff --git a/llvm/lib/ObjectYAML/MachOYAML.cpp b/llvm/lib/ObjectYAML/MachOYAML.cpp
index 5a27d37cb7265..dce82ab1cada9 100644
--- a/llvm/lib/ObjectYAML/MachOYAML.cpp
+++ b/llvm/lib/ObjectYAML/MachOYAML.cpp
@@ -218,19 +218,19 @@ void mapLoadCommandData<MachO::segment_command_64>(
template <>
void mapLoadCommandData<MachO::dylib_command>(
IO &IO, MachOYAML::LoadCommand &LoadCommand) {
- IO.mapOptional("PayloadString", LoadCommand.PayloadString);
+ IO.mapOptional("Content", LoadCommand.Content);
}
template <>
void mapLoadCommandData<MachO::rpath_command>(
IO &IO, MachOYAML::LoadCommand &LoadCommand) {
- IO.mapOptional("PayloadString", LoadCommand.PayloadString);
+ IO.mapOptional("Content", LoadCommand.Content);
}
template <>
void mapLoadCommandData<MachO::dylinker_command>(
IO &IO, MachOYAML::LoadCommand &LoadCommand) {
- IO.mapOptional("PayloadString", LoadCommand.PayloadString);
+ IO.mapOptional("Content", LoadCommand.Content);
}
template <>
diff --git a/llvm/test/ObjectYAML/MachO/dylib_dylinker_command.yaml b/llvm/test/ObjectYAML/MachO/dylib_dylinker_command.yaml
index 5fc6afa536e85..d40546e67a73b 100644
--- a/llvm/test/ObjectYAML/MachO/dylib_dylinker_command.yaml
+++ b/llvm/test/ObjectYAML/MachO/dylib_dylinker_command.yaml
@@ -14,7 +14,7 @@ LoadCommands:
- cmd: LC_LOAD_DYLINKER
cmdsize: 32
name: 12
- PayloadString: /usr/lib/dyld
+ Content: /usr/lib/dyld
ZeroPadBytes: 7
- cmd: LC_LOAD_DYLIB
cmdsize: 48
@@ -23,7 +23,7 @@ LoadCommands:
timestamp: 2
current_version: 7864576
compatibility_version: 65536
- PayloadString: '/usr/lib/libc++.1.dylib'
+ Content: '/usr/lib/libc++.1.dylib'
ZeroPadBytes: 1
- cmd: LC_LOAD_DYLIB
cmdsize: 56
@@ -32,7 +32,7 @@ LoadCommands:
timestamp: 2
current_version: 80349697
compatibility_version: 65536
- PayloadString: /usr/lib/libSystem.B.dylib
+ Content: /usr/lib/libSystem.B.dylib
ZeroPadBytes: 6
...
@@ -40,7 +40,7 @@ LoadCommands:
#CHECK: - cmd: LC_LOAD_DYLINKER
#CHECK: cmdsize: 32
#CHECK: name: 12
-#CHECK: PayloadString: '/usr/lib/dyld'
+#CHECK: Content: '/usr/lib/dyld'
#CHECK: ZeroPadBytes: 7
#CHECK: - cmd: LC_LOAD_DYLIB
#CHECK: cmdsize: 48
@@ -49,7 +49,7 @@ LoadCommands:
#CHECK: timestamp: 2
#CHECK: current_version: 7864576
#CHECK: compatibility_version: 65536
-#CHECK: PayloadString: '/usr/lib/libc++.1.dylib'
+#CHECK: Content: '/usr/lib/libc++.1.dylib'
#CHECK: ZeroPadBytes: 1
#CHECK: - cmd: LC_LOAD_DYLIB
#CHECK: cmdsize: 56
@@ -58,5 +58,5 @@ LoadCommands:
#CHECK: timestamp: 2
#CHECK: current_version: 80349697
#CHECK: compatibility_version: 65536
-#CHECK: PayloadString: '/usr/lib/libSystem.B.dylib'
+#CHECK: Content: '/usr/lib/libSystem.B.dylib'
#CHECK: ZeroPadBytes: 6
diff --git a/llvm/test/ObjectYAML/MachO/export_trie.yaml b/llvm/test/ObjectYAML/MachO/export_trie.yaml
index 64537527cfe75..635e507f5f646 100644
--- a/llvm/test/ObjectYAML/MachO/export_trie.yaml
+++ b/llvm/test/ObjectYAML/MachO/export_trie.yaml
@@ -96,7 +96,7 @@ LoadCommands:
- cmd: LC_LOAD_DYLINKER
cmdsize: 32
name: 12
- PayloadString: /usr/lib/dyld
+ Content: /usr/lib/dyld
ZeroPadBytes: 7
- cmd: LC_UUID
cmdsize: 24
@@ -119,7 +119,7 @@ LoadCommands:
timestamp: 2
current_version: 7864576
compatibility_version: 65536
- PayloadString: '/usr/lib/libc++.1.dylib'
+ Content: '/usr/lib/libc++.1.dylib'
ZeroPadBytes: 1
- cmd: LC_LOAD_DYLIB
cmdsize: 56
@@ -128,7 +128,7 @@ LoadCommands:
timestamp: 2
current_version: 80349697
compatibility_version: 65536
- PayloadString: /usr/lib/libSystem.B.dylib
+ Content: /usr/lib/libSystem.B.dylib
ZeroPadBytes: 6
- cmd: LC_FUNCTION_STARTS
cmdsize: 16
diff --git a/llvm/test/ObjectYAML/MachO/null_string_entries.yaml b/llvm/test/ObjectYAML/MachO/null_string_entries.yaml
index d08275acab4ad..4bae31c704b51 100644
--- a/llvm/test/ObjectYAML/MachO/null_string_entries.yaml
+++ b/llvm/test/ObjectYAML/MachO/null_string_entries.yaml
@@ -95,7 +95,7 @@ LoadCommands:
- cmd: LC_LOAD_DYLINKER
cmdsize: 28
name: 12
- PayloadString: /usr/lib/dyld
+ Content: /usr/lib/dyld
ZeroPadBytes: 3
- cmd: LC_UUID
cmdsize: 24
@@ -118,7 +118,7 @@ LoadCommands:
timestamp: 2
current_version: 7864576
compatibility_version: 65536
- PayloadString: '/usr/lib/libc++.1.dylib'
+ Content: '/usr/lib/libc++.1.dylib'
ZeroPadBytes: 1
- cmd: LC_LOAD_DYLIB
cmdsize: 52
@@ -127,7 +127,7 @@ LoadCommands:
timestamp: 2
current_version: 80349697
compatibility_version: 65536
- PayloadString: /usr/lib/libSystem.B.dylib
+ Content: /usr/lib/libSystem.B.dylib
ZeroPadBytes: 2
- cmd: LC_FUNCTION_STARTS
cmdsize: 16
diff --git a/llvm/test/ObjectYAML/MachO/out_of_order_linkedit.yaml b/llvm/test/ObjectYAML/MachO/out_of_order_linkedit.yaml
index d318e331e6188..3b6ec557f6ed6 100644
--- a/llvm/test/ObjectYAML/MachO/out_of_order_linkedit.yaml
+++ b/llvm/test/ObjectYAML/MachO/out_of_order_linkedit.yaml
@@ -96,7 +96,7 @@ LoadCommands:
- cmd: LC_LOAD_DYLINKER
cmdsize: 32
name: 12
- PayloadString: /usr/lib/dyld
+ Content: /usr/lib/dyld
ZeroPadBytes: 7
- cmd: LC_UUID
cmdsize: 24
@@ -119,7 +119,7 @@ LoadCommands:
timestamp: 2
current_version: 7864576
compatibility_version: 65536
- PayloadString: '/usr/lib/libc++.1.dylib'
+ Content: '/usr/lib/libc++.1.dylib'
ZeroPadBytes: 1
- cmd: LC_LOAD_DYLIB
cmdsize: 56
@@ -128,7 +128,7 @@ LoadCommands:
timestamp: 2
current_version: 80349697
compatibility_version: 65536
- PayloadString: /usr/lib/libSystem.B.dylib
+ Content: /usr/lib/libSystem.B.dylib
ZeroPadBytes: 6
- cmd: LC_FUNCTION_STARTS
cmdsize: 16
diff --git a/llvm/test/ObjectYAML/MachO/symtab.yaml b/llvm/test/ObjectYAML/MachO/symtab.yaml
index 5ba75a15e4977..8cff549366794 100644
--- a/llvm/test/ObjectYAML/MachO/symtab.yaml
+++ b/llvm/test/ObjectYAML/MachO/symtab.yaml
@@ -98,7 +98,7 @@ LoadCommands:
- cmd: LC_LOAD_DYLINKER
cmdsize: 32
name: 12
- PayloadString: /usr/lib/dyld
+ Content: /usr/lib/dyld
ZeroPadBytes: 7
- cmd: LC_UUID
cmdsize: 24
@@ -121,7 +121,7 @@ LoadCommands:
timestamp: 2
current_version: 7864576
compatibility_version: 65536
- PayloadString: '/usr/lib/libc++.1.dylib'
+ Content: '/usr/lib/libc++.1.dylib'
ZeroPadBytes: 1
- cmd: LC_LOAD_DYLIB
cmdsize: 56
@@ -130,7 +130,7 @@ LoadCommands:
timestamp: 2
current_version: 80349697
compatibility_version: 65536
- PayloadString: /usr/lib/libSystem.B.dylib
+ Content: /usr/lib/libSystem.B.dylib
ZeroPadBytes: 6
- cmd: LC_FUNCTION_STARTS
cmdsize: 16
diff --git a/llvm/test/tools/llvm-dwarfdump/uuid.yaml b/llvm/test/tools/llvm-dwarfdump/uuid.yaml
index b36e3aabc0a0e..391f6259a2192 100644
--- a/llvm/test/tools/llvm-dwarfdump/uuid.yaml
+++ b/llvm/test/tools/llvm-dwarfdump/uuid.yaml
@@ -111,7 +111,7 @@ LoadCommands:
- cmd: LC_LOAD_DYLINKER
cmdsize: 32
name: 12
- PayloadString: /usr/lib/dyld
+ Content: /usr/lib/dyld
ZeroPadBytes: 7
- cmd: LC_UUID
cmdsize: 24
@@ -134,7 +134,7 @@ LoadCommands:
timestamp: 2
current_version: 81985536
compatibility_version: 65536
- PayloadString: /usr/lib/libSystem.B.dylib
+ Content: /usr/lib/libSystem.B.dylib
ZeroPadBytes: 6
- cmd: LC_FUNCTION_STARTS
cmdsize: 16
diff --git a/llvm/test/tools/llvm-dwarfdump/uuid32.yaml b/llvm/test/tools/llvm-dwarfdump/uuid32.yaml
index 1144547c3d14e..e0ea8f0ff495a 100644
--- a/llvm/test/tools/llvm-dwarfdump/uuid32.yaml
+++ b/llvm/test/tools/llvm-dwarfdump/uuid32.yaml
@@ -109,7 +109,7 @@ LoadCommands:
- cmd: LC_LOAD_DYLINKER
cmdsize: 28
name: 12
- PayloadString: /usr/lib/dyld
+ Content: /usr/lib/dyld
ZeroPadBytes: 3
- cmd: LC_UUID
cmdsize: 24
@@ -132,7 +132,7 @@ LoadCommands:
timestamp: 2
current_version: 81985536
compatibility_version: 65536
- PayloadString: /usr/lib/libSystem.B.dylib
+ Content: /usr/lib/libSystem.B.dylib
ZeroPadBytes: 2
- cmd: LC_FUNCTION_STARTS
cmdsize: 16
diff --git a/llvm/test/tools/llvm-lipo/Inputs/CPU10-slice.yaml b/llvm/test/tools/llvm-lipo/Inputs/CPU10-slice.yaml
index f2d8ea5c1416f..296b465046f1c 100644
--- a/llvm/test/tools/llvm-lipo/Inputs/CPU10-slice.yaml
+++ b/llvm/test/tools/llvm-lipo/Inputs/CPU10-slice.yaml
@@ -180,7 +180,7 @@ LoadCommands:
- cmd: LC_LOAD_DYLINKER
cmdsize: 32
name: 12
- PayloadString: /usr/lib/dyld
+ Content: /usr/lib/dyld
ZeroPadBytes: 7
- cmd: LC_UUID
cmdsize: 24
@@ -208,7 +208,7 @@ LoadCommands:
timestamp: 2
current_version: 82115073
compatibility_version: 65536
- PayloadString: /usr/lib/libSystem.B.dylib
+ Content: /usr/lib/libSystem.B.dylib
ZeroPadBytes: 6
- cmd: LC_FUNCTION_STARTS
cmdsize: 16
diff --git a/llvm/test/tools/llvm-lipo/Inputs/armv7-slice-big.yaml b/llvm/test/tools/llvm-lipo/Inputs/armv7-slice-big.yaml
index 9c328959938d4..9e6bf1df9c990 100644
--- a/llvm/test/tools/llvm-lipo/Inputs/armv7-slice-big.yaml
+++ b/llvm/test/tools/llvm-lipo/Inputs/armv7-slice-big.yaml
@@ -263,7 +263,7 @@ LoadCommands:
- cmd: LC_LOAD_DYLINKER
cmdsize: 28
name: 12
- PayloadString: '/usr/lib/dyld'
+ Content: '/usr/lib/dyld'
ZeroPadBytes: 3
- cmd: LC_UUID
cmdsize: 24
@@ -291,7 +291,7 @@ LoadCommands:
timestamp: 2
current_version: 26216708
compatibility_version: 65536
- PayloadString: '/usr/lib/libc++.1.dylib'
+ Content: '/usr/lib/libc++.1.dylib'
ZeroPadBytes: 1
- cmd: LC_LOAD_DYLIB
cmdsize: 68
@@ -300,7 +300,7 @@ LoadCommands:
timestamp: 2
current_version: 0
compatibility_version: 0
- PayloadString: '@rpath/MobileConfig.framework/MobileConfig'
+ Content: '@rpath/MobileConfig.framework/MobileConfig'
ZeroPadBytes: 2
- cmd: LC_LOAD_DYLIB
cmdsize: 84
@@ -309,7 +309,7 @@ LoadCommands:
timestamp: 2
current_version: 102895360
compatibility_version: 19660800
- PayloadString: '/System/Library/Frameworks/Foundation.framework/Foundation'
+ Content: '/System/Library/Frameworks/Foundation.framework/Foundation'
ZeroPadBytes: 2
- cmd: LC_LOAD_DYLIB
cmdsize: 76
@@ -318,7 +318,7 @@ LoadCommands:
timestamp: 2
current_version: 917504
compatibility_version: 65536
- PayloadString: '/System/Library/Frameworks/MapKit.framework/MapKit'
+ Content: '/System/Library/Frameworks/MapKit.framework/MapKit'
ZeroPadBytes: 2
- cmd: LC_LOAD_DYLIB
cmdsize: 84
@@ -327,7 +327,7 @@ LoadCommands:
timestamp: 2
current_version: 68352
compatibility_version: 66048
- PayloadString: '/System/Library/Frameworks/QuartzCore.framework/QuartzCore'
+ Content: '/System/Library/Frameworks/QuartzCore.framework/QuartzCore'
ZeroPadBytes: 2
- cmd: LC_LOAD_DYLIB
cmdsize: 76
@@ -336,7 +336,7 @@ LoadCommands:
timestamp: 2
current_version: 3997696000
compatibility_version: 65536
- PayloadString: '/System/Library/Frameworks/UIKit.framework/UIKit'
+ Content: '/System/Library/Frameworks/UIKit.framework/UIKit'
ZeroPadBytes: 4
- cmd: LC_LOAD_DYLIB
cmdsize: 52
@@ -345,7 +345,7 @@ LoadCommands:
timestamp: 2
current_version: 14942208
compatibility_version: 65536
- PayloadString: '/usr/lib/libobjc.A.dylib'
+ Content: '/usr/lib/libobjc.A.dylib'
ZeroPadBytes: 4
- cmd: LC_LOAD_DYLIB
cmdsize: 52
@@ -354,7 +354,7 @@ LoadCommands:
timestamp: 2
current_version: 82115073
compatibility_version: 65536
- PayloadString: '/usr/lib/libSystem.B.dylib'
+ Content: '/usr/lib/libSystem.B.dylib'
ZeroPadBytes: 2
- cmd: LC_LOAD_DYLIB
cmdsize: 92
@@ -363,17 +363,17 @@ LoadCommands:
timestamp: 2
current_version: 102895360
compatibility_version: 9830400
- PayloadString: '/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation'
+ Content: '/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation'
ZeroPadBytes: 2
- cmd: LC_RPATH
cmdsize: 28
path: 12
- PayloadString: '/usr/lib/swift'
+ Content: '/usr/lib/swift'
ZeroPadBytes: 2
- cmd: LC_RPATH
cmdsize: 40
path: 12
- PayloadString: '@executable_path/Frameworks'
+ Content: '@executable_path/Frameworks'
ZeroPadBytes: 1
- cmd: LC_DATA_IN_CODE
cmdsize: 16
diff --git a/llvm/test/tools/llvm-objcopy/MachO/Inputs/strip-all.yaml b/llvm/test/tools/llvm-objcopy/MachO/Inputs/strip-all.yaml
index 6bce937fd7a42..7d83d347ba6e8 100644
--- a/llvm/test/tools/llvm-objcopy/MachO/Inputs/strip-all.yaml
+++ b/llvm/test/tools/llvm-objcopy/MachO/Inputs/strip-all.yaml
@@ -144,7 +144,7 @@ LoadCommands:
- cmd: LC_LOAD_DYLINKER
cmdsize: 32
name: 12
- PayloadString: '/usr/lib/dyld'
+ Content: '/usr/lib/dyld'
ZeroPadBytes: 7
- cmd: LC_UUID
cmdsize: 24
@@ -172,7 +172,7 @@ LoadCommands:
timestamp: 2
current_version: 82115073
compatibility_version: 65536
- PayloadString: '/usr/lib/libSystem.B.dylib'
+ Content: '/usr/lib/libSystem.B.dylib'
ZeroPadBytes: 6
- cmd: LC_FUNCTION_STARTS
cmdsize: 16
diff --git a/llvm/test/tools/llvm-objcopy/MachO/basic-executable-copy.test b/llvm/test/tools/llvm-objcopy/MachO/basic-executable-copy.test
index 0ec84f74f7019..69132ea47de37 100644
--- a/llvm/test/tools/llvm-objcopy/MachO/basic-executable-copy.test
+++ b/llvm/test/tools/llvm-objcopy/MachO/basic-executable-copy.test
@@ -152,7 +152,7 @@ LoadCommands:
- cmd: LC_LOAD_DYLINKER
cmdsize: 32
name: 12
- PayloadString: '/usr/lib/dyld'
+ Content: '/usr/lib/dyld'
ZeroPadBytes: 7
- cmd: LC_UUID
cmdsize: 24
@@ -184,7 +184,7 @@ LoadCommands:
timestamp: 2
current_version: 82115073
compatibility_version: 65536
- PayloadString: '/usr/lib/libSystem.B.dylib'
+ Content: '/usr/lib/libSystem.B.dylib'
ZeroPadBytes: 6
- cmd: LC_FUNCTION_STARTS
cmdsize: 16
diff --git a/llvm/test/tools/llvm-objcopy/MachO/install-name-tool-change.test b/llvm/test/tools/llvm-objcopy/MachO/install-name-tool-change.test
index 8869af2179988..3605b94d9aee7 100644
--- a/llvm/test/tools/llvm-objcopy/MachO/install-name-tool-change.test
+++ b/llvm/test/tools/llvm-objcopy/MachO/install-name-tool-change.test
@@ -96,7 +96,7 @@ LoadCommands:
timestamp: 2
current_version: 82115073
compatibility_version: 65536
- PayloadString: '/usr/dylib/LOAD'
+ Content: '/usr/dylib/LOAD'
- cmd: LC_LOAD_WEAK_DYLIB
cmdsize: 40
dylib:
@@ -104,4 +104,4 @@ LoadCommands:
timestamp: 2
current_version: 82115073
compatibility_version: 65536
- PayloadString: '/usr/dylib/WEAK'
+ Content: '/usr/dylib/WEAK'
diff --git a/llvm/test/tools/llvm-objcopy/MachO/install-name-tool-delete-rpath.test b/llvm/test/tools/llvm-objcopy/MachO/install-name-tool-delete-rpath.test
index aea899fd1a196..ce37576dac871 100644
--- a/llvm/test/tools/llvm-objcopy/MachO/install-name-tool-delete-rpath.test
+++ b/llvm/test/tools/llvm-objcopy/MachO/install-name-tool-delete-rpath.test
@@ -71,20 +71,20 @@ LoadCommands:
- cmd: LC_RPATH
cmdsize: 32
path: 12
- PayloadString: '@executable_a/.'
+ Content: '@executable_a/.'
- cmd: LC_RPATH
cmdsize: 32
path: 12
- PayloadString: '@executable_b/.'
+ Content: '@executable_b/.'
- cmd: LC_RPATH
cmdsize: 32
path: 12
- PayloadString: '@executable_c/.'
+ Content: '@executable_c/.'
- cmd: LC_RPATH
cmdsize: 32
path: 12
- PayloadString: '@executable_d/.'
+ Content: '@executable_d/.'
- cmd: LC_RPATH
cmdsize: 32
path: 12
- PayloadString: '@executable_e/.'
+ Content: '@executable_e/.'
diff --git a/llvm/test/tools/llvm-objcopy/MachO/install-name-tool-id.test b/llvm/test/tools/llvm-objcopy/MachO/install-name-tool-id.test
index eb29d26be9345..00489a7c0a0f9 100644
--- a/llvm/test/tools/llvm-objcopy/MachO/install-name-tool-id.test
+++ b/llvm/test/tools/llvm-objcopy/MachO/install-name-tool-id.test
@@ -45,7 +45,7 @@ LoadCommands:
timestamp: 2
current_version: 82115073
compatibility_version: 65536
- PayloadString: '/usr/lib/A'
+ Content: '/usr/lib/A'
# RUN: yaml2obj %s --docnum=2 -o %t
diff --git a/llvm/test/tools/llvm-objcopy/MachO/install-name-tool-rpath.test b/llvm/test/tools/llvm-objcopy/MachO/install-name-tool-rpath.test
index a0621f4a66bb0..5c4309891a3e2 100644
--- a/llvm/test/tools/llvm-objcopy/MachO/install-name-tool-rpath.test
+++ b/llvm/test/tools/llvm-objcopy/MachO/install-name-tool-rpath.test
@@ -127,16 +127,16 @@ LoadCommands:
- cmd: LC_RPATH
cmdsize: 32
path: 12
- PayloadString: '@executable_a/.'
+ Content: '@executable_a/.'
- cmd: LC_RPATH
cmdsize: 40
path: 12
- PayloadString: '@executable_short_test/.'
+ Content: '@executable_short_test/.'
- cmd: LC_RPATH
cmdsize: 40
path: 12
- PayloadString: '@executable_long_test/.'
+ Content: '@executable_long_test/.'
- cmd: LC_RPATH
cmdsize: 32
path: 12
- PayloadString: '@executable_d/.'
+ Content: '@executable_d/.'
diff --git a/llvm/test/tools/llvm-objcopy/MachO/lc-load-weak-dylib.test b/llvm/test/tools/llvm-objcopy/MachO/lc-load-weak-dylib.test
index aaf0a220d25bc..e570f597e6262 100644
--- a/llvm/test/tools/llvm-objcopy/MachO/lc-load-weak-dylib.test
+++ b/llvm/test/tools/llvm-objcopy/MachO/lc-load-weak-dylib.test
@@ -20,6 +20,6 @@ LoadCommands:
timestamp: 2
current_version: 65536
compatibility_version: 65536
- PayloadString: '/System/Library/Frameworks/Network.framework/Network'
+ Content: '/System/Library/Frameworks/Network.framework/Network'
ZeroPadBytes: 4
...
diff --git a/llvm/test/tools/llvm-objcopy/MachO/remove-lc-index-update.test b/llvm/test/tools/llvm-objcopy/MachO/remove-lc-index-update.test
index 6543ae29fbc4a..45c3b0b602a11 100644
--- a/llvm/test/tools/llvm-objcopy/MachO/remove-lc-index-update.test
+++ b/llvm/test/tools/llvm-objcopy/MachO/remove-lc-index-update.test
@@ -112,7 +112,7 @@ LoadCommands:
- cmd: LC_RPATH
cmdsize: 32
path: 12
- PayloadString: '@executable_a/.'
+ Content: '@executable_a/.'
- cmd: LC_DYLD_INFO_ONLY
cmdsize: 48
rebase_off: 0
@@ -143,7 +143,7 @@ LoadCommands:
- cmd: LC_LOAD_DYLINKER
cmdsize: 32
name: 12
- PayloadString: '/usr/lib/dyld'
+ Content: '/usr/lib/dyld'
ZeroPadBytes: 7
- cmd: LC_UUID
cmdsize: 24
@@ -175,7 +175,7 @@ LoadCommands:
timestamp: 2
current_version: 82115073
compatibility_version: 65536
- PayloadString: '/usr/lib/libSystem.B.dylib'
+ Content: '/usr/lib/libSystem.B.dylib'
ZeroPadBytes: 6
- cmd: LC_DYSYMTAB
cmdsize: 80
diff --git a/llvm/test/tools/llvm-objcopy/MachO/segment-size-alignment.test b/llvm/test/tools/llvm-objcopy/MachO/segment-size-alignment.test
index d8ad3e9a46227..e4ec00203f21c 100644
--- a/llvm/test/tools/llvm-objcopy/MachO/segment-size-alignment.test
+++ b/llvm/test/tools/llvm-objcopy/MachO/segment-size-alignment.test
@@ -154,7 +154,7 @@ LoadCommands:
- cmd: LC_LOAD_DYLINKER
cmdsize: 28
name: 12
- PayloadString: '/usr/lib/dyld'
+ Content: '/usr/lib/dyld'
ZeroPadBytes: 3
- cmd: LC_UUID
cmdsize: 24
@@ -182,7 +182,7 @@ LoadCommands:
timestamp: 2
current_version: 83951616
compatibility_version: 65536
- PayloadString: '/usr/lib/libSystem.B.dylib'
+ Content: '/usr/lib/libSystem.B.dylib'
ZeroPadBytes: 2
- cmd: LC_FUNCTION_STARTS
cmdsize: 16
@@ -366,7 +366,7 @@ LoadCommands:
- cmd: LC_LOAD_DYLINKER
cmdsize: 32
name: 12
- PayloadString: '/usr/lib/dyld'
+ Content: '/usr/lib/dyld'
ZeroPadBytes: 7
- cmd: LC_UUID
cmdsize: 24
@@ -400,7 +400,7 @@ LoadCommands:
timestamp: 2
current_version: 83951616
compatibility_version: 65536
- PayloadString: '/usr/lib/libSystem.B.dylib'
+ Content: '/usr/lib/libSystem.B.dylib'
ZeroPadBytes: 6
- cmd: LC_FUNCTION_STARTS
cmdsize: 16
@@ -583,7 +583,7 @@ LoadCommands:
- cmd: LC_LOAD_DYLINKER
cmdsize: 28
name: 12
- PayloadString: '/usr/lib/dyld'
+ Content: '/usr/lib/dyld'
ZeroPadBytes: 3
- cmd: LC_UUID
cmdsize: 24
@@ -616,7 +616,7 @@ LoadCommands:
timestamp: 2
current_version: 83951616
compatibility_version: 65536
- PayloadString: '/usr/lib/libSystem.B.dylib'
+ Content: '/usr/lib/libSystem.B.dylib'
ZeroPadBytes: 2
- cmd: LC_FUNCTION_STARTS
cmdsize: 16
@@ -800,7 +800,7 @@ LoadCommands:
- cmd: LC_LOAD_DYLINKER
cmdsize: 32
name: 12
- PayloadString: '/usr/lib/dyld'
+ Content: '/usr/lib/dyld'
ZeroPadBytes: 7
- cmd: LC_UUID
cmdsize: 24
@@ -828,7 +828,7 @@ LoadCommands:
timestamp: 2
current_version: 82115073
compatibility_version: 65536
- PayloadString: '/usr/lib/libSystem.B.dylib'
+ Content: '/usr/lib/libSystem.B.dylib'
ZeroPadBytes: 6
- cmd: LC_FUNCTION_STARTS
cmdsize: 16
diff --git a/llvm/test/tools/llvm-objcopy/MachO/segments-vmsize.test b/llvm/test/tools/llvm-objcopy/MachO/segments-vmsize.test
index 18c99c8307aa0..fd4da2ca4bf1c 100644
--- a/llvm/test/tools/llvm-objcopy/MachO/segments-vmsize.test
+++ b/llvm/test/tools/llvm-objcopy/MachO/segments-vmsize.test
@@ -169,7 +169,7 @@ LoadCommands:
- cmd: LC_LOAD_DYLINKER
cmdsize: 32
name: 12
- PayloadString: '/usr/lib/dyld'
+ Content: '/usr/lib/dyld'
ZeroPadBytes: 7
- cmd: LC_UUID
cmdsize: 24
@@ -197,7 +197,7 @@ LoadCommands:
timestamp: 2
current_version: 82115073
compatibility_version: 65536
- PayloadString: '/usr/lib/libSystem.B.dylib'
+ Content: '/usr/lib/libSystem.B.dylib'
ZeroPadBytes: 6
- cmd: LC_FUNCTION_STARTS
cmdsize: 16
diff --git a/llvm/test/tools/llvm-readobj/MachO/needed-libs.test b/llvm/test/tools/llvm-readobj/MachO/needed-libs.test
index d199327cadba6..e97e490dbb075 100644
--- a/llvm/test/tools/llvm-readobj/MachO/needed-libs.test
+++ b/llvm/test/tools/llvm-readobj/MachO/needed-libs.test
@@ -23,4 +23,4 @@ LoadCommands:
timestamp: 2
current_version: 81985536
compatibility_version: 65536
- PayloadString: /usr/lib/libSystem.B.dylib
+ Content: /usr/lib/libSystem.B.dylib
diff --git a/llvm/test/tools/llvm-tapi-
diff /Inputs/macho.yaml b/llvm/test/tools/llvm-tapi-
diff /Inputs/macho.yaml
index 6a7813d6a3915..04f8c4a7634ac 100644
--- a/llvm/test/tools/llvm-tapi-
diff /Inputs/macho.yaml
+++ b/llvm/test/tools/llvm-tapi-
diff /Inputs/macho.yaml
@@ -52,7 +52,7 @@ LoadCommands:
timestamp: 1
current_version: 65536
compatibility_version: 65536
- PayloadString: macho-no-exports.dylib
+ Content: macho-no-exports.dylib
ZeroPadBytes: 2
- cmd: LC_DYLD_INFO_ONLY
cmdsize: 48
@@ -109,7 +109,7 @@ LoadCommands:
timestamp: 2
current_version: 79495168
compatibility_version: 65536
- PayloadString: '/usr/lib/libSystem.B.dylib'
+ Content: '/usr/lib/libSystem.B.dylib'
ZeroPadBytes: 6
- cmd: LC_FUNCTION_STARTS
cmdsize: 16
diff --git a/llvm/tools/obj2yaml/macho2yaml.cpp b/llvm/tools/obj2yaml/macho2yaml.cpp
index 49347431b9a4f..b7289bff67ed5 100644
--- a/llvm/tools/obj2yaml/macho2yaml.cpp
+++ b/llvm/tools/obj2yaml/macho2yaml.cpp
@@ -226,7 +226,7 @@ readString(MachOYAML::LoadCommand &LC,
auto Start = LoadCmd.Ptr + sizeof(StructType);
auto MaxSize = LoadCmd.C.cmdsize - sizeof(StructType);
auto Size = strnlen(Start, MaxSize);
- LC.PayloadString = StringRef(Start, Size).str();
+ LC.Content = StringRef(Start, Size).str();
return Start + Size;
}
More information about the llvm-commits
mailing list