| /freebsd/contrib/llvm-project/llvm/include/llvm/Support/ |
| H A D | Path.h | 28 enum class Style { enum 37 constexpr bool is_style_posix(Style S) { in is_style_posix() 38 if (S == Style::posix) in is_style_posix() 40 if (S != Style::native) in is_style_posix() 50 constexpr bool is_style_windows(Style S) { return !is_style_posix(S); } in is_style_windows() 80 Style S = Style::native; ///< The path style to use. 83 LLVM_ABI friend const_iterator begin(StringRef path, Style style); 106 Style S = Style::native; ///< The path style to use. 108 LLVM_ABI friend reverse_iterator rbegin(StringRef path, Style style); 124 Style style = Style::native); [all …]
|
| H A D | FormatProviders.h | 94 static size_t consumeNumHexDigits(StringRef &Str, HexPrintStyle Style, in consumeNumHexDigits() argument 97 if (isPrefixedHexStyle(Style)) in consumeNumHexDigits() 134 static void format(const T &V, llvm::raw_ostream &Stream, StringRef Style) { 136 if (std::optional<HexPrintStyle> HS = consumeHexStyle(Style)) { 137 Digits = consumeNumHexDigits(Style, *HS, 0); 143 if (Style.consume_front("N") || Style.consume_front("n")) 145 else if (Style.consume_front("D") || Style.consume_front("d")) 148 Style.consumeInteger(10, Digits); 149 assert(Style.empty() && "Invalid integral format style!"); 182 static void format(const T &V, llvm::raw_ostream &Stream, StringRef Style) { [all …]
|
| H A D | Chrono.h | 94 StringRef Style); 99 llvm::raw_ostream &OS, StringRef Style); 163 static std::pair<InternalRep, StringRef> consumeUnit(StringRef &Style, 166 if (Style.consume_front("ns")) 168 if (Style.consume_front("us")) 170 if (Style.consume_front("ms")) 172 if (Style.consume_front("s")) 174 if (Style.consume_front("m")) 176 if (Style.consume_front("h")) 181 static bool consumeShowUnit(StringRef &Style) { [all …]
|
| H A D | NativeFormatting.h | 25 LLVM_ABI size_t getDefaultPrecision(FloatStyle Style); 30 IntegerStyle Style); 32 IntegerStyle Style); 34 IntegerStyle Style); 36 IntegerStyle Style); 38 size_t MinDigits, IntegerStyle Style); 40 IntegerStyle Style); 42 LLVM_ABI void write_hex(raw_ostream &S, uint64_t N, HexPrintStyle Style, 44 LLVM_ABI void write_double(raw_ostream &S, double D, FloatStyle Style,
|
| H A D | FormatAdapters.h | 39 void format(llvm::raw_ostream &Stream, StringRef Style) override { in format() argument 41 FmtAlign(Adapter, Where, Amount, Fill).format(Stream, Style); in format() 53 void format(llvm::raw_ostream &Stream, StringRef Style) override { in format() argument 56 Adapter.format(Stream, Style); in format() 68 void format(llvm::raw_ostream &Stream, StringRef Style) override { in format() argument 71 Adapter.format(Stream, Style); in format() 81 void format(llvm::raw_ostream &Stream, StringRef Style) override { in format() argument
|
| /freebsd/contrib/llvm-project/llvm/lib/DebugInfo/PDB/Native/ |
| H A D | FormatUtil.cpp | 130 #define PUSH_CHARACTERISTIC_FLAG(Enum, TheOpt, Value, Style, Descriptive) \ argument 132 ((Style == CharacteristicStyle::HeaderDefinition) ? #TheOpt \ 135 #define PUSH_MASKED_CHARACTERISTIC_FLAG(Enum, Mask, TheOpt, Value, Style, \ argument 138 ((Style == CharacteristicStyle::HeaderDefinition) \ 146 CharacteristicStyle Style) { in formatSectionCharacteristics() argument 153 PUSH_CHARACTERISTIC_FLAG(SC, IMAGE_SCN_TYPE_NOLOAD, C, Style, "noload"); in formatSectionCharacteristics() 154 PUSH_CHARACTERISTIC_FLAG(SC, IMAGE_SCN_TYPE_NO_PAD, C, Style, "no padding"); in formatSectionCharacteristics() 155 PUSH_CHARACTERISTIC_FLAG(SC, IMAGE_SCN_CNT_CODE, C, Style, "code"); in formatSectionCharacteristics() 156 PUSH_CHARACTERISTIC_FLAG(SC, IMAGE_SCN_CNT_INITIALIZED_DATA, C, Style, in formatSectionCharacteristics() 158 PUSH_CHARACTERISTIC_FLAG(SC, IMAGE_SCN_CNT_UNINITIALIZED_DATA, C, Style, in formatSectionCharacteristics() [all …]
|
| /freebsd/contrib/llvm-project/clang/lib/Format/ |
| H A D | Format.cpp | 878 static void mapping(IO &IO, FormatStyle &Style) { in mapping() 880 IO.mapOptional("Language", Style.Language); in mapping() 888 if (getPredefinedStyle(StyleName, Style.Language, &PredefinedStyle) && in mapping() 889 Style == PredefinedStyle) { in mapping() 897 FormatStyle::LanguageKind OldLanguage = Style.Language; in mapping() 900 if (!getPredefinedStyle(BasedOnStyle, Language, &Style)) { in mapping() 904 Style.Language = OldLanguage; in mapping() 937 IO.mapOptional("AlignEscapedNewlinesLeft", Style.AlignEscapedNewlines); in mapping() 939 IO.mapOptional("AlwaysBreakAfterReturnType", Style.BreakAfterReturnType); in mapping() 941 Style.BreakTemplateDeclarations); in mapping() [all …]
|
| H A D | ContinuationIndenter.cpp | 34 static bool shouldIndentWrappedSelectorName(const FormatStyle &Style, in shouldIndentWrappedSelectorName() argument 36 return Style.IndentWrappedFunctionNames || LineType == LT_ObjCMethodDecl; in shouldIndentWrappedSelectorName() 149 const FormatStyle &Style) { in mustBreakBinaryOperation() argument 150 return Style.BreakBinaryOperations != FormatStyle::BBO_Never && in mustBreakBinaryOperation() 152 (Style.BreakBeforeBinaryOperators == FormatStyle::BOS_None in mustBreakBinaryOperation() 158 const FormatStyle &Style) { in opensProtoMessageField() argument 161 return Style.isTextProto() || in opensProtoMessageField() 162 (Style.Language == FormatStyle::LK_Proto && in opensProtoMessageField() 196 getCanonicalRawStringDelimiter(const FormatStyle &Style, in getCanonicalRawStringDelimiter() argument 198 for (const auto &Format : Style.RawStringFormats) in getCanonicalRawStringDelimiter() [all …]
|
| H A D | UnwrappedLineFormatter.cpp | 46 LevelIndentTracker(const FormatStyle &Style, in LevelIndentTracker() argument 49 : Style(Style), Keywords(Keywords), AdditionalIndent(AdditionalIndent) { in LevelIndentTracker() 51 IndentForLevel.push_back(Style.IndentWidth * i + AdditionalIndent); in LevelIndentTracker() 65 if (Style.IndentPPDirectives != FormatStyle::PPDIS_None && in nextLine() 67 (Style.IndentPPDirectives == FormatStyle::PPDIS_BeforeHash && in nextLine() 70 (Style.PPIndentWidth >= 0) ? Style.PPIndentWidth : Style.IndentWidth; in nextLine() 73 (Line.Level - Line.PPLevel) * Style.IndentWidth in nextLine() 89 Indent = Line.Level * Style.IndentWidth + Style.ContinuationIndentWidth; in nextLine() 115 if (Style.isJava() || Style.isJavaScript() || Style.isCSharp()) in getIndentOffset() 126 return Style.IndentAccessModifiers ? -Style.IndentWidth in getIndentOffset() [all …]
|
| H A D | TokenAnnotator.cpp | 27 const FormatStyle &Style) { in mustBreakAfterAttributes() argument 28 switch (Style.BreakAfterAttributes) { in mustBreakAfterAttributes() 125 AnnotatingParser(const FormatStyle &Style, AnnotatedLine &Line, in AnnotatingParser() argument 128 : Style(Style), Line(Line), CurrentToken(Line.First), AutoFound(false), in AnnotatingParser() 129 IsCpp(Style.isCpp()), LangOpts(getFormattingLangOpts(Style)), in AnnotatingParser() 185 if (Style.isJava() && CurrentToken->is(tok::question)) in parseAngle() 219 if (Style.isTextProto() || in parseAngle() 220 (Style.Language == FormatStyle::LK_Proto && BeforeLess && in parseAngle() 236 if (CurrentToken->is(tok::question) && Style.isJava()) { in parseAngle() 254 if (Prev.isOneOf(tok::question, tok::colon) && !Style.isProto()) in parseAngle() [all …]
|
| H A D | UnwrappedLineParser.cpp | 134 const FormatStyle &Style, unsigned &LineLevel) in CompoundStatementIndenter() argument 136 Style.BraceWrapping.AfterControlStatement == in CompoundStatementIndenter() 138 Style.BraceWrapping.IndentBraces) {} in CompoundStatementIndenter() 155 SourceManager &SourceMgr, const FormatStyle &Style, in UnwrappedLineParser() argument 161 Style(Style), IsCpp(Style.isCpp()), in UnwrappedLineParser() 162 LangOpts(getFormattingLangOpts(Style)), Keywords(Keywords), in UnwrappedLineParser() 163 CommentPragmasRegex(Style.CommentPragmas), Tokens(nullptr), in UnwrappedLineParser() 165 IncludeGuard(Style.IndentPPDirectives == FormatStyle::PPDIS_None in UnwrappedLineParser() 169 Macros(Style.Macros, SourceMgr, Style, Allocator, IdentTable) {} in UnwrappedLineParser() 173 IncludeGuard = Style.IndentPPDirectives == FormatStyle::PPDIS_None in reset() [all …]
|
| H A D | FormatToken.cpp | 54 bool FormatToken::isBlockIndentedInitRBrace(const FormatStyle &Style) const { in isBlockIndentedInitRBrace() 58 if (!Style.Cpp11BracedListStyle || in isBlockIndentedInitRBrace() 59 Style.AlignAfterOpenBracket != FormatStyle::BAS_BlockIndent) { in isBlockIndentedInitRBrace() 70 bool FormatToken::opensBlockOrBlockTypeList(const FormatStyle &Style) const { in opensBlockOrBlockTypeList() 72 if (is(tok::l_brace) && getBlockKind() == BK_BracedInit && Style.isCSharp()) in opensBlockOrBlockTypeList() 79 (!Style.Cpp11BracedListStyle && NestingLevel == 0))) || in opensBlockOrBlockTypeList() 80 (is(tok::less) && Style.isProto()); in opensBlockOrBlockTypeList() 108 Style.ColumnLimit - State.Column + State.NextToken->Previous->ColumnWidth; in formatAfterToken() 175 if (Style.Cpp11BracedListStyle && !Style.BinPackArguments && in precomputeFormattingInfos() 176 (Commas.size() < 19 || !Style.BinPackLongBracedList)) { in precomputeFormattingInfos() [all …]
|
| H A D | BreakableToken.cpp | 31 const FormatStyle &Style) { in getLineCommentIndentPrefix() argument 37 if (Style.isTextProto()) in getLineCommentIndentPrefix() 58 encoding::Encoding Encoding, const FormatStyle &Style, in getCommentSplit() argument 82 if (Style.isJavaScript()) { in getCommentSplit() 101 if (Style.isCpp()) { in getCommentSplit() 118 if (Style.isJavaScript() && SpaceOffset + 1 < Text.size() && in getCommentSplit() 246 Style.TabWidth, Encoding); in getRemainingLength() 257 encoding::Encoding Encoding, const FormatStyle &Style) in BreakableStringLiteral() argument 258 : BreakableToken(Tok, InPPDirective, Encoding, Style), in BreakableStringLiteral() 270 ColumnLimit - Postfix.size(), Style.TabWidth, Encoding); in getSplit() [all …]
|
| H A D | WhitespaceManager.cpp | 115 if (Style.isTableGen()) { in generateReplacements() 287 AlignTokenSequence(const FormatStyle &Style, unsigned Start, unsigned End, in AlignTokenSequence() argument 401 return Style.BinPackArguments; in AlignTokenSequence() 470 if ((Style.PointerAlignment == FormatStyle::PAS_Right || in AlignTokenSequence() 471 Style.ReferenceAlignment == FormatStyle::RAS_Right) && in AlignTokenSequence() 476 Style.ReferenceAlignment != FormatStyle::RAS_Right && in AlignTokenSequence() 477 Style.ReferenceAlignment != FormatStyle::RAS_Pointer; in AlignTokenSequence() 485 } else if (Style.PointerAlignment != FormatStyle::PAS_Right) { in AlignTokenSequence() 528 static unsigned AlignTokens(const FormatStyle &Style, F &&Matches, in AlignTokens() argument 580 AlignTokenSequence(Style, StartOfSequence, EndOfSequence, in __anonfa4fec7a0202() [all …]
|
| H A D | FormatTokenLexer.cpp | 28 const FormatStyle &Style, encoding::Encoding Encoding, in FormatTokenLexer() argument 33 LangOpts(getFormattingLangOpts(Style)), SourceMgr(SourceMgr), ID(ID), 34 Style(Style), IdentTable(IdentTable), Keywords(IdentTable), 36 FormattingDisabled(false), FormatOffRegex(Style.OneLineFormatOffRegex), 37 MacroBlockBeginRegex(Style.MacroBlockBegin), 38 MacroBlockEndRegex(Style.MacroBlockEnd) { 42 for (const std::string &ForEachMacro : Style.ForEachMacros) { 46 for (const std::string &IfMacro : Style.IfMacros) { 50 for (const std::string &AttributeMacro : Style.AttributeMacros) { 54 for (const std::string &StatementMacro : Style.StatementMacros) { [all …]
|
| H A D | TokenAnalyzer.cpp | 83 TokenAnalyzer::TokenAnalyzer(const Environment &Env, const FormatStyle &Style) in TokenAnalyzer() argument 84 : Style(Style), LangOpts(getFormattingLangOpts(Style)), Env(Env), in TokenAnalyzer() 93 LLVM_DEBUG(llvm::dbgs() << "Language: " << getLanguageName(Style.Language) in TokenAnalyzer() 103 Env.getFirstStartColumn(), Style, Encoding, Allocator, in process() 107 UnwrappedLineParser Parser(Env.getSourceManager(), Style, Lex.getKeywords(), in process() 119 TokenAnnotator Annotator(Style, Lex.getKeywords()); in process()
|
| H A D | BreakableToken.h | 237 encoding::Encoding Encoding, const FormatStyle &Style) in BreakableToken() argument 239 Style(Style) {} in BreakableToken() 244 const FormatStyle &Style; variable 256 encoding::Encoding Encoding, const FormatStyle &Style); 304 encoding::Encoding Encoding, const FormatStyle &Style); 335 const FormatStyle &Style); 387 const bool AlwaysReflow = Style.ReflowComments == FormatStyle::RCS_Always; 405 const FormatStyle &Style, bool UseCRLF); 483 const FormatStyle &Style);
|
| H A D | DefinitionBlockSeparator.cpp | 24 assert(Style.SeparateDefinitionBlocks != FormatStyle::SDS_Leave); in analyze() 35 Style.SeparateDefinitionBlocks == FormatStyle::SDS_Never; in separateBlocks() 56 (Style.isJavaScript() && in separateBlocks() 68 (Style.SeparateDefinitionBlocks == FormatStyle::SDS_Always ? 1 : 0) + 1; in separateBlocks() 70 Env.getSourceManager(), Style, in separateBlocks() 71 Style.LineEnding > FormatStyle::LE_CRLF in separateBlocks() 74 Style.LineEnding == FormatStyle::LE_DeriveCRLF) in separateBlocks() 75 : Style.LineEnding == FormatStyle::LE_CRLF); in separateBlocks() 172 if (Style.isCSharp() && OperateLine->First->is(TT_AttributeSquare)) in separateBlocks()
|
| H A D | UnwrappedLineFormatter.h | 30 const FormatStyle &Style, in UnwrappedLineFormatter() argument 34 : Indenter(Indenter), Whitespaces(Whitespaces), Style(Style), in UnwrappedLineFormatter() 66 const FormatStyle &Style; variable
|
| /freebsd/contrib/llvm-project/llvm/lib/Support/ |
| H A D | NativeFormatting.cpp | 56 IntegerStyle Style, bool IsNegative) { in write_unsigned_impl() argument 65 if (Len < MinDigits && Style != IntegerStyle::Number) { in write_unsigned_impl() 70 if (Style == IntegerStyle::Number) { in write_unsigned_impl() 79 IntegerStyle Style, bool IsNegative = false) { in write_unsigned() argument 82 write_unsigned_impl(S, static_cast<uint32_t>(N), MinDigits, Style, in write_unsigned() 85 write_unsigned_impl(S, N, MinDigits, Style, IsNegative); in write_unsigned() 90 IntegerStyle Style) { in write_signed() argument 96 write_unsigned(S, static_cast<UnsignedT>(N), MinDigits, Style); in write_signed() 101 write_unsigned(S, UN, MinDigits, Style, true); in write_signed() 105 IntegerStyle Style) { in write_integer() argument [all …]
|
| H A D | Chrono.cpp | 74 StringRef Style) { in format() argument 77 if (Style.empty()) Style = "%Y-%m-%d %H:%M:%S.%N"; in format() 80 for (unsigned I = 0; I < Style.size(); ++I) { in format() 81 if (Style[I] == '%' && Style.size() > I + 1) switch (Style[I + 1]) { in format() 102 FStream << Style[I]; in format() 111 const UtcTime<std::chrono::seconds> &T, raw_ostream &OS, StringRef Style) { in format() argument 117 llvm::format(Fractional, LT, OS, Style); in format() 121 StringRef Style) { in format() argument 126 llvm::format(Fractional, LT, OS, Style); in format()
|
| H A D | Path.cpp | 38 using llvm::sys::path::Style; 40 inline Style real_style(Style style) { in real_style() 41 if (style != Style::native) in real_style() 44 return Style::posix; in real_style() 45 return LLVM_WINDOWS_PREFER_FORWARD_SLASH ? Style::windows_slash in real_style() 46 : Style::windows_backslash; in real_style() 49 inline const char *separators(Style style) { in separators() 55 inline char preferred_separator(Style style) { in preferred_separator() 56 if (real_style(style) == Style::windows) in preferred_separator() 61 StringRef find_first_component(StringRef path, Style style) { in find_first_component() [all …]
|
| /freebsd/contrib/llvm-project/lldb/source/Utility/ |
| H A D | FileSpec.cpp | 39 static constexpr FileSpec::Style GetNativeStyle() { in GetNativeStyle() 41 return FileSpec::Style::windows; in GetNativeStyle() 43 return FileSpec::Style::posix; in GetNativeStyle() 47 bool PathStyleIsPosix(FileSpec::Style style) { in PathStyleIsPosix() 51 const char *GetPathSeparators(FileSpec::Style style) { in GetPathSeparators() 55 char GetPreferredPathSeparator(FileSpec::Style style) { in GetPreferredPathSeparator() 59 void Denormalize(llvm::SmallVectorImpl<char> &path, FileSpec::Style style) { in Denormalize() 71 FileSpec::FileSpec(llvm::StringRef path, Style style) : m_style(style) { in FileSpec() 76 : FileSpec{path, triple.isOSWindows() ? Style::windows : Style::posix} {} in FileSpec() 174 void FileSpec::SetFile(llvm::StringRef pathname, Style style) { in SetFile() [all …]
|
| /freebsd/contrib/llvm-project/clang/lib/Tooling/Inclusions/ |
| H A D | HeaderIncludes.cpp | 40 StringRef FileName, StringRef Code, const IncludeStyle &Style, in getOffsetAfterTokenSequence() argument 83 const IncludeStyle &Style) { in getOffsetAfterHeaderGuardsAndComments() argument 91 FileName, Code, Style, in getOffsetAfterHeaderGuardsAndComments() 159 const IncludeStyle &Style) { in getMaxHeaderInsertionOffset() argument 161 FileName, Code, Style, in getMaxHeaderInsertionOffset() 190 IncludeCategoryManager::IncludeCategoryManager(const IncludeStyle &Style, in IncludeCategoryManager() argument 192 : Style(Style), FileName(FileName) { in IncludeCategoryManager() 193 for (const auto &Category : Style.IncludeCategories) { in IncludeCategoryManager() 202 if (!Style.IncludeIsMainSourceRegex.empty()) { in IncludeCategoryManager() 203 llvm::Regex MainFileRegex(Style.IncludeIsMainSourceRegex); in IncludeCategoryManager() [all …]
|
| /freebsd/contrib/llvm-project/lldb/include/lldb/Utility/ |
| H A D | FileSpec.h | 59 using Style = llvm::sys::path::Style; 76 explicit FileSpec(llvm::StringRef path, Style style = Style::native); 199 static std::optional<Style> GuessPathStyle(llvm::StringRef absolute_path); 228 Style GetPathStyle() const; 376 void SetFile(llvm::StringRef path, Style style); 443 Style m_style; 472 StringRef Style);
|