[PATCH] D61007: [NFC] SCEVExpander: add SetCurrentDebugLocation() / getCurrentDebugLocation() wrappers

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 23 06:15:38 PDT 2019


lebedev.ri created this revision.
lebedev.ri added reviewers: mkazantsev, sanjoy, gberry, jyknight, dneilson.
lebedev.ri added a project: LLVM.
Herald added a subscriber: javed.absar.

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.


Repository:
  rL LLVM

https://reviews.llvm.org/D61007

Files:
  include/llvm/Analysis/ScalarEvolutionExpander.h


Index: include/llvm/Analysis/ScalarEvolutionExpander.h
===================================================================
--- include/llvm/Analysis/ScalarEvolutionExpander.h
+++ include/llvm/Analysis/ScalarEvolutionExpander.h
@@ -275,8 +275,16 @@
 
     /// 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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61007.196228.patch
Type: text/x-patch
Size: 969 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190423/6806607f/attachment.bin>


More information about the llvm-commits mailing list