forked from OSchip/llvm-project
![]() Some time back I extended GCC's '# NNN' line marker semantics. Specifically popping to a blank filename will restore the filename to that of the popped-to include. Restore to line 5 of including file (escaped BOL #'s to avoid git eliding them): \# 5 "" 2 Added documentation for this line control extension. This was useful in developing modules tests, but turned out to also be useful with machine-generated source code. Specifically, a generated include file that itself includes fragments from elsewhere. The ability to pop to the generated include file -- with its full path prefix -- is useful for diagnostic & debug purposes. For instance something like: // Machine generated -- DO NOT EDIT Type Var = { \# 7 "encoded.dsl" 1 // push to snippet-container {snippet, of, code} \# 6 " 2 // Restore to machined-generated source , }; // user-code ... \#include "dsl.h" ... That pop to "" will restore the filename to '..includepath../dsl.h', which is better than restoring to plain "dsl.h". Differential Revision: https://reviews.llvm.org/D113425 |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
DependencyDirectivesSourceMinimizer.cpp | ||
HeaderMap.cpp | ||
HeaderSearch.cpp | ||
Lexer.cpp | ||
LiteralSupport.cpp | ||
MacroArgs.cpp | ||
MacroInfo.cpp | ||
ModuleMap.cpp | ||
PPCaching.cpp | ||
PPCallbacks.cpp | ||
PPConditionalDirectiveRecord.cpp | ||
PPDirectives.cpp | ||
PPExpressions.cpp | ||
PPLexerChange.cpp | ||
PPMacroExpansion.cpp | ||
Pragma.cpp | ||
PreprocessingRecord.cpp | ||
Preprocessor.cpp | ||
PreprocessorLexer.cpp | ||
ScratchBuffer.cpp | ||
TokenConcatenation.cpp | ||
TokenLexer.cpp | ||
UnicodeCharSets.h |