[PATCH] D149942: [IR] Drop const in DILocation::getMergedLocation
Christian Ulmann via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 5 02:12:59 PDT 2023
Dinistro created this revision.
Herald added subscribers: hoy, bviyer, Moerafaat, zero9178, bzcheeseman, awarzynski, sdasgup3, wenzhicui, wrengr, cota, teijeong, rdzhabarov, tatianashp, msifontes, jurahul, Kayjukh, grosul1, Joonsoo, liufengdb, aartbik, mgester, arpith-jacob, antiagainst, shauheen, rriddle, mehdi_amini, asbirlea, hiraditya.
Herald added a reviewer: ftynse.
Herald added a reviewer: dcaballe.
Herald added a project: All.
Dinistro requested review of this revision.
Herald added subscribers: llvm-commits, stephenneuendorffer, nicolasvasilache.
Herald added projects: MLIR, LLVM.
This commit removes constness from DILocation::getMergedLocation and
fixes all its users accordingly.
Having constness on the parameters forced the return type to be const
as well, which does force usage of `const_cast` when the location needs
to be used in metadata nodes.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D149942
Files:
llvm/include/llvm/IR/DebugInfoMetadata.h
llvm/include/llvm/IR/Instruction.h
llvm/lib/IR/DebugInfo.cpp
llvm/lib/IR/DebugInfoMetadata.cpp
llvm/lib/Transforms/Scalar/LICM.cpp
llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp
llvm/lib/Transforms/Utils/SimplifyCFG.cpp
mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h
mlir/lib/Target/LLVMIR/DebugTranslation.cpp
mlir/lib/Target/LLVMIR/DebugTranslation.h
mlir/lib/Target/LLVMIR/LoopAnnotationTranslation.cpp
mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149942.519778.patch
Type: text/x-patch
Size: 10367 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230505/c5be11bd/attachment.bin>
More information about the llvm-commits
mailing list