From 99c78a9f3c839d194e86b91ed8fb9f4d53ae2ba6 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Thu, 12 Jun 2014 03:13:49 +0000 Subject: Don't use make_error_code from the llvm namespace. llvm-svn: 210741 --- .../MachO/MachONormalizedFileBinaryReader.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp') diff --git a/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp b/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp index 65146e4b447..6d46fb36b02 100644 --- a/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp +++ b/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp @@ -65,7 +65,7 @@ forEachLoadCommand(StringRef lcRange, unsigned lcCount, bool swap, bool is64, slc = &lcCopy; } if ( (p + slc->cmdsize) > lcRange.end() ) - return llvm::make_error_code(std::errc::executable_format_error); + return std::make_error_code(std::errc::executable_format_error); if (func(slc->cmd, slc->cmdsize, p)) return error_code(); @@ -81,7 +81,7 @@ static error_code appendRelocations(Relocations &relocs, StringRef buffer, bool swap, bool bigEndian, uint32_t reloff, uint32_t nreloc) { if ((reloff + nreloc*8) > buffer.size()) - return llvm::make_error_code(std::errc::executable_format_error); + return std::make_error_code(std::errc::executable_format_error); const any_relocation_info* relocsArray = reinterpret_cast(buffer.begin()+reloff); @@ -96,9 +96,9 @@ appendIndirectSymbols(IndirectSymbols &isyms, StringRef buffer, bool swap, bool bigEndian, uint32_t istOffset, uint32_t istCount, uint32_t startIndex, uint32_t count) { if ((istOffset + istCount*4) > buffer.size()) - return llvm::make_error_code(std::errc::executable_format_error); + return std::make_error_code(std::errc::executable_format_error); if (startIndex+count > istCount) - return llvm::make_error_code(std::errc::executable_format_error); + return std::make_error_code(std::errc::executable_format_error); const uint32_t *indirectSymbolArray = reinterpret_cast(buffer.begin()+istOffset); @@ -146,12 +146,12 @@ readBinary(std::unique_ptr &mb, fa++; } if (!foundArch) { - return llvm::make_error_code(std::errc::executable_format_error); + return std::make_error_code(std::errc::executable_format_error); } objSize = readBigEndian(fa->size); uint32_t offset = readBigEndian(fa->offset); if ((offset + objSize) > mb->getBufferSize()) - return llvm::make_error_code(std::errc::executable_format_error); + return std::make_error_code(std::errc::executable_format_error); start += offset; mh = reinterpret_cast(start); } @@ -175,7 +175,7 @@ readBinary(std::unique_ptr &mb, swap = true; break; default: - return llvm::make_error_code(std::errc::executable_format_error); + return std::make_error_code(std::errc::executable_format_error); } // Endian swap header, if needed. @@ -193,7 +193,7 @@ readBinary(std::unique_ptr &mb, start + (is64 ? sizeof(mach_header_64) : sizeof(mach_header)); StringRef lcRange(lcStart, smh->sizeofcmds); if (lcRange.end() > (start + objSize)) - return llvm::make_error_code(std::errc::executable_format_error); + return std::make_error_code(std::errc::executable_format_error); // Normalize architecture f->arch = MachOLinkingContext::archFromCpuType(smh->cputype, smh->cpusubtype); -- cgit v1.2.3