[llvm] 1bc0e85 - [SystemZ][z/OS] Enable the AllowAtInName attribute for the HLASM dialect

Anirudh Prasad via llvm-commits llvm-commits at lists.llvm.org
Wed May 26 07:50:07 PDT 2021


Author: Anirudh Prasad
Date: 2021-05-26T10:49:57-04:00
New Revision: 1bc0e857bfd4d5a10675b5b75494c2ea6cff7c78

URL: https://github.com/llvm/llvm-project/commit/1bc0e857bfd4d5a10675b5b75494c2ea6cff7c78
DIFF: https://github.com/llvm/llvm-project/commit/1bc0e857bfd4d5a10675b5b75494c2ea6cff7c78.diff

LOG: [SystemZ][z/OS] Enable the AllowAtInName attribute for the HLASM dialect

- Currently, LLVM supports symbols of the name "token1 at token2".
- "token2" is used to identify whether an appropriate symbol reference can be used for the symbol.
- Now, if the symbol reference couldn't be found, the AsmParser usually emits an error, unless the backend is configured to accept the "@" in a symbol name
- Thus, this patch aims to do that. It sets the `AllowAtInName` attribute in the SystemZ backend for the HLASM dialect.
- Setting this attribute ensures that, if a particular symbol reference is found, it uses that. If it doesn't, and there exists an "@" in the symbol name, it will use that instead of explicitly erroring out.

Reviewed By: uweigand

Differential Revision: https://reviews.llvm.org/D103111

Added: 
    

Modified: 
    llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.cpp b/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.cpp
index 61fe2f4a5fdba..2d62558539121 100644
--- a/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.cpp
+++ b/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.cpp
@@ -30,6 +30,7 @@ SystemZMCAsmInfo::SystemZMCAsmInfo(const Triple &TT) {
   DotIsPC = (AssemblerDialect == AD_ATT);
   StarIsPC = (AssemblerDialect == AD_HLASM);
   EmitGNUAsmStartIndentationMarker = (AssemblerDialect == AD_ATT);
+  AllowAtInName = (AssemblerDialect == AD_HLASM);
 
   ZeroDirective = "\t.space\t";
   Data64bitsDirective = "\t.quad\t";


        


More information about the llvm-commits mailing list