[llvm] r351107 - expand DIContext interface a bit
David Callahan via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 14 11:11:33 PST 2019
Author: david2050
Date: Mon Jan 14 11:11:32 2019
New Revision: 351107
URL: http://llvm.org/viewvc/llvm-project?rev=351107&view=rev
Log:
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
Modified:
llvm/trunk/include/llvm/DebugInfo/DIContext.h
Modified: llvm/trunk/include/llvm/DebugInfo/DIContext.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/DIContext.h?rev=351107&r1=351106&r2=351107&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/DIContext.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/DIContext.h Mon Jan 14 11:11:32 2019
@@ -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.
More information about the llvm-commits
mailing list