From 41f2d34f9d4efad1928e890acc5c2924b5033909 Mon Sep 17 00:00:00 2001 From: Stephen Hines Date: Thu, 24 Apr 2014 15:13:18 -0700 Subject: Fix MCLinker to work with LLVM 3.5. Change-Id: I2c9124af20ca0cee0a29a687bf04c308ca402486 --- lib/CodeGen/MCLDTargetMachine.cpp | 9 ++++----- lib/Script/Android.mk | 2 ++ lib/Support/ToolOutputFile.cpp | 2 +- lib/Target/ELFAttribute.cpp | 2 +- lib/Target/Mips/MipsRelocator.cpp | 1 - 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/CodeGen/MCLDTargetMachine.cpp b/lib/CodeGen/MCLDTargetMachine.cpp index 272e775..9f71390 100644 --- a/lib/CodeGen/MCLDTargetMachine.cpp +++ b/lib/CodeGen/MCLDTargetMachine.cpp @@ -17,14 +17,14 @@ #include #include -#include -#include #include #include #include #include #include #include +#include +#include #include #include #include @@ -131,7 +131,7 @@ static void addPassesToHandleExceptions(llvm::TargetMachine *TM, PM.add(createDwarfEHPass(TM)); break; case llvm::ExceptionHandling::None: - PM.add(createLowerInvokePass(TM)); + PM.add(createLowerInvokePass()); // The lower invoke pass may create unreachable code. Remove it. PM.add(createUnreachableBlockEliminationPass()); @@ -303,7 +303,6 @@ mcld::MCLDTargetMachine::addCompilerPasses(llvm::legacy::PassManagerBase &pPM, OwningPtr AsmStreamer( m_pLLVMTarget->createAsmStreamer(*Context, pOutput, getVerboseAsm(), - getTM().hasMCUseLoc(), getTM().hasMCUseCFI(), getTM().hasMCUseDwarfDirectory(), InstPrinter, @@ -341,7 +340,7 @@ mcld::MCLDTargetMachine::addAssemblerPasses(llvm::legacy::PassManagerBase &pPM, // now, we have MCCodeEmitter and MCAsmBackend, we can create AsmStreamer. OwningPtr AsmStreamer(m_pLLVMTarget->createMCObjectStreamer( - m_Triple, *Context, *MAB, pOutput, MCE, getTM().hasMCRelaxAll(), + m_Triple, *Context, *MAB, pOutput, MCE, STI, getTM().hasMCRelaxAll(), getTM().hasMCNoExecStack())); AsmStreamer.get()->InitSections(); diff --git a/lib/Script/Android.mk b/lib/Script/Android.mk index e24fa35..16df891 100644 --- a/lib/Script/Android.mk +++ b/lib/Script/Android.mk @@ -39,6 +39,7 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := $(mcld_script_SRC_FILES) LOCAL_MODULE:= libmcldScript LOCAL_C_INCLUDES := $(MCLD_ROOT_PATH)/include/mcld/Script +LOCAL_CFLAGS := -Wno-deprecated-register LOCAL_MODULE_TAGS := optional @@ -52,6 +53,7 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := $(mcld_script_SRC_FILES) LOCAL_MODULE:= libmcldScript LOCAL_C_INCLUDES := $(MCLD_ROOT_PATH)/include/mcld/Script +LOCAL_CFLAGS := -Wno-deprecated-register LOCAL_MODULE_TAGS := optional diff --git a/lib/Support/ToolOutputFile.cpp b/lib/Support/ToolOutputFile.cpp index a1c94f4..92a3fab 100644 --- a/lib/Support/ToolOutputFile.cpp +++ b/lib/Support/ToolOutputFile.cpp @@ -37,7 +37,7 @@ ToolOutputFile::CleanupInstaller::~CleanupInstaller() // FIXME: In Windows, some path in CJK characters can not be removed by LLVM // llvm::sys::Path if (!Keep && "_" != m_Path.native()) { - bool Existed; + bool Existed = false; llvm::sys::fs::remove(m_Path.native(), Existed); } diff --git a/lib/Target/ELFAttribute.cpp b/lib/Target/ELFAttribute.cpp index 76882d3..ccffab7 100644 --- a/lib/Target/ELFAttribute.cpp +++ b/lib/Target/ELFAttribute.cpp @@ -241,7 +241,7 @@ bool ELFAttribute::Subsection::merge(const Input &pInput, ELFAttributeValue *out_attr; bool is_newly_created; - llvm::tie(out_attr, is_newly_created) = + std::tie(out_attr, is_newly_created) = m_AttrData.getOrCreateAttributeValue(tag); assert(out_attr != NULL); diff --git a/lib/Target/Mips/MipsRelocator.cpp b/lib/Target/Mips/MipsRelocator.cpp index 8f1c5e2..7da4dfd 100644 --- a/lib/Target/Mips/MipsRelocator.cpp +++ b/lib/Target/Mips/MipsRelocator.cpp @@ -27,7 +27,6 @@ enum { R_MIPS_LA25_LUI = 200, R_MIPS_LA25_J = 201, R_MIPS_LA25_ADD = 202, - R_MIPS_PC32 = 248, }; } // end namespace ELF -- cgit v1.2.3