[llvm] r375148 - NFC: Fix variable only used in asserts by propagating the value.
Sterling Augustine via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 17 11:08:16 PDT 2019
Author: saugustine
Date: Thu Oct 17 11:08:16 2019
New Revision: 375148
URL: http://llvm.org/viewvc/llvm-project?rev=375148&view=rev
Log:
NFC: Fix variable only used in asserts by propagating the value.
Summary:
This fixes builds with assertions disabled that would otherwise
fail with unused variable warnings
Subscribers: nemanjai, hiraditya, kbarton, MaskRay, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69123
Modified:
llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp
Modified: llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp?rev=375148&r1=375147&r2=375148&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp Thu Oct 17 11:08:16 2019
@@ -536,7 +536,6 @@ static MCSymbol *getMCSymbolForTOCPseudo
void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) {
MCInst TmpInst;
const bool IsDarwin = TM.getTargetTriple().isOSDarwin();
- const bool IsPPC64 = Subtarget->isPPC64();
const bool IsAIX = Subtarget->isAIXABI();
const Module *M = MF->getFunction().getParent();
PICLevel::Level PL = M->getPICLevel();
@@ -760,7 +759,8 @@ void PPCAsmPrinter::EmitInstruction(cons
return;
}
case PPC::ADDIStocHA: {
- assert((IsAIX && !IsPPC64 && TM.getCodeModel() == CodeModel::Large) &&
+ assert((IsAIX && !Subtarget->isPPC64() &&
+ TM.getCodeModel() == CodeModel::Large) &&
"This pseudo should only be selected for 32-bit large code model on"
" AIX.");
@@ -790,7 +790,8 @@ void PPCAsmPrinter::EmitInstruction(cons
return;
}
case PPC::LWZtocL: {
- assert(IsAIX && !IsPPC64 && TM.getCodeModel() == CodeModel::Large &&
+ assert(IsAIX && !Subtarget->isPPC64() &&
+ TM.getCodeModel() == CodeModel::Large &&
"This pseudo should only be selected for 32-bit large code model on"
" AIX.");
More information about the llvm-commits
mailing list