@@ -30,6 +30,21 @@ static cl::opt<AsmWriterVariantTy> AsmWriterVariant(
3030 cl::values(clEnumValN(Generic, " generic" , " Emit generic NEON assembly" ),
3131 clEnumValN(Apple, " apple" , " Emit Apple-style NEON assembly" )));
3232
33+ const MCAsmInfo::VariantKindDesc variantKindDescs[] = {
34+ {MCSymbolRefExpr::VK_COFF_IMGREL32 , " IMGREL" },
35+ {MCSymbolRefExpr::VK_GOT , " GOT" },
36+ {MCSymbolRefExpr::VK_GOTPAGE , " GOTPAGE" },
37+ {MCSymbolRefExpr::VK_GOTPAGEOFF , " GOTPAGEOFF" },
38+ {MCSymbolRefExpr::VK_GOTPCREL , " GOTPCREL" },
39+ {MCSymbolRefExpr::VK_PAGE , " PAGE" },
40+ {MCSymbolRefExpr::VK_PAGEOFF , " PAGEOFF" },
41+ {MCSymbolRefExpr::VK_PLT , " PLT" },
42+ {MCSymbolRefExpr::VK_TLVP , " TLVP" },
43+ {MCSymbolRefExpr::VK_TLVPPAGE , " TLVPPAGE" },
44+ {MCSymbolRefExpr::VK_TLVPPAGEOFF , " TLVPPAGEOFF" },
45+ {MCSymbolRefExpr::VK_WEAKREF , " WEAKREF" },
46+ };
47+
3348AArch64MCAsmInfoDarwin::AArch64MCAsmInfoDarwin (bool IsILP32) {
3449 // We prefer NEON instructions to be printed in the short, Apple-specific
3550 // form when targeting Darwin.
@@ -48,6 +63,8 @@ AArch64MCAsmInfoDarwin::AArch64MCAsmInfoDarwin(bool IsILP32) {
4863 UseDataRegionDirectives = true ;
4964
5065 ExceptionsType = ExceptionHandling::DwarfCFI;
66+
67+ initializeVariantKinds (variantKindDescs);
5168}
5269
5370const MCExpr *AArch64MCAsmInfoDarwin::getExprForPersonalitySymbol (
@@ -97,6 +114,8 @@ AArch64MCAsmInfoELF::AArch64MCAsmInfoELF(const Triple &T) {
97114 ExceptionsType = ExceptionHandling::DwarfCFI;
98115
99116 HasIdentDirective = true ;
117+
118+ initializeVariantKinds (variantKindDescs);
100119}
101120
102121AArch64MCAsmInfoMicrosoftCOFF::AArch64MCAsmInfoMicrosoftCOFF () {
@@ -114,6 +133,8 @@ AArch64MCAsmInfoMicrosoftCOFF::AArch64MCAsmInfoMicrosoftCOFF() {
114133 CommentString = " //" ;
115134 ExceptionsType = ExceptionHandling::WinEH;
116135 WinEHEncodingType = WinEH::EncodingType::Itanium;
136+
137+ initializeVariantKinds (variantKindDescs);
117138}
118139
119140AArch64MCAsmInfoGNUCOFF::AArch64MCAsmInfoGNUCOFF () {
@@ -131,4 +152,6 @@ AArch64MCAsmInfoGNUCOFF::AArch64MCAsmInfoGNUCOFF() {
131152 CommentString = " //" ;
132153 ExceptionsType = ExceptionHandling::WinEH;
133154 WinEHEncodingType = WinEH::EncodingType::Itanium;
155+
156+ initializeVariantKinds (variantKindDescs);
134157}
0 commit comments