This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Use addAliasForDirective to support data directives
ClosedPublic

Authored by asb on May 17 2018, 12:16 AM.

Details

Summary

The AArch64 asm parser currently has custom parsing logic for .hword, .word, and .xword. Rather than use this custom logic, we can just use addAliasForDirective to enable the reuse of AsmParser::parseDirectiveValue.

Diff Detail

Repository
rL LLVM

Event Timeline

asb created this revision.May 17 2018, 12:16 AM
javed.absar added inline comments.May 17 2018, 1:54 AM
lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
168 ↗(On Diff #147249)

maybe the comment can be ported here
"/// ::= .word [ expression (, expression)* ]"
if that makes sense

asb updated this revision to Diff 147457.May 18 2018, 2:58 AM
asb marked an inline comment as done.

Add comment describing the aliased directives.

fhahn accepted this revision.May 18 2018, 2:59 AM

LGTM, looks like a nice simplification, thanks!

This revision is now accepted and ready to land.May 18 2018, 2:59 AM
This revision was automatically updated to reflect the committed changes.