clang
9.0.0
|
This is the implementation for minimizing header and source files to the minimum necessary preprocessor directives for evaluating includes. More...
#include "clang/Lex/DependencyDirectivesSourceMinimizer.h"
#include "clang/Basic/CharInfo.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Lex/LexDiagnostic.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/Support/MemoryBuffer.h"
Go to the source code of this file.
Functions | |
static void | skipOverSpaces (const char *&First, const char *const End) |
static LLVM_NODISCARD bool | isRawStringLiteral (const char *First, const char *Current) |
static void | skipRawString (const char *&First, const char *const End) |
static void | skipString (const char *&First, const char *const End) |
static void | skipNewline (const char *&First, const char *End) |
static void | skipToNewlineRaw (const char *&First, const char *const End) |
static const char * | reverseOverSpaces (const char *First, const char *Last) |
static void | skipLineComment (const char *&First, const char *const End) |
static void | skipBlockComment (const char *&First, const char *const End) |
static bool | isQuoteCppDigitSeparator (const char *const Start, const char *const Cur, const char *const End) |
static void | skipLine (const char *&First, const char *const End) |
static void | skipDirective (StringRef Name, const char *&First, const char *const End) |
static void | skipWhitespace (const char *&First, const char *const End) |
static LLVM_NODISCARD const char * | lexRawIdentifier (const char *First, const char *const End) |
static LLVM_NODISCARD const char * | getIdentifierContinuation (const char *First, const char *const End) |
This is the implementation for minimizing header and source files to the minimum necessary preprocessor directives for evaluating includes.
It reduces the source down to #define, #include, #import, , and any conditional preprocessor logic that contains one of those.
Definition in file DependencyDirectivesSourceMinimizer.cpp.
|
static |
Definition at line 479 of file DependencyDirectivesSourceMinimizer.cpp.
References clang::isIdentifierBody(), clang::isVerticalWhitespace(), clang::Last, lexRawIdentifier(), and skipNewline().
|
static |
Definition at line 256 of file DependencyDirectivesSourceMinimizer.cpp.
References clang::isIdentifierBody(), and clang::isPreprocessingNumberBody().
Referenced by skipLine().
|
static |
Definition at line 120 of file DependencyDirectivesSourceMinimizer.cpp.
Referenced by skipLine().
|
static |
Definition at line 469 of file DependencyDirectivesSourceMinimizer.cpp.
References clang::isIdentifierBody(), and clang::Last.
Referenced by getIdentifierContinuation().
|
static |
Definition at line 228 of file DependencyDirectivesSourceMinimizer.cpp.
References clang::isHorizontalWhitespace().
|
static |
Definition at line 241 of file DependencyDirectivesSourceMinimizer.cpp.
References End.
Referenced by skipLine(), and skipWhitespace().
|
static |
Definition at line 329 of file DependencyDirectivesSourceMinimizer.cpp.
|
static |
Definition at line 278 of file DependencyDirectivesSourceMinimizer.cpp.
References isQuoteCppDigitSeparator(), isRawStringLiteral(), clang::isVerticalWhitespace(), skipBlockComment(), skipLineComment(), skipNewline(), skipRawString(), and skipString().
|
static |
Definition at line 235 of file DependencyDirectivesSourceMinimizer.cpp.
References skipToNewlineRaw().
Referenced by skipLine(), and skipWhitespace().
|
static |
Definition at line 198 of file DependencyDirectivesSourceMinimizer.cpp.
References clang::isVerticalWhitespace().
Referenced by getIdentifierContinuation(), skipLine(), and skipWhitespace().
|
static |
Definition at line 115 of file DependencyDirectivesSourceMinimizer.cpp.
References clang::isHorizontalWhitespace().
Referenced by skipWhitespace().
|
static |
Definition at line 145 of file DependencyDirectivesSourceMinimizer.cpp.
References clang::Last.
Referenced by skipLine().
|
static |
Definition at line 187 of file DependencyDirectivesSourceMinimizer.cpp.
Referenced by skipLine().
|
static |
Definition at line 209 of file DependencyDirectivesSourceMinimizer.cpp.
References clang::isVerticalWhitespace().
Referenced by skipLineComment().
|
static |
Definition at line 393 of file DependencyDirectivesSourceMinimizer.cpp.
References clang::isIdentifierBody(), clang::isVerticalWhitespace(), clang::Last, skipBlockComment(), skipLineComment(), skipNewline(), and skipOverSpaces().