summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2018-03-30 23:13:00 +0000
committerFangrui Song <maskray@google.com>2018-03-30 23:13:00 +0000
commitef61d85fc9151a0cf588c98ea91b4849bfe79e25 (patch)
tree3dd2220fb177cf80ed35285685cf7350cf634d5e
parent956ee797955c852e4055194a82c78a3ba3519128 (diff)
downloadbcm5719-llvm-ef61d85fc9151a0cf588c98ea91b4849bfe79e25.tar.gz
bcm5719-llvm-ef61d85fc9151a0cf588c98ea91b4849bfe79e25.zip
[ELF] Simplify read32. NFC
llvm-svn: 328908
-rw-r--r--lld/ELF/EhFrame.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lld/ELF/EhFrame.cpp b/lld/ELF/EhFrame.cpp
index 159108eac8f..20b32c0a96e 100644
--- a/lld/ELF/EhFrame.cpp
+++ b/lld/ELF/EhFrame.cpp
@@ -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;
OpenPOWER on IntegriCloud