[PATCH] D104351: [HeaderSearch] Use `isImport` only for imported headers and not for `#pragma once`.

Volodymyr Sapsai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 17 14:06:04 PDT 2021


vsapsai added a comment.

In D104351#2824505 <https://reviews.llvm.org/D104351#2824505>, @jansvoboda11 wrote:

> This seems reasonable on first look. Can you add a test that demonstrates the problem this patch solves?

There is no externally observable change that can be tested, I'm only making sure the existing tests keep passing. In the subsequent commit I change the restoration of `isImport` flag from .pcm because it reflects how a header is used, not an inherent property of a header that stays the same regardless of the header usage. To make things easier to implement I've decided to separate these two qualities of a header. And I think it fits names better, like `hasFileBeenImported`. With this change we don't need to add in the comments that it means hasFileBeenImportedOrHasPragmaOnce.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104351/new/

https://reviews.llvm.org/D104351



More information about the cfe-commits mailing list