[all-commits] [llvm/llvm-project] ae2aef: [AsmParser][SystemZ][z/OS] Reject character and st...

Anirudh Prasad via All-commits all-commits at lists.llvm.org
Wed May 5 07:22:21 PDT 2021


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

  Changed paths:
    M llvm/include/llvm/MC/MCParser/MCAsmLexer.h
    M llvm/lib/MC/MCParser/AsmLexer.cpp
    M llvm/unittests/MC/SystemZ/SystemZAsmLexerTest.cpp

  Log Message:
  -----------
  [AsmParser][SystemZ][z/OS] Reject character and string literals for HLASM

- As per the HLASM support we are providing, i.e. support only for the first parameter of the inline asm block, only pertaining to Z machine instructions defined in LLVM, character literals and string literals are not supported (see Figure 4 - https://www-01.ibm.com/servers/resourcelink/svc00100.nsf/pages/zOSV2R3sc264940/$file/asmr1023.pdf for more information)
- This patch explicitly rejects the usage of char literals and string literals (for example "abc 'a'") when the relevant field is set
- This is achieved by introducing a field called `LexHLASMStrings` in MCAsmLexer similar to `LexMasmStrings`

Reviewed By: abhina.sreeskantharajan, Kai

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




More information about the All-commits mailing list