diff options
| author | Stephen Tozer <stephen.tozer@sony.com> | 2024-01-17 15:36:52 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-17 15:36:52 +0000 |
| commit | 4f57e2076bd21b573411bd40ec770a1b6785eee8 (patch) | |
| tree | 6be5f8fdfc9ee72e4a57cb5c531d7eb44f09b085 /llvm/lib/Transforms/Utils/Local.cpp | |
| parent | 59cdf41f077661cd2178123cf27dc688823b6b0f (diff) | |
| download | llvm-4f57e2076bd21b573411bd40ec770a1b6785eee8.zip llvm-4f57e2076bd21b573411bd40ec770a1b6785eee8.tar.gz llvm-4f57e2076bd21b573411bd40ec770a1b6785eee8.tar.bz2 | |
[RemoveDIs][DebugInfo] Create overloads of debug intrinsic utilities for DPValues (#78313)
In preparation for the major chunk of the assignment tracking
implementation, this patch adds a new set of overloaded versions of
existing functions that take DbgVariableIntrinsics, with the overloads
taking DPValues. This is used specifically to allow us to use generic code
to handle both DbgVariableIntrinsics and DPValues, reducing code
duplication. This patch doesn't actually add the uses of these functions.
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Utils/Local.cpp | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp index d1b42f2..2a1ac85 100644 --- a/llvm/lib/Transforms/Utils/Local.cpp +++ b/llvm/lib/Transforms/Utils/Local.cpp @@ -1724,20 +1724,6 @@ 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, |
