Home
last modified time | relevance | path

Searched refs:Style (Results 1 – 25 of 202) sorted by relevance

123456789

/freebsd/contrib/llvm-project/llvm/include/llvm/Support/
H A DPath.h27 enum class Style { enum
36 constexpr bool is_style_posix(Style S) { in is_style_posix()
37 if (S == Style::posix) in is_style_posix()
39 if (S != Style::native) in is_style_posix()
49 constexpr bool is_style_windows(Style S) { return !is_style_posix(S); } in is_style_windows()
79 Style S = Style::native; ///< The path style to use.
82 friend const_iterator begin(StringRef path, Style style);
105 Style S = Style::native; ///< The path style to use.
107 friend reverse_iterator rbegin(StringRef path, Style style);
122 const_iterator begin(StringRef path, Style style = Style::native);
[all …]
H A DFormatProviders.h94 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 DChrono.h94 StringRef Style);
99 llvm::raw_ostream &OS, StringRef Style);
151 static std::pair<InternalRep, StringRef> consumeUnit(StringRef &Style,
154 if (Style.consume_front("ns"))
156 if (Style.consume_front("us"))
158 if (Style.consume_front("ms"))
160 if (Style.consume_front("s"))
162 if (Style.consume_front("m"))
164 if (Style.consume_front("h"))
169 static bool consumeShowUnit(StringRef &Style) {
[all...]
H A DNativeFormatting.h24 size_t getDefaultPrecision(FloatStyle Style);
29 IntegerStyle Style);
30 void write_integer(raw_ostream &S, int N, size_t MinDigits, IntegerStyle Style);
32 IntegerStyle Style);
34 IntegerStyle Style);
36 IntegerStyle Style);
38 IntegerStyle Style);
40 void write_hex(raw_ostream &S, uint64_t N, HexPrintStyle Style,
42 void write_double(raw_ostream &S, double D, FloatStyle Style,
H A DFormatAdapters.h39 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 DFormatUtil.cpp131 #define PUSH_CHARACTERISTIC_FLAG(Enum, TheOpt, Value, Style, Descriptive) \
133 ((Style == CharacteristicStyle::HeaderDefinition) ? #TheOpt \
136 #define PUSH_MASKED_CHARACTERISTIC_FLAG(Enum, Mask, TheOpt, Value, Style, \
139 ((Style == CharacteristicStyle::HeaderDefinition) \
147 CharacteristicStyle Style) { in formatSectionCharacteristics()
154 PUSH_CHARACTERISTIC_FLAG(SC, IMAGE_SCN_TYPE_NOLOAD, C, Style, "noload"); in formatSectionCharacteristics()
155 PUSH_CHARACTERISTIC_FLAG(SC, IMAGE_SCN_TYPE_NO_PAD, C, Style, "no padding"); in formatSectionCharacteristics()
156 PUSH_CHARACTERISTIC_FLAG(SC, IMAGE_SCN_CNT_CODE, C, Style, "code"); in formatSectionCharacteristics()
157 PUSH_CHARACTERISTIC_FLAG(SC, IMAGE_SCN_CNT_INITIALIZED_DATA, C, Style, in formatSectionCharacteristics()
159 PUSH_CHARACTERISTIC_FLAG(SC, IMAGE_SCN_CNT_UNINITIALIZED_DATA, C, Style, in formatSectionCharacteristics()
132 PUSH_CHARACTERISTIC_FLAG(Enum,TheOpt,Value,Style,Descriptive) global() argument
137 PUSH_MASKED_CHARACTERISTIC_FLAG(Enum,Mask,TheOpt,Value,Style,Descriptive) global() argument
148 formatSectionCharacteristics(uint32_t IndentLevel,uint32_t C,uint32_t FlagsPerLine,StringRef Separator,CharacteristicStyle Style) formatSectionCharacteristics() argument
[all...]
/freebsd/contrib/llvm-project/clang/lib/Format/
H A DFormat.cpp809 static void mapping(IO &IO, FormatStyle &Style) { in mapping()
811 IO.mapOptional("Language", Style.Language); in mapping()
819 if (getPredefinedStyle(StyleName, Style.Language, &PredefinedStyle) && in mapping()
820 Style == PredefinedStyle) { in mapping()
828 FormatStyle::LanguageKind OldLanguage = Style.Language; in mapping()
831 if (!getPredefinedStyle(BasedOnStyle, Language, &Style)) { in mapping()
835 Style.Language = OldLanguage; in mapping()
868 IO.mapOptional("AlignEscapedNewlinesLeft", Style.AlignEscapedNewlines); in mapping()
870 IO.mapOptional("AlwaysBreakAfterReturnType", Style.BreakAfterReturnType); in mapping()
872 Style.BreakTemplateDeclarations); in mapping()
[all …]
H A DContinuationIndenter.cpp34 static bool shouldIndentWrappedSelectorName(const FormatStyle &Style, in shouldIndentWrappedSelectorName() argument
36 return Style.IndentWrappedFunctionNames || LineType == LT_ObjCMethodDecl; in shouldIndentWrappedSelectorName()
133 const FormatStyle &Style) { in startsNextParameter() argument
136 Style.BreakConstructorInitializers == FormatStyle::BCIS_BeforeComma) { in startsNextParameter()
139 if (Style.Language == FormatStyle::LK_Proto && Current.is(TT_SelectorName)) in startsNextParameter()
143 Style.BreakConstructorInitializers != in startsNextParameter()
146 Style.BreakInheritanceList != FormatStyle::BILS_BeforeComma)); in startsNextParameter()
150 const FormatStyle &Style) { in opensProtoMessageField() argument
153 return Style.Language == FormatStyle::LK_TextProto || in opensProtoMessageField()
154 (Style.Language == FormatStyle::LK_Proto && in opensProtoMessageField()
[all …]
H A DUnwrappedLineFormatter.cpp46 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.Language == FormatStyle::LK_Java || Style.isJavaScript() || in getIndentOffset()
116 Style.isCSharp()) { in getIndentOffset()
[all …]
H A DUnwrappedLineParser.cpp138 const FormatStyle &Style, unsigned &LineLevel) in CompoundStatementIndenter() argument
140 Style.BraceWrapping.AfterControlStatement, in CompoundStatementIndenter()
141 Style.BraceWrapping.IndentBraces) {} in CompoundStatementIndenter()
158 SourceManager &SourceMgr, const FormatStyle &Style, in UnwrappedLineParser() argument
164 CurrentLines(&Lines), Style(Style), IsCpp(Style.isCpp()), in UnwrappedLineParser()
165 LangOpts(getFormattingLangOpts(Style)), Keywords(Keywords), in UnwrappedLineParser()
166 CommentPragmasRegex(Style.CommentPragmas), Tokens(nullptr), in UnwrappedLineParser()
168 IncludeGuard(Style in UnwrappedLineParser()
959 ShouldBreakBeforeBrace(const FormatStyle & Style,const FormatToken & InitialToken) ShouldBreakBeforeBrace() argument
[all...]
H A DTokenAnnotator.cpp28 const FormatStyle &Style) { in mustBreakAfterAttributes() argument
29 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()
187 if (Style.Language == FormatStyle::LK_Java && in parseAngle()
223 if (Style.Language == FormatStyle::LK_TextProto || in parseAngle()
224 (Style.Language == FormatStyle::LK_Proto && BeforeLess && in parseAngle()
237 Style.Language == FormatStyle::LK_Java) { in parseAngle()
256 if (Prev.isOneOf(tok::question, tok::colon) && !Style.isProto()) in parseAngle()
[all …]
H A DBreakableToken.cpp43 const FormatStyle &Style) { in getLineCommentIndentPrefix() argument
49 if (Style.Language == FormatStyle::LK_TextProto) in getLineCommentIndentPrefix()
70 encoding::Encoding Encoding, const FormatStyle &Style, in getCommentSplit() argument
94 if (Style.isJavaScript()) { in getCommentSplit()
113 if (Style.isCpp()) { in getCommentSplit()
130 if (Style.isJavaScript() && SpaceOffset + 1 < Text.size() && in getCommentSplit()
259 Style.TabWidth, Encoding); in getRemainingLength()
270 encoding::Encoding Encoding, const FormatStyle &Style) in BreakableStringLiteral() argument
271 : BreakableToken(Tok, InPPDirective, Encoding, Style), in BreakableStringLiteral()
283 ColumnLimit - Postfix.size(), Style.TabWidth, Encoding); in getSplit()
[all …]
H A DWhitespaceManager.cpp115 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 DFormatToken.cpp56 bool FormatToken::isBlockIndentedInitRBrace(const FormatStyle &Style) const { in isBlockIndentedInitRBrace()
58 if (!Style.Cpp11BracedListStyle || in isBlockIndentedInitRBrace()
59 Style.AlignAfterOpenBracket != FormatStyle::BAS_BlockIndent) { in isBlockIndentedInitRBrace()
71 bool FormatToken::opensBlockOrBlockTypeList(const FormatStyle &Style) const { in opensBlockOrBlockTypeList()
73 if (is(tok::l_brace) && getBlockKind() == BK_BracedInit && Style.isCSharp()) in opensBlockOrBlockTypeList()
80 (!Style.Cpp11BracedListStyle && NestingLevel == 0))) || in opensBlockOrBlockTypeList()
81 (is(tok::less) && Style.isProto()); in opensBlockOrBlockTypeList()
109 Style.ColumnLimit - State.Column + State.NextToken->Previous->ColumnWidth; in formatAfterToken()
176 if (Style.Cpp11BracedListStyle && !Style.BinPackArguments && in precomputeFormattingInfos()
188 if (Style.AlignAfterOpenBracket == FormatStyle::BAS_DontAlign) in precomputeFormattingInfos()
[all …]
H A DFormatTokenLexer.cpp27 const FormatStyle &Style, encoding::Encoding Encoding, in FormatTokenLexer() argument
32 LangOpts(getFormattingLangOpts(Style)), SourceMgr(SourceMgr), ID(ID),
33 Style(Style), IdentTable(IdentTable), Keywords(IdentTable),
35 FormattingDisabled(false), MacroBlockBeginRegex(Style.MacroBlockBegin),
36 MacroBlockEndRegex(Style.MacroBlockEnd) {
40 for (const std::string &ForEachMacro : Style.ForEachMacros) {
44 for (const std::string &IfMacro : Style.IfMacros) {
48 for (const std::string &AttributeMacro : Style.AttributeMacros) {
52 for (const std::string &StatementMacro : Style.StatementMacros) {
56 for (const std::string &TypenameMacro : Style.TypenameMacros) {
[all …]
H A DTokenAnalyzer.cpp86 TokenAnalyzer::TokenAnalyzer(const Environment &Env, const FormatStyle &Style) in TokenAnalyzer() argument
87 : Style(Style), LangOpts(getFormattingLangOpts(Style)), Env(Env), in TokenAnalyzer()
96 LLVM_DEBUG(llvm::dbgs() << "Language: " << getLanguageName(Style.Language) in TokenAnalyzer()
106 Env.getFirstStartColumn(), Style, Encoding, Allocator, in process()
110 UnwrappedLineParser Parser(Env.getSourceManager(), Style, Lex.getKeywords(), in process()
122 TokenAnnotator Annotator(Style, Lex.getKeywords()); in process()
H A DBreakableToken.h237 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);
403 const FormatStyle &Style, bool UseCRLF);
481 const FormatStyle &Style);
H A DUnwrappedLineFormatter.h30 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 DNativeFormatting.cpp57 IntegerStyle Style, bool IsNegative) { in write_unsigned_impl() argument
66 if (Len < MinDigits && Style != IntegerStyle::Number) { in write_unsigned_impl()
71 if (Style == IntegerStyle::Number) { in write_unsigned_impl()
80 IntegerStyle Style, bool IsNegative = false) { in write_unsigned() argument
83 write_unsigned_impl(S, static_cast<uint32_t>(N), MinDigits, Style, in write_unsigned()
86 write_unsigned_impl(S, N, MinDigits, Style, IsNegative); in write_unsigned()
91 IntegerStyle Style) { in write_signed() argument
97 write_unsigned(S, static_cast<UnsignedT>(N), MinDigits, Style); in write_signed()
102 write_unsigned(S, UN, MinDigits, Style, true); in write_signed()
106 IntegerStyle Style) { in write_integer() argument
[all …]
H A DPath.cpp39 using llvm::sys::path::Style;
41 inline Style real_style(Style style) { in real_style()
42 if (style != Style::native) in real_style()
45 return Style::posix; in real_style()
46 return LLVM_WINDOWS_PREFER_FORWARD_SLASH ? Style::windows_slash in real_style()
47 : Style::windows_backslash; in real_style()
50 inline const char *separators(Style style) { in separators()
56 inline char preferred_separator(Style style) { in preferred_separator()
57 if (real_style(style) == Style::windows) in preferred_separator()
62 StringRef find_first_component(StringRef path, Style style) { in find_first_component()
[all …]
H A DChrono.cpp73 StringRef Style) { in format()
76 if (Style.empty()) Style = "%Y-%m-%d %H:%M:%S.%N"; in format()
79 for (unsigned I = 0; I < Style.size(); ++I) { in format()
80 if (Style[I] == '%' && Style.size() > I + 1) switch (Style[I + 1]) { in format()
101 FStream << Style[I];
110 const UtcTime<std::chrono::seconds> &T, raw_ostream &OS, StringRef Style) {
116 llvm::format(Fractional, LT, OS, Style);
54 format(const TimePoint<> & T,raw_ostream & OS,StringRef Style) format() argument
[all...]
/freebsd/contrib/llvm-project/lldb/source/Utility/
H A DFileSpec.cpp39 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 in FileSpec()
537 format(const FileSpec & F,raw_ostream & Stream,StringRef Style) format() argument
[all...]
/freebsd/contrib/llvm-project/clang/lib/Tooling/Inclusions/
H A DHeaderIncludes.cpp41 StringRef FileName, StringRef Code, const IncludeStyle &Style, in getOffsetAfterTokenSequence() argument
84 const IncludeStyle &Style) { in getOffsetAfterHeaderGuardsAndComments() argument
92 FileName, Code, Style, in getOffsetAfterHeaderGuardsAndComments()
160 const IncludeStyle &Style) { in getMaxHeaderInsertionOffset() argument
162 FileName, Code, Style, in getMaxHeaderInsertionOffset()
191 IncludeCategoryManager::IncludeCategoryManager(const IncludeStyle &Style, in IncludeCategoryManager() argument
193 : Style(Style), FileName(FileName) { in IncludeCategoryManager()
194 for (const auto &Category : Style.IncludeCategories) { in IncludeCategoryManager()
203 if (!Style.IncludeIsMainSourceRegex.empty()) { in IncludeCategoryManager()
204 llvm::Regex MainFileRegex(Style.IncludeIsMainSourceRegex); in IncludeCategoryManager()
[all …]
/freebsd/contrib/llvm-project/lldb/include/lldb/Utility/
H A DFileSpec.h58 using Style = llvm::sys::path::Style;
75 explicit FileSpec(llvm::StringRef path, Style style = Style::native);
198 static std::optional<Style> GuessPathStyle(llvm::StringRef absolute_path);
217 Style GetPathStyle() const;
365 void SetFile(llvm::StringRef path, Style style);
432 Style m_style; in PathWasModified()
461 StringRef Style);
/freebsd/contrib/llvm-project/llvm/lib/Target/X86/
H A DX86Subtarget.h44 enum class Style { enum
59 PICStyles::Style PICStyle;
182 PICStyles::Style getPICStyle() const { return PICStyle; } in getPICStyle()
183 void setPICStyle(PICStyles::Style Style) { PICStyle = Style; } in setPICStyle() argument
328 bool isPICStyleGOT() const { return PICStyle == PICStyles::Style::GOT; } in isPICStyleGOT()
329 bool isPICStyleRIPRel() const { return PICStyle == PICStyles::Style::RIPRel; } in isPICStyleRIPRel()
332 return PICStyle == PICStyles::Style::StubPIC; in isPICStyleStubPIC()

123456789