clang 22.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"

Go to the source code of this file.

Functions

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()

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

Definition at line 154 of file HeaderIncludeGen.cpp.

References clang::Lexer::Stringify().

Referenced by clang::AttachHeaderIncludeGen().

◆ shouldRecordNewFile()

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

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 344 of file HeaderIncludeGen.cpp.

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