[lld] r328908 - [ELF] Simplify read32. NFC
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 30 16:13:01 PDT 2018
Author: maskray
Date: Fri Mar 30 16:13:00 2018
New Revision: 328908
URL: http://llvm.org/viewvc/llvm-project?rev=328908&view=rev
Log:
[ELF] Simplify read32. NFC
Modified:
lld/trunk/ELF/EhFrame.cpp
Modified: lld/trunk/ELF/EhFrame.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/EhFrame.cpp?rev=328908&r1=328907&r2=328908&view=diff
==============================================================================
--- lld/trunk/ELF/EhFrame.cpp (original)
+++ lld/trunk/ELF/EhFrame.cpp Fri Mar 30 16:13:00 2018
@@ -20,17 +20,16 @@
#include "Config.h"
#include "InputSection.h"
#include "Relocations.h"
+#include "Target.h"
#include "lld/Common/ErrorHandler.h"
#include "lld/Common/Strings.h"
#include "llvm/BinaryFormat/Dwarf.h"
#include "llvm/Object/ELF.h"
-#include "llvm/Support/Endian.h"
using namespace llvm;
using namespace llvm::ELF;
using namespace llvm::dwarf;
using namespace llvm::object;
-using namespace llvm::support::endian;
using namespace lld;
using namespace lld::elf;
@@ -72,7 +71,7 @@ size_t EhReader::readEhRecordSize() {
// First 4 bytes of CIE/FDE is the size of the record.
// If it is 0xFFFFFFFF, the next 8 bytes contain the size instead,
// but we do not support that format yet.
- uint64_t V = read32(D.data(), Config->Endianness);
+ uint64_t V = read32(D.data());
if (V == UINT32_MAX)
failOn(D.data(), "CIE/FDE too large");
uint64_t Size = V + 4;
More information about the llvm-commits
mailing list