#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"
usingnamespaceclang;
namespace {
class HeaderIncludesCallback : public PPCallbacks { … };
class HeaderIncludesJSONCallback : public PPCallbacks { … };
}
static void PrintHeaderInfo(raw_ostream *OutputFile, StringRef Filename,
bool ShowDepth, unsigned CurrentIncludeDepth,
bool MSStyle) { … }
void clang::AttachHeaderIncludeGen(Preprocessor &PP,
const DependencyOutputOptions &DepOpts,
bool ShowAllHeaders, StringRef OutputPath,
bool ShowDepth, bool MSStyle) { … }
void HeaderIncludesCallback::FileChanged(SourceLocation Loc,
FileChangeReason Reason,
SrcMgr::CharacteristicKind NewFileType,
FileID PrevFID) { … }
void HeaderIncludesCallback::FileSkipped(const FileEntryRef &SkippedFile, const
Token &FilenameTok,
SrcMgr::CharacteristicKind FileType) { … }
void HeaderIncludesJSONCallback::EndOfMainFile() { … }
static bool shouldRecordNewFile(SrcMgr::CharacteristicKind NewFileType,
SourceLocation PrevLoc, SourceManager &SM) { … }
void HeaderIncludesJSONCallback::FileChanged(
SourceLocation Loc, FileChangeReason Reason,
SrcMgr::CharacteristicKind NewFileType, FileID PrevFID) { … }
void HeaderIncludesJSONCallback::FileSkipped(
const FileEntryRef &SkippedFile, const Token &FilenameTok,
SrcMgr::CharacteristicKind FileType) { … }