Skip to content

Commit 605b046

Browse files
committedMay 10, 2017
[AArch64] Fix a comment to match the code. NFC.
For the ELF case, the default/preferred form is the generic one, not the short one as used for Apple - fix the comment to say so. Currently it is a copy-paste typo. Make the comments on the darwin default a bit more verbose. Use enum names instead of literal 0/1 to further increase readability and reduce fragility. Differential Revision: https://reviews.llvm.org/D32963 llvm-svn: 302634
1 parent 45fe70f commit 605b046

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed
 

‎llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp

+6-4
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ static cl::opt<AsmWriterVariantTy> AsmWriterVariant(
3232
clEnumValN(Apple, "apple", "Emit Apple-style NEON assembly")));
3333

3434
AArch64MCAsmInfoDarwin::AArch64MCAsmInfoDarwin() {
35-
// We prefer NEON instructions to be printed in the short form.
36-
AssemblerDialect = AsmWriterVariant == Default ? 1 : AsmWriterVariant;
35+
// We prefer NEON instructions to be printed in the short, Apple-specific
36+
// form when targeting Darwin.
37+
AssemblerDialect = AsmWriterVariant == Default ? Apple : AsmWriterVariant;
3738

3839
PrivateGlobalPrefix = "L";
3940
PrivateLabelPrefix = "L";
@@ -68,8 +69,9 @@ AArch64MCAsmInfoELF::AArch64MCAsmInfoELF(const Triple &T) {
6869
if (T.getArch() == Triple::aarch64_be)
6970
IsLittleEndian = false;
7071

71-
// We prefer NEON instructions to be printed in the short form.
72-
AssemblerDialect = AsmWriterVariant == Default ? 0 : AsmWriterVariant;
72+
// We prefer NEON instructions to be printed in the generic form when
73+
// targeting ELF.
74+
AssemblerDialect = AsmWriterVariant == Default ? Generic : AsmWriterVariant;
7375

7476
CodePointerSize = 8;
7577

0 commit comments

Comments
 (0)
Please sign in to comment.