@@ -263,7 +263,7 @@ static std::vector<ArchiveMember> getArchiveMembers(MemoryBufferRef mb) {
263263
264264static InputFile *addFile (StringRef path, bool forceLoadArchive,
265265 bool isBundleLoader = false ) {
266- Optional<MemoryBufferRef> buffer = readLinkableFile (path);
266+ Optional<MemoryBufferRef> buffer = readFile (path);
267267 if (!buffer)
268268 return nullptr ;
269269 MemoryBufferRef mbref = *buffer;
@@ -279,7 +279,7 @@ static InputFile *addFile(StringRef path, bool forceLoadArchive,
279279 error (path + " : archive has no index; run ranlib to add one" );
280280
281281 if (config->allLoad || forceLoadArchive) {
282- if (Optional<MemoryBufferRef> buffer = readLinkableFile (path)) {
282+ if (Optional<MemoryBufferRef> buffer = readFile (path)) {
283283 for (const ArchiveMember &member : getArchiveMembers (*buffer)) {
284284 if (Optional<InputFile *> file = loadArchiveMember (
285285 member.mbref , member.modTime , path, /* objCOnly=*/ false )) {
@@ -300,7 +300,7 @@ static InputFile *addFile(StringRef path, bool forceLoadArchive,
300300 // we already found that it contains an ObjC symbol. We should also
301301 // consider creating a LazyObjFile class in order to avoid double-loading
302302 // these files here and below (as part of the ArchiveFile).
303- if (Optional<MemoryBufferRef> buffer = readLinkableFile (path)) {
303+ if (Optional<MemoryBufferRef> buffer = readFile (path)) {
304304 for (const ArchiveMember &member : getArchiveMembers (*buffer)) {
305305 if (Optional<InputFile *> file = loadArchiveMember (
306306 member.mbref , member.modTime , path, /* objCOnly=*/ true )) {
@@ -403,7 +403,7 @@ void macho::parseLCLinkerOption(InputFile* f, unsigned argc, StringRef data) {
403403}
404404
405405static void addFileList (StringRef path) {
406- Optional<MemoryBufferRef> buffer = readRawFile (path);
406+ Optional<MemoryBufferRef> buffer = readFile (path);
407407 if (!buffer)
408408 return ;
409409 MemoryBufferRef mbref = *buffer;
@@ -426,7 +426,7 @@ static void addFileList(StringRef path) {
426426//
427427// The file can also have line comments that start with '#'.
428428static void parseOrderFile (StringRef path) {
429- Optional<MemoryBufferRef> buffer = readRawFile (path);
429+ Optional<MemoryBufferRef> buffer = readFile (path);
430430 if (!buffer) {
431431 error (" Could not read order file at " + path);
432432 return ;
@@ -940,7 +940,7 @@ bool macho::link(ArrayRef<const char *> argsArr, bool canExitEarly,
940940 StringRef segName = arg->getValue (0 );
941941 StringRef sectName = arg->getValue (1 );
942942 StringRef fileName = arg->getValue (2 );
943- Optional<MemoryBufferRef> buffer = readRawFile (fileName);
943+ Optional<MemoryBufferRef> buffer = readFile (fileName);
944944 if (buffer)
945945 inputFiles.insert (make<OpaqueFile>(*buffer, segName, sectName));
946946 }
0 commit comments