typedef std::unique_ptr<AMDGPUOperand> Ptr;
struct Modifiers {
- bool Abs;
- bool Neg;
- bool Sext;
+ bool Abs = false;
+ bool Neg = false;
+ bool Sext = false;
bool hasFPModifiers() const { return Abs || Neg; }
bool hasIntModifiers() const { return Sext; }
Op->Imm.Val = Val;
Op->Imm.IsFPImm = IsFPImm;
Op->Imm.Type = Type;
- Op->Imm.Mods = {false, false, false};
+ Op->Imm.Mods = Modifiers();
Op->StartLoc = Loc;
Op->EndLoc = Loc;
return Op;
bool ForceVOP3) {
auto Op = llvm::make_unique<AMDGPUOperand>(Register, AsmParser);
Op->Reg.RegNo = RegNo;
- Op->Reg.Mods = {false, false, false};
+ Op->Reg.Mods = Modifiers();
Op->Reg.IsForcedVOP3 = ForceVOP3;
Op->StartLoc = S;
Op->EndLoc = E;
return Res;
}
- AMDGPUOperand::Modifiers Mods = {false, false, false};
+ AMDGPUOperand::Modifiers Mods;
if (Negate) {
Mods.Neg = true;
}
return Res;
}
- AMDGPUOperand::Modifiers Mods = {false, false, false};
+ AMDGPUOperand::Modifiers Mods;
if (Sext) {
if (getLexer().isNot(AsmToken::RParen)) {
Error(Parser.getTok().getLoc(), "expected closing parentheses");
AMDGPUAsmParser::parseIntWithPrefix(const char *Prefix, OperandVector &Operands,
enum AMDGPUOperand::ImmTy ImmTy,
bool (*ConvertResult)(int64_t&)) {
-
SMLoc S = Parser.getTok().getLoc();
int64_t Value = 0;