]> granicus.if.org Git - llvm/commitdiff
[X86AsmParser] Refactor AsmRewrite constructors, NFCI
authorKrasimir Georgiev <krasimir@google.com>
Thu, 24 Aug 2017 15:03:18 +0000 (15:03 +0000)
committerKrasimir Georgiev <krasimir@google.com>
Thu, 24 Aug 2017 15:03:18 +0000 (15:03 +0000)
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

include/llvm/MC/MCParser/MCTargetAsmParser.h

index 364b9fd32897b8dbf41a8fd01e307bc514f68a31..6d76d510bf7a691cddbc0c2e29afa780d9f21176 100644 (file)
@@ -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 {