[PATCH] D56505: expand DIContext interface a bit

David Callahan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 9 10:37:33 PST 2019


david2050 created this revision.
david2050 added reviewers: twoh, Kader, modocache.
Herald added a subscriber: llvm-commits.

This allows a bit more control for scenarios where client might 
modifiy a DIContext


Repository:
  rL LLVM

https://reviews.llvm.org/D56505

Files:
  include/llvm/DebugInfo/DIContext.h


Index: include/llvm/DebugInfo/DIContext.h
===================================================================
--- include/llvm/DebugInfo/DIContext.h
+++ include/llvm/DebugInfo/DIContext.h
@@ -81,7 +81,7 @@
 public:
   DIInliningInfo() = default;
 
-  DILineInfo getFrame(unsigned Index) const {
+  const DILineInfo & getFrame(unsigned Index) const {
     assert(Index < Frames.size());
     return Frames[Index];
   }
@@ -98,6 +98,11 @@
   void addFrame(const DILineInfo &Frame) {
     Frames.push_back(Frame);
   }
+  
+  void resize(unsigned i) {
+    Frames.resize(i);
+  }
+  
 };
 
 /// Container for description of a global variable.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56505.180879.patch
Type: text/x-patch
Size: 640 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190109/1a55c04c/attachment.bin>


More information about the llvm-commits mailing list