Skip to content

Commit 4f9cc15

Browse files
Revert "[AsmParser][SystemZ][z/OS] Introducing HLASM Comment Syntax"
This reverts commit bcdd40f. See https://reviews.llvm.org/D98543.
1 parent d7b7e20 commit 4f9cc15

File tree

5 files changed

+2
-189
lines changed

5 files changed

+2
-189
lines changed

llvm/include/llvm/MC/MCAsmInfo.h

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,10 @@ class MCAsmInfo {
122122
/// other when on the same line. Defaults to ';'
123123
const char *SeparatorString;
124124

125-
/// This indicates the comment string used by the assembler. Defaults to
125+
/// This indicates the comment character used by the assembler. Defaults to
126126
/// "#"
127127
StringRef CommentString;
128128

129-
/// This indicates whether the comment string is only accepted as a comment
130-
/// at the beginning of statements. Defaults to false.
131-
bool RestrictCommentStringToStartOfStatement = false;
132-
133129
/// This is appended to emitted labels. Defaults to ":"
134130
const char *LabelSuffix;
135131

@@ -561,9 +557,6 @@ class MCAsmInfo {
561557
unsigned getCommentColumn() const { return 40; }
562558

563559
StringRef getCommentString() const { return CommentString; }
564-
bool getRestrictCommentStringToStartOfStatement() const {
565-
return RestrictCommentStringToStartOfStatement;
566-
}
567560
const char *getLabelSuffix() const { return LabelSuffix; }
568561

569562
bool useAssignmentForEHBegin() const { return UseAssignmentForEHBegin; }

llvm/lib/MC/MCParser/AsmLexer.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -659,9 +659,6 @@ size_t AsmLexer::peekTokens(MutableArrayRef<AsmToken> Buf,
659659
}
660660

661661
bool AsmLexer::isAtStartOfComment(const char *Ptr) {
662-
if (MAI.getRestrictCommentStringToStartOfStatement() && !IsAtStartOfStatement)
663-
return false;
664-
665662
StringRef CommentString = MAI.getCommentString();
666663

667664
if (CommentString.size() == 1)

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ SystemZMCAsmInfo::SystemZMCAsmInfo(const Triple &TT) {
2121

2222
MaxInstLength = 6;
2323

24-
CommentString = AssemblerDialect == AD_HLASM ? "*" : "#";
25-
RestrictCommentStringToStartOfStatement = (AssemblerDialect == AD_HLASM);
24+
CommentString = "#";
2625
ZeroDirective = "\t.space\t";
2726
Data64bitsDirective = "\t.quad\t";
2827
UsesELFSectionDirectiveForBSS = true;

llvm/unittests/MC/SystemZ/CMakeLists.txt

Lines changed: 0 additions & 13 deletions
This file was deleted.

llvm/unittests/MC/SystemZ/SystemZAsmLexerTest.cpp

Lines changed: 0 additions & 163 deletions
This file was deleted.

0 commit comments

Comments
 (0)