[PATCH] D105491: [clang] Use i64 for the !srcloc metadata on asm IR nodes.

Duncan P. N. Exon Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 16 12:58:42 PDT 2021


dexonsmith added a comment.

In D105491#2882549 <https://reviews.llvm.org/D105491#2882549>, @tmatheson wrote:

> @dexonsmith I don't think they need upgraded. Most of the places I can see referencing `!srcloc` are copying it around and will preserve the i32 type. Cases which actually read the value are already reading it as 64 bit via `getZExtValue` and have been updated here, e.g. `MachineInstr::emitError`

Seems reasonable to me. I'd suggest documenting in the textual IR testcases for `!srcloc` (I assume there are existing ones for consumers, such as AsmPrinter::emitInlineAsm or something?) that `i32` should continue to work, even though emission will be `i64` now, and that if that changes a bitcode upgrade should be added. And maybe you can/should add examples to the test that use `i64`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105491/new/

https://reviews.llvm.org/D105491



More information about the llvm-commits mailing list