Home | History | Annotate | Download | only in Lex

Lines Matching defs:Directive

1 //===--- PPDirectives.cpp - Directive Handling for Preprocessor -----------===//
11 /// \brief Implements # directive processing for the Preprocessor.
31 // Utility Methods for Preprocessor Directive Handling.
95 assert(Tmp.isNot(tok::eof) && "EOF seen while discarding directive tokens");
104 /// this is due to a a \#define, 2 if \#undef directive, 0 if it is something
179 // There should be no tokens after the directive, but we allow them as an
186 // or if this is a macro-style preprocessing directive, because it is more
200 /// SkipExcludedConditionalBlock - We just read a \#if or related directive and
204 /// this \#if directive, so \#else/\#elif blocks should never be entered.
206 /// already seen one so a \#else directive is a duplicate. When this returns,
252 // If this token is not a preprocessor directive, just skip it.
257 // directive mode. Tell the lexer this so any newlines we see will be
263 // Read the next token, the directive flavor.
266 // If this isn't an identifier directive (e.g. is "# 1\n" or "#\n", or
295 StringRef Directive;
297 Directive = StringRef(RawCharData, Tok.getLength());
308 Directive = StringRef(DirectiveBuf, IdLen);
311 if (Directive.startswith("if")) {
312 StringRef Sub = Directive.substr(2);
323 } else if (Directive[0] == 'e') {
324 StringRef Sub = Directive.substr(1);
346 // #else directive in a skipping conditional. If not in some other
442 // the directive flavor.
567 // Preprocessor Directive Handling.
586 /// at the start of a line. This consumes the directive, modifies the
592 // We just parsed a # character at the start of a line, so we're in directive
594 // EOD token (which terminates the directive).
602 // pp-directive.
608 // Read the next token, the directive flavor. This isn't expanded due to
612 // C99 6.10.3p11: Is this preprocessor directive in macro invocation? e.g.:
643 return; // null directive.
650 case tok::numeric_constant: // # 7 GNU line marker directive.
652 break; // # 4 is not a preprocessor directive in .S files.
693 // C99 6.10.5 - Error Directive.
697 // C99 6.10.6 - Pragma Directive.
762 // Okay, we're done parsing the directive.
812 /// \brief Handle a \#line directive: C99 6.10.4.
883 /// marker directive.
961 /// HandleDigitDirective - Handle a GNU line marker directive, whose syntax is
1036 /// HandleUserDiagnosticDirective - Handle a #warning or #error directive.
1062 /// HandleIdentSCCSDirective - Handle a #ident/#sccs directive.
1065 // Yes, this directive is an extension.
1072 // If the token kind isn't a string, it's a malformed directive.
1097 /// \brief Handle a #public directive.
1128 /// \brief Handle a #private directive.
1160 // Preprocessor Include Directive Handling.
1273 /// \#import. LookupFrom is set when this is a \#include_next directive, it
1287 SourceLocation CharEnd; // the end of this directive, in characters
1389 // Notify the callback object that we've seen an inclusion directive.
1461 llvm_unreachable("unknown include directive kind");
1465 // include directive maps to.
1471 // to automatically turn this inclusion directive into a module import.
1482 // If this was an #__include_macros directive, only make macros visible.
1511 // directive before. Now that we are parsing the include normally and not
1572 // The Microsoft #import directive takes a type library and generates header
1579 // Read tokens until we get to the end of the directive. Note that the
1580 // directive can be split over multiple lines using the backslash character.
1597 /// pseudo directive in the predefines buffer. This handles it by sucking all
1602 // This directive should only occur in the predefines buffer. If not, emit an
1624 // Preprocessor Macro Directive Handling.
2012 // Preprocessor Conditional Directive Handling.
2015 /// HandleIfdefDirective - Implements the \#ifdef/\#ifndef directive. isIfndef
2016 /// is true when this is a \#ifndef directive. ReadAnyTokensBeforeDirective is
2067 // Should we include the stuff contained by this directive?
2081 /// HandleIfDirective - Implements the \#if directive.
2094 // directive seen, handle it for the multiple-include optimization.
2106 // Should we include the stuff contained by this directive?
2118 /// HandleEndifDirective - Implements the \#endif directive.
2123 // Check that this is the whole directive.
2144 /// HandleElseDirective - Implements the \#else directive.
2149 // #else directive in a non-skipping conditional... start skipping.
2173 /// HandleElifDirective - Implements the \#elif directive.
2178 // #elif directive in a non-skipping conditional... start skipping.