[PATCH] D154101: [MC] Add three-state parseDirective as a replacement for ParseDirective

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 29 09:50:01 PDT 2023


MaskRay added inline comments.


================
Comment at: llvm/lib/Target/AVR/AsmParser/AVRAsmParser.cpp:700
                                         AVRMCExpr::VK_AVR_None);
-    return false;
+    return ParseStatus::NoMatch;
   }
----------------
barannikov88 wrote:
> @benshi001
> There is something odd here. It handles cases like: `.word foo - bar`, emits some data, but then lets the generic parser handle the directive, which results in emitting more data. It also looks like this code path is not covered by object-emission tests. This was introduced in D38029.
> 
Thank your for noting this.

Side note: I find that many target AsmParser have poor test coverage, and we need some attention.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D154101/new/

https://reviews.llvm.org/D154101



More information about the llvm-commits mailing list