@@ -965,23 +965,21 @@ void ObjFile::parseLinkerOptions(SmallVectorImpl<StringRef> &LCLinkerOptions) {
965
965
SmallVector<StringRef> macho::unprocessedLCLinkerOptions;
966
966
ObjFile::ObjFile (MemoryBufferRef mb, uint32_t modTime, StringRef archiveName,
967
967
bool lazy, bool forceHidden, bool compatArch,
968
- bool builtFromBitcode, bool isLinkerGenerated )
968
+ bool builtFromBitcode)
969
969
: InputFile(ObjKind, mb, lazy), modTime(modTime), forceHidden(forceHidden),
970
- builtFromBitcode(builtFromBitcode), isLinkerGenerated(isLinkerGenerated) {
970
+ builtFromBitcode(builtFromBitcode) {
971
971
this ->archiveName = std::string (archiveName);
972
972
this ->compatArch = compatArch;
973
- if (!isLinkerGenerated) {
974
- if (lazy) {
975
- if (target->wordSize == 8 )
976
- parseLazy<LP64>();
977
- else
978
- parseLazy<ILP32>();
979
- } else {
980
- if (target->wordSize == 8 )
981
- parse<LP64>();
982
- else
983
- parse<ILP32>();
984
- }
973
+ if (lazy) {
974
+ if (target->wordSize == 8 )
975
+ parseLazy<LP64>();
976
+ else
977
+ parseLazy<ILP32>();
978
+ } else {
979
+ if (target->wordSize == 8 )
980
+ parse<LP64>();
981
+ else
982
+ parse<ILP32>();
985
983
}
986
984
}
987
985
@@ -1105,8 +1103,6 @@ void ObjFile::parseDebugInfo() {
1105
1103
}
1106
1104
1107
1105
ArrayRef<data_in_code_entry> ObjFile::getDataInCode () const {
1108
- if (!mb.getBufferSize ())
1109
- return {};
1110
1106
const auto *buf = reinterpret_cast <const uint8_t *>(mb.getBufferStart ());
1111
1107
const load_command *cmd = findCommand (buf, LC_DATA_IN_CODE);
1112
1108
if (!cmd)
@@ -1117,8 +1113,6 @@ ArrayRef<data_in_code_entry> ObjFile::getDataInCode() const {
1117
1113
}
1118
1114
1119
1115
ArrayRef<uint8_t > ObjFile::getOptimizationHints () const {
1120
- if (!mb.getBufferSize ())
1121
- return {};
1122
1116
const auto *buf = reinterpret_cast <const uint8_t *>(mb.getBufferStart ());
1123
1117
if (auto *cmd =
1124
1118
findCommand<linkedit_data_command>(buf, LC_LINKER_OPTIMIZATION_HINT))
0 commit comments