[flang-commits] [PATCH] D122711: [flang] Skip `D` when including D debug line
Jean Perier via Phabricator via flang-commits
flang-commits at lists.llvm.org
Wed Mar 30 02:19:01 PDT 2022
jeanPerier created this revision.
jeanPerier added a reviewer: klausler.
jeanPerier added a project: Flang.
Herald added a subscriber: jdoerfert.
Herald added a project: All.
jeanPerier requested review of this revision.
When including debug lines as code, the `D` should be considered as
a white space. Currently an error was raised about bad labels because
it the `D` remained a `D` when considering the source line as code.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D122711
Files:
flang/lib/Parser/prescan.cpp
Index: flang/lib/Parser/prescan.cpp
===================================================================
--- flang/lib/Parser/prescan.cpp
+++ flang/lib/Parser/prescan.cpp
@@ -144,6 +144,10 @@
case LineClassification::Kind::Source:
BeginStatementAndAdvance();
if (inFixedForm_) {
+ if (features_.IsEnabled(LanguageFeature::OldDebugLines) &&
+ (*at_ == 'D' || *at_ == 'd')) {
+ NextChar();
+ }
LabelField(tokens);
} else if (skipLeadingAmpersand_) {
skipLeadingAmpersand_ = false;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122711.419078.patch
Type: text/x-patch
Size: 536 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20220330/da0cc341/attachment.bin>
More information about the flang-commits
mailing list