[PATCH] D105491: [clang] Use i64 for the !srcloc metadata on asm IR nodes.
Simon Tatham via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 6 09:26:03 PDT 2021
simon_tatham created this revision.
simon_tatham added reviewers: rsmith, lebedev.ri, akyrtzi.
Herald added subscribers: dexonsmith, hiraditya.
simon_tatham requested review of this revision.
Herald added projects: clang, LLVM.
Herald added subscribers: llvm-commits, cfe-commits.
This is part of a patch series working towards the ability to make
SourceLocation into a 64-bit type to handle larger translation units.
!srcloc is generated in clang codegen, and pulled back out by llvm
functions like AsmPrinter::emitInlineAsm that need to report errors in
the inline asm. From there it goes to LLVMContext::emitError, is
stored in DiagnosticInfoInlineAsm, and ends up back in clang, at
BackendConsumer::InlineAsmDiagHandler(), which reconstitutes a true
clang::SourceLocation from the integer cookie.
Throughout this code path, it's now 64-bit rather than 32, which means
that if SourceLocation is expanded to a 64-bit type, this error report
won't lose half of the data.
Patch originally by Mikhail Maltsev.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D105491
Files:
clang/lib/CodeGen/CGStmt.cpp
llvm/include/llvm/IR/DiagnosticInfo.h
llvm/include/llvm/IR/LLVMContext.h
llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
llvm/lib/CodeGen/MachineInstr.cpp
llvm/lib/IR/LLVMContext.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105491.356756.patch
Type: text/x-patch
Size: 5970 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210706/5fc3c238/attachment-0001.bin>
More information about the cfe-commits
mailing list