]> granicus.if.org Git - clang/commitdiff
Adding const buffer iterator generators to Rewriter
authorEdwin Vane <edwin.vane@intel.com>
Tue, 27 Aug 2013 13:00:34 +0000 (13:00 +0000)
committerEdwin Vane <edwin.vane@intel.com>
Tue, 27 Aug 2013 13:00:34 +0000 (13:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189344 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Rewrite/Core/Rewriter.h

index cb044aef23fed889b96ee18bbf2732bed4de7f37..68169a937a3a784ef53687537c6355407d183392 100644 (file)
@@ -149,6 +149,7 @@ public:
   };
 
   typedef std::map<FileID, RewriteBuffer>::iterator buffer_iterator;
+  typedef std::map<FileID, RewriteBuffer>::const_iterator const_buffer_iterator;
 
   explicit Rewriter(SourceManager &SM, const LangOptions &LO)
     : SourceMgr(&SM), LangOpts(&LO) {}
@@ -282,6 +283,8 @@ public:
   // Iterators over rewrite buffers.
   buffer_iterator buffer_begin() { return RewriteBuffers.begin(); }
   buffer_iterator buffer_end() { return RewriteBuffers.end(); }
+  const_buffer_iterator buffer_begin() const { return RewriteBuffers.begin(); }
+  const_buffer_iterator buffer_end() const { return RewriteBuffers.end(); }
 
   /// overwriteChangedFiles - Save all changed files to disk.
   ///