[PATCH] D77772: [Clang] Expose RequiresNullTerminator in FileManager.

Duncan P. N. Exon Smith via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 9 16:35:11 PDT 2020


dexonsmith added a comment.

In D77772#1973250 <https://reviews.llvm.org/D77772#1973250>, @Bigcheese wrote:

> Not really. It's a static function in MemoryBuffer.cpp, and the `MemoryBuffer` class doesn't have a `Kind` member so we can't check for `MemoryBufferMMapFile`.


Ah, but there's a vtable :), and it looks like we already have a virtual function called `MemoryBuffer::getBufferKind()` to expose this.

Maybe use `MemoryBuffer::getFile()` API to test this?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77772





More information about the cfe-commits mailing list