Lines Matching full:pragma
1 //===--- ParsePragma.cpp - Language specific pragma parsing ---------------===//
10 // This file implements the language specific #pragma handlers.
101 /// PragmaCommentHandler - "\#pragma comment ...".
138 /// PragmaOptimizeHandler - "\#pragma clang optimize on/off".
248 // Remove the pragma handlers we installed.
318 /// \brief Handle the annotation token produced for #pragma unused(...)
321 /// "#pragma unused(x,y)" becomes:
524 PP.Lex(Tok); // pragma kind
526 // Figure out which #pragma we're dealing with. The switch has no default
538 // Pragma handling failed, and has been diagnosed. Slurp up the tokens
553 // Parsing code for pragma section
710 // #pragma init_seg({ compiler | lib | user | "section-name" [, func-name]} )
754 // FIXME: Add support for the '[, func-name]' part of the pragma.
787 "Unexpected pragma name");
803 // #pragma unroll(4).
812 // Return a valid hint if pragma unroll or nounroll were specified
831 if (OptionInfo) { // Pragma Unroll does not specify an option.
904 // #pragma GCC visibility comes in two variants:
963 // #pragma pack(...) comes in the following delicious flavors:
989 // In MSVC/gcc, #pragma pack(4) sets the alignment without affecting
991 // In Apple gcc, #pragma pack(4) is equivalent to #pragma pack(push, 4)
1042 // In MSVC/gcc, #pragma pack() resets the alignment without affecting
1044 // In Apple gcc #pragma pack() is equivalent to #pragma pack(pop).
1076 // #pragma ms_struct on
1077 // #pragma ms_struct off
1119 // #pragma 'align' '=' {'native','natural','mac68k','power','reset'}
1120 // #pragma 'options 'align' '=' {'native','natural','mac68k','power','reset'}
1199 // #pragma unused(identifier)
1258 assert(RParenLoc.isValid() && "Valid '#pragma unused' must have ')'");
1259 assert(!Identifiers.empty() && "Valid '#pragma unused' must have arguments");
1263 // This allows us to cache a "#pragma unused" that occurs inside an inline
1279 // #pragma weak identifier
1280 // #pragma weak identifier '=' identifier
1339 // #pragma redefine_extname identifier identifier
1462 /// \brief Handle '#pragma omp ...' when OpenMP is disabled.
1477 /// \brief Handle '#pragma omp ...' when OpenMP is enabled.
1483 SmallVector<Token, 16> Pragma;
1490 Pragma.push_back(Tok);
1497 Pragma.push_back(Tok);
1499 auto Toks = llvm::make_unique<Token[]>(Pragma.size());
1500 std::copy(Pragma.begin(), Pragma.end(), Toks.get());
1501 PP.EnterTokenStream(std::move(Toks), Pragma.size(),
1505 /// \brief Handle '#pragma pointers_to_members'
1506 // The grammar for this pragma is as follows:
1510 // #pragma pointers_to_members '(' 'best_case' ')'
1511 // #pragma pointers_to_members '(' 'full_generality' [',' inheritance-model] ')'
1512 // #pragma pointers_to_members '(' inheritance-model ')'
1549 // #pragma pointers_to_members(full_generality) implicitly specifies
1603 /// \brief Handle '#pragma vtordisp'
1604 // The grammar for this pragma is as follows:
1608 // #pragma vtordisp '(' ['push' ','] vtordisp-mode ')'
1609 // #pragma vtordisp '(' 'pop' ')'
1610 // #pragma vtordisp '(' ')'
1626 // #pragma vtordisp(push, mode)
1636 // #pragma vtordisp(pop)
1643 // #pragma vtordisp()
1672 // Finish the pragma: ')' $
1727 /// \brief Handle the Microsoft \#pragma detect_mismatch extension.
1731 /// #pragma detect_mismatch("name", "value")
1750 "pragma detect_mismatch",
1761 if (!PP.LexStringLiteral(Tok, ValueString, "pragma detect_mismatch",
1776 // If the pragma is lexically sound, notify any interested PPCallbacks.
1784 /// \brief Handle the microsoft \#pragma comment extension.
1788 /// #pragma comment(linker, "foo")
1825 // On PS4, issue a warning about any pragma comments other than
1826 // #pragma comment lib.
1837 "pragma comment",
1859 // If the pragma is lexically sound, notify any interested PPCallbacks.
1866 // #pragma clang optimize off
1867 // #pragma clang optimize on
1904 /// \brief Parses loop or unroll pragma hint value and fills in Info.
1946 /// \brief Handle the \#pragma clang loop directive.
1947 /// #pragma clang 'loop' loop-hints
1994 // Incoming token is "loop" from "#pragma clang loop".
2062 /// #pragma unroll
2063 /// #pragma unroll unroll-hint-value
2064 /// #pragma unroll '(' unroll-hint-value ')'
2065 /// #pragma nounroll
2070 /// Loop unrolling hints can be specified with '#pragma unroll' or
2071 /// '#pragma nounroll'. '#pragma unroll' can take a numeric argument optionally
2076 /// specified with or without parentheses. Specifying, '#pragma nounroll'
2081 // Incoming token is "unroll" for "#pragma unroll", or "nounroll" for
2082 // "#pragma nounroll".
2087 // nounroll or unroll pragma without an argument.
2095 // Unroll pragma with an argument: "#pragma unroll N" or
2096 // "#pragma unroll(N)".
2107 // In CUDA, the argument to '#pragma unroll' should not be contained in