summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2014-07-15 18:36:27 -0700
committerStephen Hines <srhines@google.com>2014-07-15 18:36:27 -0700
commitcfcb6a6805ea40ac7535f2adfcb581a917eca215 (patch)
treed86721ebcd135274b0f0f235289a14cbe7e436c5
parent0dea6bc96bb52346737966839ac68644f7939f58 (diff)
downloadmclinker-cfcb6a6805ea40ac7535f2adfcb581a917eca215.tar.gz
Fix Android build for mclinker.
Change-Id: Icf0039eba69af6ae6a04990f28b686eae4a32ec1
-rw-r--r--lib/LD/BranchIslandFactory.cpp2
-rw-r--r--lib/Support/MemoryArea.cpp1
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/LD/BranchIslandFactory.cpp b/lib/LD/BranchIslandFactory.cpp
index fcaa2eb..0147e5f 100644
--- a/lib/LD/BranchIslandFactory.cpp
+++ b/lib/LD/BranchIslandFactory.cpp
@@ -90,7 +90,7 @@ BranchIslandFactory::getIslands(const Fragment& pFragment)
if (prev != ie) {
int64_t bwd_off = (int64_t)pFragment.getOffset() + m_MaxBwdBranchRange;
if ((pFragment.getOffset() > (*prev).offset()) &&
- (bwd_off <= (*prev).offset())) {
+ (bwd_off <= (int64_t) (*prev).offset())) {
bwd = &*prev;
}
}
diff --git a/lib/Support/MemoryArea.cpp b/lib/Support/MemoryArea.cpp
index 548ac72..d796283 100644
--- a/lib/Support/MemoryArea.cpp
+++ b/lib/Support/MemoryArea.cpp
@@ -25,6 +25,7 @@ MemoryArea::MemoryArea(llvm::StringRef pFilename)
llvm::MemoryBuffer::getFile(pFilename, /*FileSize*/ -1,
/*RequiresNullTerminator*/ false);
if (std::error_code ec = buffer_or_error.getError()) {
+ (void) ec;
fatal(diag::fatal_cannot_read_input) << pFilename.str();
}
m_pMemoryBuffer = std::move(buffer_or_error.get());