[all-commits] [llvm/llvm-project] f08759: Support: Add operator== for MemoryBufferRef and sp...

Duncan P. N. Exon Smith via All-commits all-commits at lists.llvm.org
Tue Oct 13 13:43:13 PDT 2020


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

  Changed paths:
    M llvm/include/llvm/Support/MemoryBuffer.h
    A llvm/include/llvm/Support/MemoryBufferRef.h
    M llvm/lib/Support/CMakeLists.txt
    A llvm/lib/Support/MemoryBufferRef.cpp
    M llvm/unittests/Support/CMakeLists.txt
    A llvm/unittests/Support/MemoryBufferRefTest.cpp
    M llvm/unittests/Support/MemoryBufferTest.cpp

  Log Message:
  -----------
  Support: Add operator== for MemoryBufferRef and split out MemoryBufferRef.h

As preparation for changing `LineIterator` to work with `MemoryBufferRef`:

- Add an `operator==` that uses buffer pointer identity to ensure two buffers
  are equivalent.
- Split out `MemoryBufferRef.h`, to avoid polluting `LineIterator.h` includers
  with everything from `MemoryBuffer.h`. This also means moving the
  `MemoryBuffer` constructor to a source file.

Differential Revision: https://reviews.llvm.org/D89279




More information about the All-commits mailing list