[PATCH] D73176: [ARM] Fix dropped dollar sign from symbols in branch targets

Lucas Prates via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 23 07:52:11 PST 2020


pratlucas marked an inline comment as done.
pratlucas added inline comments.


================
Comment at: llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp:6051
+    // $42 -> immediate
+    // $foo -> symbol name
     S = Parser.getTok().getLoc();
----------------
chill wrote:
> What if we have here  `$ foo`, i.e. whitespace after the dollar? We should not paste together two separate tokens `$` and `<whatever>` to form an identifier,  `$foo`, `$12` are identifiers, but `$ 12` is not.
> 
> 
>From what I've checked, `parseExpression(...)` takes care of this scenario:
```
<stdin>:36:11: error: invalid token in expression
        b $ foo
          ^
```
The change is not binding the two actual tokens together, but only refraining from removing the $ token from the expression.
Please let me know if you believe a more active handling of this scenario is necessary.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73176





More information about the llvm-commits mailing list