diff options
author | Nemanja Ivanovic <nemanja.i.ibm@gmail.com> | 2016-02-20 20:45:37 +0000 |
---|---|---|
committer | Nemanja Ivanovic <nemanja.i.ibm@gmail.com> | 2016-02-20 20:45:37 +0000 |
commit | daf0ca234199b4ff5590d2918d67ee5f5db971a3 (patch) | |
tree | 626ab9edbd35c6dd378cafe7fd679ae3e42e5c1c /llvm/lib/Target/PowerPC/PPCFrameLowering.cpp | |
parent | 9ab99eecc3c614a6fc74f8ee8fab05ef43a0d3e5 (diff) | |
download | llvm-daf0ca234199b4ff5590d2918d67ee5f5db971a3.zip llvm-daf0ca234199b4ff5590d2918d67ee5f5db971a3.tar.gz llvm-daf0ca234199b4ff5590d2918d67ee5f5db971a3.tar.bz2 |
Fix the build bot break caused by rL261441.
The patch has a necessary call to a function inside an assert. Which is fine
when you have asserts turned on. Not so much when they're off. Sorry about
the regression.
llvm-svn: 261447
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCFrameLowering.cpp')
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCFrameLowering.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp b/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp index 4ac7338..92031d3 100644 --- a/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp +++ b/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp @@ -779,11 +779,14 @@ void PPCFrameLowering::emitPrologue(MachineFunction &MF, assert((isPPC64 || !isSVR4ABI || !(!FrameSize && (MustSaveLR || HasFP))) && "FrameSize must be >0 to save/restore the FP or LR for 32-bit SVR4."); - assert(findScratchRegister(&MBB, false, twoUniqueScratchRegsRequired(&MBB), - &ScratchReg, &TempReg) && + // Using the same bool variable as below to supress compiler warnings. + bool SingleScratchReg = + findScratchRegister(&MBB, false, twoUniqueScratchRegsRequired(&MBB), + &ScratchReg, &TempReg); + assert(SingleScratchReg && "Required number of registers not available in this block"); - bool SingleScratchReg = ScratchReg == TempReg; + SingleScratchReg = ScratchReg == TempReg; int LROffset = getReturnSaveOffset(); @@ -1133,10 +1136,13 @@ void PPCFrameLowering::emitEpilogue(MachineFunction &MF, int FPOffset = 0; - assert(findScratchRegister(&MBB, true, false, &ScratchReg, &TempReg) && + // Using the same bool variable as below to supress compiler warnings. + bool SingleScratchReg = findScratchRegister(&MBB, true, false, &ScratchReg, + &TempReg); + assert(SingleScratchReg && "Could not find an available scratch register"); - bool SingleScratchReg = ScratchReg == TempReg; + SingleScratchReg = ScratchReg == TempReg; if (HasFP) { if (isSVR4ABI) { |