[PATCH] D89136: Lex: Avoid MemoryBuffer* key in ExcludedPreprocessorDirectiveSkipMapping, NFC
Alex Lorenz via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 12 09:53:11 PDT 2020
arphaman added inline comments.
================
Comment at: clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp:222
- const llvm::MemoryBuffer *getBufferPtr() const { return Buffer.get(); }
+ const char *getBufferPtr() const {
+ return Buffer ? nullptr : Buffer->getBufferStart();
----------------
Looking over the code this method doesn't seem necessary anymore. Can you get the buffer pointer in `createFile` down below, after `llvm::MemoryBuffer::getMemBuffer(*Contents, Entry->getName(), /*RequiresNullTerminator=*/false)` is constructed?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89136/new/
https://reviews.llvm.org/D89136
More information about the cfe-commits
mailing list