[all-commits] [llvm/llvm-project] 64ebf3: [HeaderSearch] Use `isImport` only for imported he...

Volodymyr Sapsai via All-commits all-commits at lists.llvm.org
Wed Sep 1 17:08:22 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 64ebf313a7e485e1a90da9cd69c412e06615a9bc
      https://github.com/llvm/llvm-project/commit/64ebf313a7e485e1a90da9cd69c412e06615a9bc
  Author: Volodymyr Sapsai <vsapsai at apple.com>
  Date:   2021-09-01 (Wed, 01 Sep 2021)

  Changed paths:
    M clang/include/clang/Lex/HeaderSearch.h
    M clang/lib/Lex/HeaderSearch.cpp

  Log Message:
  -----------
  [HeaderSearch] Use `isImport` only for imported headers and not for `#pragma once`.

There is a separate field `isPragmaOnce` and when `isImport` combines
both, it complicates HeaderFileInfo serialization as `#pragma once` is
the inherent property of the header while `isImport` reflects how other
headers use it. The usage of the header can be different in different
contexts, that's why `isImport` requires tracking separate from `#pragma once`.

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




More information about the All-commits mailing list