clang 17.0.0git
HeaderIncludeGen.cpp File Reference
#include "clang/Frontend/DependencyOutputOptions.h"
#include "clang/Frontend/Utils.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Frontend/FrontendDiagnostic.h"
#include "clang/Lex/Preprocessor.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/Support/JSON.h"
#include "llvm/Support/raw_ostream.h"
Include dependency graph for HeaderIncludeGen.cpp:

Go to the source code of this file.


static void PrintHeaderInfo (raw_ostream *OutputFile, StringRef Filename, bool ShowDepth, unsigned CurrentIncludeDepth, bool MSStyle)
static bool shouldRecordNewFile (SrcMgr::CharacteristicKind NewFileType, SourceLocation PrevLoc, SourceManager &SM)
 Determine whether the header file should be recorded.

Function Documentation

◆ PrintHeaderInfo()

static void PrintHeaderInfo ( raw_ostream *  OutputFile,
StringRef  Filename,
bool  ShowDepth,
unsigned  CurrentIncludeDepth,
bool  MSStyle 

Definition at line 92 of file HeaderIncludeGen.cpp.

References Filename, and clang::Lexer::Stringify().

Referenced by clang::AttachHeaderIncludeGen().

◆ shouldRecordNewFile()

static bool shouldRecordNewFile ( SrcMgr::CharacteristicKind  NewFileType,
SourceLocation  PrevLoc,
SourceManager SM 

Determine whether the header file should be recorded.

The header file should be recorded only if the header file is a system header and the current file isn't a system header.

Definition at line 286 of file HeaderIncludeGen.cpp.

References clang::SrcMgr::isSystem(), and SM.