[all-commits] [llvm/llvm-project] 69feac: Lex: Avoid MemoryBuffer* key in ExcludedPreprocess...

Duncan P. N. Exon Smith via All-commits all-commits at lists.llvm.org
Mon Oct 12 14:39:31 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 69feac12d0539a7cc19cbda906d46f67029486e1
      https://github.com/llvm/llvm-project/commit/69feac12d0539a7cc19cbda906d46f67029486e1
  Author: Duncan P. N. Exon Smith <dexonsmith at apple.com>
  Date:   2020-10-12 (Mon, 12 Oct 2020)

  Changed paths:
    M clang/include/clang/Lex/PreprocessorExcludedConditionalDirectiveSkipMapping.h
    M clang/lib/Lex/PPDirectives.cpp
    M clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp

  Log Message:
  -----------
  Lex: Avoid MemoryBuffer* key in ExcludedPreprocessorDirectiveSkipMapping, NFC

This is a prep patch for changing SourceManager to return
`Optional<MemoryBufferRef>` instead of `MemoryBuffer`. With that change the
address of the MemoryBuffer will be gone, so instead use the start of the
buffer as the key for this map.

No functionality change intended, as it's expected that the pointer identity
matches between the buffers and the buffer data.

Radar-Id: rdar://70139990
Differential Revision: https://reviews.llvm.org/D89136




More information about the All-commits mailing list