diff options
author | Stephen Tozer <Stephen.Tozer@Sony.com> | 2024-01-17 15:50:58 +0000 |
---|---|---|
committer | Stephen Tozer <Stephen.Tozer@Sony.com> | 2024-01-17 15:51:48 +0000 |
commit | 69ec35fbecc74b3dd917b659e082ce2353303ca9 (patch) | |
tree | c6c6efe3b96174cb681fee9d9506c6576b474404 /llvm/lib/Transforms/Utils/Local.cpp | |
parent | d8627cb1389c9e6485d41028012c7a36b731d72a (diff) | |
download | llvm-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/Transforms/Utils/Local.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/Local.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp index 2a1ac85..d1b42f2 100644 --- a/llvm/lib/Transforms/Utils/Local.cpp +++ b/llvm/lib/Transforms/Utils/Local.cpp @@ -1724,6 +1724,20 @@ void llvm::ConvertDebugDeclareToDebugValue(DbgVariableIntrinsic *DII, SI->getIterator()); } +namespace llvm { +// RemoveDIs: duplicate the getDebugValueLoc method using DPValues instead of +// dbg.value intrinsics. In llvm namespace so that it overloads the +// DbgVariableIntrinsic version. +static DebugLoc getDebugValueLoc(DPValue *DPV) { + // Original dbg.declare must have a location. + const DebugLoc &DeclareLoc = DPV->getDebugLoc(); + MDNode *Scope = DeclareLoc.getScope(); + DILocation *InlinedAt = DeclareLoc.getInlinedAt(); + // Produce an unknown location with the correct scope / inlinedAt fields. + return DILocation::get(DPV->getContext(), 0, 0, Scope, InlinedAt); +} +} // namespace llvm + /// Inserts a llvm.dbg.value intrinsic before a load of an alloca'd value /// that has an associated llvm.dbg.declare intrinsic. void llvm::ConvertDebugDeclareToDebugValue(DbgVariableIntrinsic *DII, |