From e532cbf3c001c46677e0dff43e119952a795f552 Mon Sep 17 00:00:00 2001 From: Roman Lebedev Date: Fri, 30 Aug 2019 09:51:02 +0000 Subject: [PATCH] [NFC] SCEVExpander: add SetCurrentDebugLocation() / getCurrentDebugLocation() wrappers Summary: The internal `Builder` is private, which means there is currently no way to set the debuginfo locations for `SCEVExpander`. This only adds the wrappers, but does not use them anywhere. Reviewers: mkazantsev, sanjoy, gberry, jyknight, dneilson Reviewed By: sanjoy Subscribers: javed.absar, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61007 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370453 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Analysis/ScalarEvolutionExpander.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/include/llvm/Analysis/ScalarEvolutionExpander.h b/include/llvm/Analysis/ScalarEvolutionExpander.h index a519f93216b..ce98a145fe0 100644 --- a/include/llvm/Analysis/ScalarEvolutionExpander.h +++ b/include/llvm/Analysis/ScalarEvolutionExpander.h @@ -275,8 +275,16 @@ namespace llvm { /// Clear the current insertion point. This is useful if the instruction /// that had been serving as the insertion point may have been deleted. - void clearInsertPoint() { - Builder.ClearInsertionPoint(); + void clearInsertPoint() { Builder.ClearInsertionPoint(); } + + /// Set location information used by debugging information. + void SetCurrentDebugLocation(DebugLoc L) { + Builder.SetCurrentDebugLocation(std::move(L)); + } + + /// Get location information used by debugging information. + const DebugLoc &getCurrentDebugLocation() const { + return Builder.getCurrentDebugLocation(); } /// Return true if the specified instruction was inserted by the code -- 2.40.0