[ARM] Rewrite ARMAttributeParser
authorFangrui Song <maskray@google.com>
Fri, 21 Feb 2020 19:32:33 +0000 (11:32 -0800)
committerFangrui Song <maskray@google.com>
Thu, 5 Mar 2020 18:57:27 +0000 (10:57 -0800)
commit791efb148f28e89a62413bcefd242911c6974ea6
treec3588d41e495b72c3a11d26414f7c7d097c22a01
parentf23df1b2a323094e5a6869ef085f100fd065bc0d
[ARM] Rewrite ARMAttributeParser

* Delete boilerplate
* Change functions to return `Error`
* Test parsing errors
* Update callers of ARMAttributeParser::parse() to check the `Error` return value.

Since this patch touches nearly everything in the file, I apply
http://llvm.org/docs/Proposals/VariableNames.html and change variable
names to lower case.

Reviewed By: compnerd

Differential Revision: https://reviews.llvm.org/D75015
lld/ELF/InputFiles.cpp
lld/test/ELF/arm-tag-vfp-args-illegal.s
lld/test/ELF/invalid/bad-arm-attributes.s
lld/test/ELF/invalid/bad-arm-attributes2.s [deleted file]
llvm/include/llvm/Object/ELFObjectFile.h
llvm/include/llvm/Support/ARMAttributeParser.h
llvm/include/llvm/Support/DataExtractor.h
llvm/lib/Object/ELFObjectFile.cpp
llvm/lib/Support/ARMAttributeParser.cpp
llvm/tools/llvm-readobj/ELFDumper.cpp
llvm/unittests/Support/ARMAttributeParser.cpp