[all-commits] [llvm/llvm-project] 4c262f: [clang][extract-api] Use relative includes

Zixu Wang via All-commits all-commits at lists.llvm.org
Wed May 4 10:28:29 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4c262fee08b5383c96857d77eefe80d61c41d2b0
      https://github.com/llvm/llvm-project/commit/4c262fee08b5383c96857d77eefe80d61c41d2b0
  Author: Zixu Wang <zixu_wang at apple.com>
  Date:   2022-05-04 (Wed, 04 May 2022)

  Changed paths:
    M clang/include/clang/ExtractAPI/FrontendActions.h
    M clang/lib/ExtractAPI/ExtractAPIConsumer.cpp
    R clang/test/ExtractAPI/known_files_only_hmap.c
    A clang/test/ExtractAPI/relative_include.m
    A clang/test/Index/annotate-comments-enum-constant.c

  Log Message:
  -----------
  [clang][extract-api] Use relative includes

This patch transforms the given input headers to relative include names
using header search entries and some heuritics.
For example: `/Path/To/Header.h` will be included as `<Header.h>` with a
search path of `-I /Path/To/`; and
`/Path/To/Framework.framework/Headers/Header.h` will be included as
`<Framework/Header.h>`, given a search path of `-F /Path/To`.
Headermaps will also be queried in reverse to find a spelled name to
include headers.

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




More information about the All-commits mailing list