[llvm] r311666 - [X86AsmParser] Refactor AsmRewrite constructors, NFCI

Krasimir Georgiev via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 24 08:03:18 PDT 2017


Author: krasimir
Date: Thu Aug 24 08:03:18 2017
New Revision: 311666

URL: http://llvm.org/viewvc/llvm-project?rev=311666&view=rev
Log:
[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

Modified:
    llvm/trunk/include/llvm/MC/MCParser/MCTargetAsmParser.h

Modified: llvm/trunk/include/llvm/MC/MCParser/MCTargetAsmParser.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCParser/MCTargetAsmParser.h?rev=311666&r1=311665&r2=311666&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCParser/MCTargetAsmParser.h (original)
+++ llvm/trunk/include/llvm/MC/MCParser/MCTargetAsmParser.h Thu Aug 24 08:03:18 2017
@@ -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 {




More information about the llvm-commits mailing list