The ARM elf emitter would omit printing data symbol when constant data. This patch overrides the emitFill method as to enforce that the symbol is correctly printed.
Details
Diff Detail
Event Timeline
lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp | ||
---|---|---|
1485 | Why can't we just call EmitDataMappingSymbol, like EmitBytes does? | |
test/CodeGen/ARM/CheckDataSymbol.ll | ||
1 ↗ | (On Diff #167785) | I don't think this test is necessary, since this can be tested with an assembly file. |
test/CodeGen/ARM/CheckDataSymbol.s | ||
18 | This test can be reduced greatly, to something like this: .text nop .zero 4 |
lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp | ||
---|---|---|
1485 | Indeed it can. |
Simplified tests. Using the standard function for emitting data symbols, if required.
test/CodeGen/ARM/CheckDataSymbol.s | ||
---|---|---|
1 | We can't use clang in LLVM tests (LLVM can be built without clang), this should use llvm-mc instead. Also, this should be in tests/MC/ARM, not tests/CodeGen/ARM, since it's testing stuff in the MC layer. |
LGTM with one nit.
test/MC/ARM/CheckDataSymbol.s | ||
---|---|---|
1 ↗ | (On Diff #167912) | The -arm-implicit-it=thumb option isn't needed here. |
Why can't we just call EmitDataMappingSymbol, like EmitBytes does?