[clang] Const correct ComputePreambleBounds
authorKadir Cetinkaya <kadircet@google.com>
Thu, 16 Apr 2020 09:54:48 +0000 (11:54 +0200)
committerKadir Cetinkaya <kadircet@google.com>
Thu, 16 Apr 2020 10:10:40 +0000 (12:10 +0200)
clang/include/clang/Frontend/PrecompiledPreamble.h
clang/lib/Frontend/PrecompiledPreamble.cpp

index 5ae7773..0d95ee6 100644 (file)
@@ -38,7 +38,7 @@ class PCHContainerOperations;
 
 /// Runs lexer to compute suggested preamble bounds.
 PreambleBounds ComputePreambleBounds(const LangOptions &LangOpts,
-                                     llvm::MemoryBuffer *Buffer,
+                                     const llvm::MemoryBuffer *Buffer,
                                      unsigned MaxLines);
 
 class PreambleCallbacks;
index 3657ccf..442ad63 100644 (file)
@@ -228,7 +228,7 @@ template <class T> bool moveOnNoError(llvm::ErrorOr<T> Val, T &Output) {
 } // namespace
 
 PreambleBounds clang::ComputePreambleBounds(const LangOptions &LangOpts,
-                                            llvm::MemoryBuffer *Buffer,
+                                            const llvm::MemoryBuffer *Buffer,
                                             unsigned MaxLines) {
   return Lexer::ComputePreamble(Buffer->getBuffer(), LangOpts, MaxLines);
 }