[llvm-dev] Why is there no EmitInt64 in AsmPrinter?

James Henderson via llvm-dev llvm-dev at lists.llvm.org
Fri Mar 9 07:43:53 PST 2018


Hi all,

The AsmPrinter class supports functions like EmitInt8, EmitInt16, and
EmitInt32 for writing a 1/2/4 byte directive to the assembly. Each of these
calls the MCStreamer::EmitIntValue method with the corresponding size. For
some reason, there is no EmitInt64, and I was wondering if there was a
fundamental reason why? The EmitIntValue function appears to support 8-byte
inputs.

I dug into this a bit more and found a commit way back in 2010 (r100296)
that removed the "EmitInt64" equivalent, with no explanation (presumably it
was unused).

I'd find this function quite helpful - I'm currently working on extending
the DwarfGenerator unit-test helper class to support debug line, and I'd
like to be able to write 8 byte values (e.g. to reflect DWARF64 lengths). I
could trivially reinstate the function, but if there's a good reason not
to, it would be good to know before I go to the effort of creating a review
for it.

Thanks for any help.

James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180309/c79b6da1/attachment.html>


More information about the llvm-dev mailing list