[ARM] Parse Tag_also_compatible_with attribute
authorVictor Campos <victor.campos@arm.com>
Tue, 12 Jul 2022 15:10:58 +0000 (16:10 +0100)
committerVictor Campos <victor.campos@arm.com>
Tue, 16 Aug 2022 10:22:56 +0000 (11:22 +0100)
commit08c6840f254ccc1d93da2e1f79d398d30f8b3862
tree45f6531a4cf4519fa7f9c9e7e8c60ed24347e693
parent807b8cb06ca05228f3ecb4709f4f4141748d2ca9
[ARM] Parse Tag_also_compatible_with attribute

The ARM Attribute Parser used to parse the value of also_compatible_with
as it is, disregarding the way it is encoded.

This patch does a context aware parsing of the also_compatible_with
attribute. Additionally, some error handling is also done for incorrect
cases.

Reviewed By: pratlucas

Differential Revision: https://reviews.llvm.org/D130913
llvm/include/llvm/Support/ARMAttributeParser.h
llvm/include/llvm/Support/ScopedPrinter.h
llvm/lib/Support/ARMAttributeParser.cpp
llvm/test/MC/ARM/directive-eabi_attribute-also_compatible_with-integer.s [new file with mode: 0644]
llvm/test/MC/ARM/directive-eabi_attribute-also_compatible_with-invalid_arch.s [new file with mode: 0644]
llvm/test/MC/ARM/directive-eabi_attribute-also_compatible_with-invalid_tag.s [new file with mode: 0644]
llvm/test/MC/ARM/directive-eabi_attribute-also_compatible_with-recursive.s [new file with mode: 0644]
llvm/test/MC/ARM/directive-eabi_attribute-also_compatible_with-string.s [new file with mode: 0644]
llvm/test/MC/ARM/directive-eabi_attribute.s