diff options
author | David Callahan <dcallahan@fb.com> | 2019-01-14 19:11:32 +0000 |
---|---|---|
committer | David Callahan <dcallahan@fb.com> | 2019-01-14 19:11:32 +0000 |
commit | 51b1f51f3371b53a27173b435941358a907e98fa (patch) | |
tree | 92654afa1b1ca90cad2a423dc6fc63a1dd42db0d /llvm | |
parent | fd32d8c536ca355cc4ac11a976bb5ca02bf22623 (diff) |
expand DIContext interface a bit
Summary:
This allows a bit more control for scenarios where client might
modifiy a DIContext
Reviewers: twoh, Kader, modocache
Reviewed By: Kader
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D56505
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/include/llvm/DebugInfo/DIContext.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/include/llvm/DebugInfo/DIContext.h b/llvm/include/llvm/DebugInfo/DIContext.h index bbdd5e0d9c3..85e96402a24 100644 --- a/llvm/include/llvm/DebugInfo/DIContext.h +++ b/llvm/include/llvm/DebugInfo/DIContext.h @@ -81,7 +81,7 @@ class DIInliningInfo { 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 @@ public: void addFrame(const DILineInfo &Frame) { Frames.push_back(Frame); } + + void resize(unsigned i) { + Frames.resize(i); + } + }; /// Container for description of a global variable. |