[PATCH] D89398: Lexer: Update the Lexer to use MemoryBufferRef, NFC

Duncan P. N. Exon Smith via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 19 14:39:57 PDT 2020


dexonsmith added inline comments.


================
Comment at: clang/include/clang/Lex/Lexer.h:145
   /// outlive it, so it doesn't take ownership of either of them.
-  Lexer(FileID FID, const llvm::MemoryBuffer *InputFile, Preprocessor &PP);
+  Lexer(FileID FID, const llvm::MemoryBufferRef &InputFile, Preprocessor &PP);
 
----------------
JDevlieghere wrote:
> Should `MemoryBufferRef`s be passed by value like `StringRef`s?
I don't think it absolutely needs to be, but it could, it's just two `StringRef`s. Passing by reference here prevents adding an include unnecessarily.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89398/new/

https://reviews.llvm.org/D89398



More information about the cfe-commits mailing list