From fc64ef1a159c3ecebaf7e5b5f312e221e12f8fdd Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Tue, 16 Feb 2016 15:29:06 +0000 Subject: Reverting r260922-260923; they cause link failures with MSVC. http://lab.llvm.org:8011/builders/lldb-x86-windows-msvc2015/builds/15436/steps/build/logs/stdio http://bb.pgr.jp/builders/msbuild-llvmclang-x64-msc18-DA/builds/961/steps/build_llvm/logs/stdio llvm-svn: 260972 --- llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'llvm/lib/CodeGen') diff --git a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp index b1a8332d608..ffbda5ba591 100644 --- a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp +++ b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp @@ -13,7 +13,6 @@ #include "llvm/CodeGen/GlobalISel/IRTranslator.h" #include "llvm/ADT/SmallVector.h" -#include "llvm/CodeGen/GlobalISel/CallLowering.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineRegisterInfo.h" #include "llvm/IR/Constant.h" @@ -76,7 +75,7 @@ bool IRTranslator::translateReturn(const Instruction &Inst) { // The target may mess up with the insertion point, but // this is not important as a return is the last instruction // of the block anyway. - return CLI->LowerReturn(MIRBuilder, Ret, + return TLI->LowerReturn(MIRBuilder, Ret, !Ret ? 0 : getOrCreateVReg(Ret)); } @@ -105,7 +104,7 @@ bool IRTranslator::runOnMachineFunction(MachineFunction &MF) { const Function &F = *MF.getFunction(); if (F.empty()) return false; - CLI = MF.getSubtarget().getCallLowering(); + TLI = MF.getSubtarget().getTargetLowering(); MIRBuilder.setFunction(MF); MRI = &MF.getRegInfo(); // Setup the arguments. @@ -114,7 +113,7 @@ bool IRTranslator::runOnMachineFunction(MachineFunction &MF) { SmallVector VRegArgs; for (const Argument &Arg: F.args()) VRegArgs.push_back(getOrCreateVReg(&Arg)); - bool Succeeded = CLI->LowerFormalArguments(MIRBuilder, F.getArgumentList(), + bool Succeeded = TLI->LowerFormalArguments(MIRBuilder, F.getArgumentList(), VRegArgs); if (!Succeeded) report_fatal_error("Unable to lower arguments"); -- cgit v1.2.3