
`-H` displays a tree of included header files, but that tree is supposed to omit two categories of header files: 1. Any header files pulled in via `-include`, which the code refers to as the "predefines". 2. Any header files whose inclusion was skipped because they'd already been included (assuming header guards or `#pragma once`). `-fshow-skipped-includes` was intended to make `-H` display the second category of files. It wasn't checking for the first category, however, so you could end up with only the middle of the `-include` hierarchy displayed, e.g. the added test would previously output: ``` ... /data/users/smeenai/llvm-project/clang/test/Frontend/Inputs/test2.h . /data/users/smeenai/llvm-project/clang/test/Frontend/Inputs/test.h ``` This diff adds a check to prevent that and correctly omit headers from `-include` even when `-fshow-skipped-includes` is passed. While I'm here, add tests for the interaction between `-fshow-skipped-includes` and `-sys-header-deps` as well. Reviewed By: hans Differential Revision: https://reviews.llvm.org/D153175
The LLVM Compiler Infrastructure
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called "LLVM". This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Getting the Source Code and Building LLVM
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Getting in touch
Join the LLVM Discourse forums, Discord chat, or #llvm IRC channel on OFTC.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.