clang  6.0.0svn
Typedefs | Functions
PrintPreprocessedOutput.cpp File Reference
#include "clang/Frontend/Utils.h"
#include "clang/Basic/CharInfo.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Frontend/PreprocessorOutputOptions.h"
#include "clang/Lex/MacroInfo.h"
#include "clang/Lex/PPCallbacks.h"
#include "clang/Lex/Pragma.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Lex/TokenConcatenation.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include <cstdio>
Include dependency graph for PrintPreprocessedOutput.cpp:

Go to the source code of this file.


typedef std::pair< const IdentifierInfo *, MacroInfo * > id_macro_pair


static void PrintMacroDefinition (const IdentifierInfo &II, const MacroInfo &MI, Preprocessor &PP, raw_ostream &OS)
 PrintMacroDefinition - Print a macro definition in a form that will be properly accepted back as a definition. More...
static void outputPrintable (raw_ostream &OS, StringRef Str)
static void PrintPreprocessedTokens (Preprocessor &PP, Token &Tok, PrintPPOutputPPCallbacks *Callbacks, raw_ostream &OS)
static int MacroIDCompare (const id_macro_pair *LHS, const id_macro_pair *RHS)
static void DoPrintMacros (Preprocessor &PP, raw_ostream *OS)

Typedef Documentation

◆ id_macro_pair

typedef std::pair<const IdentifierInfo *, MacroInfo *> id_macro_pair

Definition at line 783 of file PrintPreprocessedOutput.cpp.

Function Documentation

◆ DoPrintMacros()

static void DoPrintMacros ( Preprocessor PP,
raw_ostream *  OS 

◆ MacroIDCompare()

static int MacroIDCompare ( const id_macro_pair LHS,
const id_macro_pair RHS 

Definition at line 784 of file PrintPreprocessedOutput.cpp.

◆ outputPrintable()

static void outputPrintable ( raw_ostream &  OS,
StringRef  Str 

◆ PrintMacroDefinition()

static void PrintMacroDefinition ( const IdentifierInfo II,
const MacroInfo MI,
Preprocessor PP,
raw_ostream &  OS 

PrintMacroDefinition - Print a macro definition in a form that will be properly accepted back as a definition.

Definition at line 35 of file PrintPreprocessedOutput.cpp.

References clang::IdentifierInfo::getName(), clang::MacroInfo::isFunctionLike(), clang::MacroInfo::param_begin(), and clang::MacroInfo::param_empty().

◆ PrintPreprocessedTokens()

static void PrintPreprocessedTokens ( Preprocessor PP,
Token Tok,
PrintPPOutputPPCallbacks *  Callbacks,
raw_ostream &  OS