[PATCH] D69123: NFC: Fix variable only used in asserts by propagating the value.
Sterling Augustine via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 17 11:02:12 PDT 2019
saugustine created this revision.
Herald added subscribers: llvm-commits, jsji, MaskRay, kbarton, hiraditya, nemanjai.
Herald added a project: LLVM.
This fixes builds with assertions disabled that would otherwise
fail with unused variable warnings
Repository:
rL LLVM
https://reviews.llvm.org/D69123
Files:
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
===================================================================
--- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
+++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
@@ -536,7 +536,6 @@
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 @@
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 @@
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.");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69123.225469.patch
Type: text/x-patch
Size: 1244 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191017/45a678a9/attachment.bin>
More information about the llvm-commits
mailing list