From: Krasimir Georgiev Date: Thu, 24 Aug 2017 15:03:18 +0000 (+0000) Subject: [X86AsmParser] Refactor AsmRewrite constructors, NFCI X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f372a9f69aa7d1462ca4a4d3a29e50fc8b2b1c0f;p=llvm [X86AsmParser] Refactor AsmRewrite constructors, NFCI Summary: This is a follow-up of https://reviews.llvm.org/D37105, where a slight refactoring of the constructors of AsmRewrite is proposed. Reviewers: coby Reviewed By: coby Differential Revision: https://reviews.llvm.org/D37110 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311666 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/MC/MCParser/MCTargetAsmParser.h b/include/llvm/MC/MCParser/MCTargetAsmParser.h index 364b9fd3289..6d76d510bf7 100644 --- a/include/llvm/MC/MCParser/MCTargetAsmParser.h +++ b/include/llvm/MC/MCParser/MCTargetAsmParser.h @@ -113,9 +113,9 @@ public: AsmRewrite(AsmRewriteKind kind, SMLoc loc, unsigned len = 0, int64_t val = 0) : Kind(kind), Loc(loc), Len(len), Val(val) {} AsmRewrite(AsmRewriteKind kind, SMLoc loc, unsigned len, StringRef label) - : Kind(kind), Loc(loc), Len(len), Val(0), Label(label) {} + : AsmRewrite(kind, loc, len) { Label = label; } AsmRewrite(SMLoc loc, unsigned len, IntelExpr exp) - : Kind(AOK_IntelExpr), Loc(loc), Len(len), Val(0), IntelExp(exp) {} + : AsmRewrite(AOK_IntelExpr, loc, len) { IntelExp = exp; } }; struct ParseInstructionInfo {