[PATCH] D99891: [SystemZ][z/OS] Introduce dialect querying helper functions

Anirudh Prasad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 13 09:14:57 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG7da22dfcd06a: [SystemZ][z/OS] Introduce dialect querying helper functions (authored by anirudhp).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99891/new/

https://reviews.llvm.org/D99891

Files:
  llvm/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp


Index: llvm/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp
===================================================================
--- llvm/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp
+++ llvm/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp
@@ -460,6 +460,12 @@
   // A digit in HLASM is a number from 0 to 9.
   inline bool isHLASMAlnum(char C) { return isHLASMAlpha(C) || isDigit(C); }
 
+  // Are we parsing using the AD_HLASM dialect?
+  inline bool isParsingHLASM() { return getMAIAssemblerDialect() == AD_HLASM; }
+
+  // Are we parsing using the AD_ATT dialect?
+  inline bool isParsingATT() { return getMAIAssemblerDialect() == AD_ATT; }
+
 public:
   SystemZAsmParser(const MCSubtargetInfo &sti, MCAsmParser &parser,
                    const MCInstrInfo &MII,
@@ -1606,7 +1612,7 @@
 }
 
 bool SystemZAsmParser::isLabel(AsmToken &Token) {
-  if (getMAIAssemblerDialect() == AD_ATT)
+  if (isParsingATT())
     return true;
 
   // HLASM labels are ordinary symbols.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99891.337185.patch
Type: text/x-patch
Size: 982 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210413/8aa8eeb6/attachment.bin>


More information about the llvm-commits mailing list