forked from OSchip/llvm-project
[X86] X86AsmParser - make methods const where possible. NFCI.
Reported by cppcheck
This commit is contained in:
parent
091b18ba81
commit
2692978050
|
@ -164,7 +164,7 @@ private:
|
||||||
SmallVector<InfixCalculatorTok, 4> InfixOperatorStack;
|
SmallVector<InfixCalculatorTok, 4> InfixOperatorStack;
|
||||||
SmallVector<ICToken, 4> PostfixStack;
|
SmallVector<ICToken, 4> PostfixStack;
|
||||||
|
|
||||||
bool isUnaryOperator(const InfixCalculatorTok Op) {
|
bool isUnaryOperator(InfixCalculatorTok Op) const {
|
||||||
return Op == IC_NEG || Op == IC_NOT;
|
return Op == IC_NEG || Op == IC_NOT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -395,24 +395,24 @@ private:
|
||||||
MemExpr(false), OffsetOperator(false) {}
|
MemExpr(false), OffsetOperator(false) {}
|
||||||
|
|
||||||
void addImm(int64_t imm) { Imm += imm; }
|
void addImm(int64_t imm) { Imm += imm; }
|
||||||
short getBracCount() { return BracCount; }
|
short getBracCount() const { return BracCount; }
|
||||||
bool isMemExpr() { return MemExpr; }
|
bool isMemExpr() const { return MemExpr; }
|
||||||
bool isOffsetOperator() { return OffsetOperator; }
|
bool isOffsetOperator() const { return OffsetOperator; }
|
||||||
SMLoc getOffsetLoc() { return OffsetOperatorLoc; }
|
SMLoc getOffsetLoc() const { return OffsetOperatorLoc; }
|
||||||
unsigned getBaseReg() { return BaseReg; }
|
unsigned getBaseReg() const { return BaseReg; }
|
||||||
unsigned getIndexReg() { return IndexReg; }
|
unsigned getIndexReg() const { return IndexReg; }
|
||||||
unsigned getScale() { return Scale; }
|
unsigned getScale() const { return Scale; }
|
||||||
const MCExpr *getSym() { return Sym; }
|
const MCExpr *getSym() const { return Sym; }
|
||||||
StringRef getSymName() { return SymName; }
|
StringRef getSymName() const { return SymName; }
|
||||||
StringRef getType() { return CurType.Name; }
|
StringRef getType() const { return CurType.Name; }
|
||||||
unsigned getSize() { return CurType.Size; }
|
unsigned getSize() const { return CurType.Size; }
|
||||||
unsigned getElementSize() { return CurType.ElementSize; }
|
unsigned getElementSize() const { return CurType.ElementSize; }
|
||||||
unsigned getLength() { return CurType.Length; }
|
unsigned getLength() const { return CurType.Length; }
|
||||||
int64_t getImm() { return Imm + IC.execute(); }
|
int64_t getImm() { return Imm + IC.execute(); }
|
||||||
bool isValidEndState() {
|
bool isValidEndState() const {
|
||||||
return State == IES_RBRAC || State == IES_INTEGER;
|
return State == IES_RBRAC || State == IES_INTEGER;
|
||||||
}
|
}
|
||||||
bool hadError() { return State == IES_ERROR; }
|
bool hadError() const { return State == IES_ERROR; }
|
||||||
const InlineAsmIdentifierInfo &getIdentifierInfo() const { return Info; }
|
const InlineAsmIdentifierInfo &getIdentifierInfo() const { return Info; }
|
||||||
|
|
||||||
void onOr() {
|
void onOr() {
|
||||||
|
|
Loading…
Reference in New Issue