aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/DebugInfo.cpp
diff options
context:
space:
mode:
authorChristian Ulmann <christian.ulmann@nextsilicon.com>2023-05-15 07:04:59 +0000
committerChristian Ulmann <christian.ulmann@nextsilicon.com>2023-05-15 07:21:43 +0000
commit794b58b467de9989fa68b7d23792512e2d338e7c (patch)
tree856233b2e37db0163d479516ced1e5b1311728da /llvm/lib/IR/DebugInfo.cpp
parent52a2d07bb3bb42594aab957b0da2e1e911abab59 (diff)
downloadllvm-794b58b467de9989fa68b7d23792512e2d338e7c.zip
llvm-794b58b467de9989fa68b7d23792512e2d338e7c.tar.gz
llvm-794b58b467de9989fa68b7d23792512e2d338e7c.tar.bz2
[IR] Drop const in DILocation::getMergedLocation
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. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D149942
Diffstat (limited to 'llvm/lib/IR/DebugInfo.cpp')
-rw-r--r--llvm/lib/IR/DebugInfo.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
index 9cef82e..d2229da 100644
--- a/llvm/lib/IR/DebugInfo.cpp
+++ b/llvm/lib/IR/DebugInfo.cpp
@@ -868,8 +868,7 @@ unsigned llvm::getDebugMetadataVersionFromModule(const Module &M) {
return 0;
}
-void Instruction::applyMergedLocation(const DILocation *LocA,
- const DILocation *LocB) {
+void Instruction::applyMergedLocation(DILocation *LocA, DILocation *LocB) {
setDebugLoc(DILocation::getMergedLocation(LocA, LocB));
}