aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/DebugInfo.cpp
diff options
context:
space:
mode:
authorStephen Tozer <Stephen.Tozer@Sony.com>2024-01-17 15:50:58 +0000
committerStephen Tozer <Stephen.Tozer@Sony.com>2024-01-17 15:51:48 +0000
commit69ec35fbecc74b3dd917b659e082ce2353303ca9 (patch)
treec6c6efe3b96174cb681fee9d9506c6576b474404 /llvm/lib/IR/DebugInfo.cpp
parentd8627cb1389c9e6485d41028012c7a36b731d72a (diff)
downloadllvm-69ec35fbecc74b3dd917b659e082ce2353303ca9.zip
llvm-69ec35fbecc74b3dd917b659e082ce2353303ca9.tar.gz
llvm-69ec35fbecc74b3dd917b659e082ce2353303ca9.tar.bz2
Revert "Create overloads of debug intrinsic utilities for DPValues (#78313)"
This reverts commit 4f57e207, which added several unused functions, causing build errors on some buildbots.
Diffstat (limited to 'llvm/lib/IR/DebugInfo.cpp')
-rw-r--r--llvm/lib/IR/DebugInfo.cpp39
1 files changed, 1 insertions, 38 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
index c95b40a..312d670 100644
--- a/llvm/lib/IR/DebugInfo.cpp
+++ b/llvm/lib/IR/DebugInfo.cpp
@@ -163,18 +163,6 @@ DebugLoc llvm::getDebugValueLoc(DbgVariableIntrinsic *DII) {
return DILocation::get(DII->getContext(), 0, 0, Scope, InlinedAt);
}
-DebugLoc llvm::getDebugValueLoc(DPValue *DPV) {
- // Original dbg.declare must have a location.
- const DebugLoc &DeclareLoc = DPV->getDebugLoc();
- MDNode *Scope = DeclareLoc.getScope();
- DILocation *InlinedAt = DeclareLoc.getInlinedAt();
- // Because no machine insts can come from debug intrinsics, only the scope
- // and inlinedAt is significant. Zero line numbers are used in case this
- // DebugLoc leaks into any adjacent instructions. Produce an unknown location
- // with the correct scope / inlinedAt fields.
- return DILocation::get(DPV->getContext(), 0, 0, Scope, InlinedAt);
-}
-
//===----------------------------------------------------------------------===//
// DebugInfoFinder implementations.
//===----------------------------------------------------------------------===//
@@ -1825,31 +1813,6 @@ void at::deleteAll(Function *F) {
DAI->eraseFromParent();
}
-/// Get the FragmentInfo for the variable if it exists, otherwise return a
-/// FragmentInfo that covers the entire variable if the variable size is
-/// known, otherwise return a zero-sized fragment.
-static DIExpression::FragmentInfo
-getFragmentOrEntireVariable(const DPValue *DPV) {
- DIExpression::FragmentInfo VariableSlice(0, 0);
- // Get the fragment or variable size, or zero.
- if (auto Sz = DPV->getFragmentSizeInBits())
- VariableSlice.SizeInBits = *Sz;
- if (auto Frag = DPV->getExpression()->getFragmentInfo())
- VariableSlice.OffsetInBits = Frag->OffsetInBits;
- return VariableSlice;
-}
-
-static DIExpression::FragmentInfo
-getFragmentOrEntireVariable(const DbgVariableIntrinsic *DVI) {
- DIExpression::FragmentInfo VariableSlice(0, 0);
- // Get the fragment or variable size, or zero.
- if (auto Sz = DVI->getFragmentSizeInBits())
- VariableSlice.SizeInBits = *Sz;
- if (auto Frag = DVI->getExpression()->getFragmentInfo())
- VariableSlice.OffsetInBits = Frag->OffsetInBits;
- return VariableSlice;
-}
-
bool at::calculateFragmentIntersect(
const DataLayout &DL, const Value *Dest, uint64_t SliceOffsetInBits,
uint64_t SliceSizeInBits, const DbgAssignIntrinsic *DAI,
@@ -1947,7 +1910,7 @@ bool at::calculateFragmentIntersect(
if (DAI->isKillAddress())
return false;
- DIExpression::FragmentInfo VarFrag = getFragmentOrEntireVariable(DAI);
+ DIExpression::FragmentInfo VarFrag = DAI->getFragmentOrEntireVariable();
if (VarFrag.SizeInBits == 0)
return false; // Variable size is unknown.