[llvm] r292404 - [X86] Minor code cleanup to fix several clang-tidy warnings. NFC
Kirill Bobyrev via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 18 08:15:47 PST 2017
Author: omtcyfz
Date: Wed Jan 18 10:15:47 2017
New Revision: 292404
URL: http://llvm.org/viewvc/llvm-project?rev=292404&view=rev
Log:
[X86] Minor code cleanup to fix several clang-tidy warnings. NFC
Modified:
llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Modified: llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp?rev=292404&r1=292403&r2=292404&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp (original)
+++ llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp Wed Jan 18 10:15:47 2017
@@ -138,7 +138,7 @@ private:
// The operator on the top of the stack has higher precedence than the
// new operator.
unsigned ParenCount = 0;
- while (1) {
+ while (true) {
// Nothing to process.
if (InfixOperatorStack.empty())
break;
@@ -1823,7 +1823,7 @@ std::unique_ptr<X86Operand> X86AsmParser
return ParseIntelBracExpression(/*SegReg=*/0, Start, /*ImmDisp=*/0, false,
Size);
- AsmToken StartTok = Tok;
+ const AsmToken &StartTok = Tok;
IntelExprStateMachine SM(/*Imm=*/0, /*StopOnLBrac=*/true,
/*AddImmPrefix=*/false);
if (ParseIntelExpression(SM, End))
@@ -2374,7 +2374,7 @@ bool X86AsmParser::ParseInstruction(Pars
Operands.push_back(X86Operand::CreateToken("*", consumeToken()));
// Read the operands.
- while(1) {
+ while (true) {
if (std::unique_ptr<X86Operand> Op = ParseOperand()) {
Operands.push_back(std::move(Op));
if (HandleAVX512Operand(Operands, *Operands.back()))
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=292404&r1=292403&r2=292404&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Wed Jan 18 10:15:47 2017
@@ -25369,7 +25369,7 @@ X86TargetLowering::EmitLoweredTLSAddr(Ma
// inside MC, therefore without the two markers shrink-wrapping
// may push the prologue/epilogue pass them.
const TargetInstrInfo &TII = *Subtarget.getInstrInfo();
- DebugLoc DL = MI.getDebugLoc();
+ const DebugLoc &DL = MI.getDebugLoc();
MachineFunction &MF = *BB->getParent();
// Emit CALLSEQ_START right before the instruction.
@@ -34624,7 +34624,7 @@ void X86TargetLowering::LowerAsmOperandF
int64_t Offset = 0;
// Match either (GA), (GA+C), (GA+C1+C2), etc.
- while (1) {
+ while (true) {
if ((GA = dyn_cast<GlobalAddressSDNode>(Op))) {
Offset += GA->getOffset();
break;
More information about the llvm-commits
mailing list