[PATCH] D34988: Reduce duplication in pcrel reloc creation
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 6 09:24:28 PDT 2017
rnk added inline comments.
================
Comment at: lib/MC/MCAssembler.cpp:214
+ // still too many odd broken tests with that.
+ if (Asm.getContext().getObjectFileInfo()->getObjectFileType() ==
+ MCObjectFileInfo::IsMachO)
----------------
Should we check this first before we do work on SymB? It'll predict well.
================
Comment at: test/MC/AArch64/error-location.s:7
.text
-// CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: symbol 'undef' can not be undefined in a subtraction expression
+// CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: No relocation available to represent this relative expression
.word (0-undef)
----------------
Can we improve this diagnostic to mention SymbolB and maybe SymbolA? This test case makes it seem like our assembler diagnostics will get harder to understand. I was thinking:
error: No relocation available to represent the subtraction of 'undef' in this expression
https://reviews.llvm.org/D34988
More information about the llvm-commits
mailing list