[all-commits] [llvm/llvm-project] b37a2f: [SystemZ][z/OS] Validate symbol names for z/OS for...

Anirudh Prasad via All-commits all-commits at lists.llvm.org
Wed May 26 07:37:36 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b37a2fcd8d7c59c3db4b1c64bbdba6d1bbea9e99
      https://github.com/llvm/llvm-project/commit/b37a2fcd8d7c59c3db4b1c64bbdba6d1bbea9e99
  Author: Anirudh Prasad <anirudh_prasad at hotmail.com>
  Date:   2021-05-26 (Wed, 26 May 2021)

  Changed paths:
    M llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.cpp
    M llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.h
    M llvm/unittests/MC/SystemZ/SystemZAsmLexerTest.cpp

  Log Message:
  -----------
  [SystemZ][z/OS] Validate symbol names for z/OS for printing without quotes

- Currently, before printing a label in MCSymbol.cpp (MCSymbol::print), the current code "validates" the label that is to be printed.
- If it fails the validation step, then it prints the label within double quotes.
- However, the validation is provided as a virtual function in MCAsmInfo.h (i.e. isAcceptableChar() function). So we can override this for the AD_HLASM dialect in SystemZMCAsmInfo.cpp.

Reviewed By: uweigand

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




More information about the All-commits mailing list