aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Support/SourceMgr.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Support/SourceMgr.h')
-rw-r--r--include/llvm/Support/SourceMgr.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/Support/SourceMgr.h b/include/llvm/Support/SourceMgr.h
index bc832e0c9e..aaee344755 100644
--- a/include/llvm/Support/SourceMgr.h
+++ b/include/llvm/Support/SourceMgr.h
@@ -95,6 +95,10 @@ public:
return Buffers[i].Buffer;
}
+ unsigned getNumBuffers() const {
+ return Buffers.size();
+ }
+
SMLoc getParentIncludeLoc(unsigned i) const {
assert(i < Buffers.size() && "Invalid Buffer ID!");
return Buffers[i].IncludeLoc;