Lines Matching refs:PP

35                                  Preprocessor &PP, raw_ostream &OS) {
70 OS << PP.getSpelling(T, SpellingBuffer);
80 Preprocessor &PP;
102 : PP(pp), SM(PP.getSourceManager()), ConcatInfo(PP), OS(os),
341 const std::string TokenText = PP.getSpelling(IncludeTok);
360 << "#" << PP.getSpelling(IncludeTok) << " "
418 PrintMacroDefinition(*MacroNameTok.getIdentifierInfo(), *MI, PP, OS);
667 void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer,
680 PP.EnterTokenStream(std::move(Toks), /*NumToks=*/1,
683 PP.Lex(PragmaTok);
695 std::string TokSpell = PP.getSpelling(PragmaTok);
702 PP.Lex(PragmaTok);
704 PP.LexUnexpandedToken(PragmaTok);
712 static void PrintPreprocessedTokens(Preprocessor &PP, Token &Tok,
715 bool DropComments = PP.getLangOpts().TraditionalCPP &&
716 !PP.getCommentRetentionState();
750 PP.Lex(Tok);
755 PP.Lex(Tok);
766 PP.Lex(Tok);
771 PP.Lex(Tok);
785 PP.Lex(Tok);
794 unsigned Len = PP.getSpelling(Tok, TokPtr);
802 std::string S = PP.getSpelling(Tok);
816 PP.Lex(Tok);
825 static void DoPrintMacros(Preprocessor &PP, raw_ostream *OS) {
827 PP.IgnorePragmas();
831 PP.EnterMainSourceFile();
834 do PP.Lex(Tok);
838 for (Preprocessor::macro_iterator I = PP.macro_begin(), E = PP.macro_end();
851 PrintMacroDefinition(*MacrosByID[i].first, MI, PP, *OS);
858 void clang::DoPrintPreprocessedInput(Preprocessor &PP, raw_ostream *OS,
863 DoPrintMacros(PP, OS);
869 PP.SetCommentRetentionState(Opts.ShowComments, Opts.ShowMacroComments);
872 PP, *OS, !Opts.ShowLineMarkers, Opts.ShowMacros,
881 /*RequireTokenExpansion=*/PP.getLangOpts().MicrosoftExt));
885 /*RequireTokenExpansion=*/PP.getLangOpts().MicrosoftExt));
889 /*RequireTokenExpansion=*/PP.getLangOpts().MicrosoftExt));
891 PP.AddPragmaHandler(MicrosoftExtHandler.get());
892 PP.AddPragmaHandler("GCC", GCCHandler.get());
893 PP.AddPragmaHandler("clang", ClangHandler.get());
903 PP.AddPragmaHandler("omp", OpenMPHandler.get());
905 PP.addPPCallbacks(std::unique_ptr<PPCallbacks>(Callbacks));
908 PP.EnterMainSourceFile();
913 const SourceManager &SourceMgr = PP.getSourceManager();
916 PP.Lex(Tok);
929 PrintPreprocessedTokens(PP, Tok, Callbacks, *OS);
934 PP.RemovePragmaHandler(MicrosoftExtHandler.get());
935 PP.RemovePragmaHandler("GCC", GCCHandler.get());
936 PP.RemovePragmaHandler("clang", ClangHandler.get());
937 PP.RemovePragmaHandler("omp", OpenMPHandler.get());