[all-commits] [llvm/llvm-project] b4c6dc: [clang] Update code that assumes FileEntry::getNam...

Ben Langmuir via All-commits all-commits at lists.llvm.org
Mon Aug 1 14:49:06 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b4c6dc2e66370d94ff52075c2710a674d8e1e0f8
  Author: Ben Langmuir <blangmuir at apple.com>
  Date:   2022-08-01 (Mon, 01 Aug 2022)

  Changed paths:
    M clang-tools-extra/clang-apply-replacements/lib/Tooling/ApplyReplacements.cpp
    M clang/include/clang/Tooling/DependencyScanning/ModuleDepCollector.h
    M clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp
    M clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp

  Log Message:
  [clang] Update code that assumes FileEntry::getName is absolute NFC

It's an accident that we started return asbolute paths from
FileEntry::getName for all relative paths. Prepare for getName to get
(closer to) return the requested path. Note: conceptually it might make
sense for the dependency scanner to allow relative paths and have the
DependencyConsumer decide if it wants to make them absolute, but we
currently document that it's absolute and I didn't want to change
behaviour here.

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

More information about the All-commits mailing list