diff options
author | Stephen Hines <srhines@google.com> | 2014-04-24 15:13:18 -0700 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2014-04-24 15:34:58 -0700 |
commit | 41f2d34f9d4efad1928e890acc5c2924b5033909 (patch) | |
tree | 179252a020f56e2a185af4af0ad2146992d6cacc /lib | |
parent | 98d256071dc852335e8b6933d6d99686f2fd533c (diff) | |
download | mclinker-41f2d34f9d4efad1928e890acc5c2924b5033909.tar.gz |
Fix MCLinker to work with LLVM 3.5.
Change-Id: I2c9124af20ca0cee0a29a687bf04c308ca402486
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/MCLDTargetMachine.cpp | 9 | ||||
-rw-r--r-- | lib/Script/Android.mk | 2 | ||||
-rw-r--r-- | lib/Support/ToolOutputFile.cpp | 2 | ||||
-rw-r--r-- | lib/Target/ELFAttribute.cpp | 2 | ||||
-rw-r--r-- | 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 <llvm/ADT/OwningPtr.h> #include <llvm/Analysis/Passes.h> -#include <llvm/Analysis/Verifier.h> -#include <llvm/Assembly/PrintModulePass.h> #include <llvm/CodeGen/AsmPrinter.h> #include <llvm/CodeGen/MachineFunctionAnalysis.h> #include <llvm/CodeGen/MachineModuleInfo.h> #include <llvm/CodeGen/GCStrategy.h> #include <llvm/CodeGen/Passes.h> #include <llvm/IR/DataLayout.h> +#include <llvm/IR/IRPrintingPasses.h> +#include <llvm/IR/Verifier.h> #include <llvm/MC/MCAsmInfo.h> #include <llvm/MC/MCStreamer.h> #include <llvm/MC/MCInstrInfo.h> @@ -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<MCStreamer> 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<MCStreamer> 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 |