Home
last modified time | relevance | path

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

12345678910

/openbsd-src/gnu/llvm/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.h77 static bool consumeHexStyle(StringRef &Str, HexPrintStyle &Style) { in consumeHexStyle() argument
82 Style = HexPrintStyle::Lower; in consumeHexStyle()
84 Style = HexPrintStyle::Upper; in consumeHexStyle()
86 Style = HexPrintStyle::PrefixLower; in consumeHexStyle()
88 Style = HexPrintStyle::PrefixUpper; in consumeHexStyle()
92 static size_t consumeNumHexDigits(StringRef &Str, HexPrintStyle Style, in consumeNumHexDigits() argument
95 if (isPrefixedHexStyle(Style)) in consumeNumHexDigits()
131 static void format(const T &V, llvm::raw_ostream &Stream, StringRef Style) {
134 if (consumeHexStyle(Style, HS)) {
135 Digits = consumeNumHexDigits(Style, HS, 0);
[all …]
H A DChrono.h73 StringRef Style);
125 static std::pair<InternalRep, StringRef> consumeUnit(StringRef &Style,
128 if (Style.consume_front("ns"))
130 if (Style.consume_front("us"))
132 if (Style.consume_front("ms"))
134 if (Style.consume_front("s"))
136 if (Style.consume_front("m"))
138 if (Style.consume_front("h"))
143 static bool consumeShowUnit(StringRef &Style) {
144 if (Style.empty())
[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.h37 void format(llvm::raw_ostream &Stream, StringRef Style) override { in format() argument
39 FmtAlign(Adapter, Where, Amount, Fill).format(Stream, Style); in format()
51 void format(llvm::raw_ostream &Stream, StringRef Style) override { in format() argument
54 Adapter.format(Stream, Style); in format()
66 void format(llvm::raw_ostream &Stream, StringRef Style) override { in format() argument
69 Adapter.format(Stream, Style); in format()
79 void format(llvm::raw_ostream &Stream, StringRef Style) override { in format() argument
/openbsd-src/gnu/llvm/llvm/lib/DebugInfo/PDB/Native/
H A DFormatUtil.cpp132 #define PUSH_CHARACTERISTIC_FLAG(Enum, TheOpt, Value, Style, Descriptive) \ argument
134 ((Style == CharacteristicStyle::HeaderDefinition) ? #TheOpt \
137 #define PUSH_MASKED_CHARACTERISTIC_FLAG(Enum, Mask, TheOpt, Value, Style, \ argument
140 ((Style == CharacteristicStyle::HeaderDefinition) \
148 CharacteristicStyle Style) { in formatSectionCharacteristics() argument
155 PUSH_CHARACTERISTIC_FLAG(SC, IMAGE_SCN_TYPE_NOLOAD, C, Style, "noload"); in formatSectionCharacteristics()
156 PUSH_CHARACTERISTIC_FLAG(SC, IMAGE_SCN_TYPE_NO_PAD, C, Style, "no padding"); in formatSectionCharacteristics()
157 PUSH_CHARACTERISTIC_FLAG(SC, IMAGE_SCN_CNT_CODE, C, Style, "code"); in formatSectionCharacteristics()
158 PUSH_CHARACTERISTIC_FLAG(SC, IMAGE_SCN_CNT_INITIALIZED_DATA, C, Style, in formatSectionCharacteristics()
160 PUSH_CHARACTERISTIC_FLAG(SC, IMAGE_SCN_CNT_UNINITIALIZED_DATA, C, Style, in formatSectionCharacteristics()
[all …]
/openbsd-src/gnu/llvm/clang/lib/Format/
H A DFormat.cpp764 static void mapping(IO &IO, FormatStyle &Style) { in mapping()
766 IO.mapOptional("Language", Style.Language); in mapping()
774 if (getPredefinedStyle(StyleName, Style.Language, &PredefinedStyle) && in mapping()
775 Style == PredefinedStyle) { in mapping()
784 FormatStyle::LanguageKind OldLanguage = Style.Language; in mapping()
787 if (!getPredefinedStyle(BasedOnStyle, Language, &Style)) { in mapping()
791 Style.Language = OldLanguage; in mapping()
819 IO.mapOptional("AlignEscapedNewlinesLeft", Style.AlignEscapedNewlines); in mapping()
828 IO.mapOptional("DerivePointerBinding", Style.DerivePointerAlignment); in mapping()
830 Style.IndentWrappedFunctionNames); in mapping()
[all …]
H A DContinuationIndenter.cpp33 static bool shouldIndentWrappedSelectorName(const FormatStyle &Style, in shouldIndentWrappedSelectorName() argument
35 return Style.IndentWrappedFunctionNames || LineType == LT_ObjCMethodDecl; in shouldIndentWrappedSelectorName()
124 const FormatStyle &Style) { in startsNextParameter() argument
127 Style.BreakConstructorInitializers == FormatStyle::BCIS_BeforeComma) { in startsNextParameter()
130 if (Style.Language == FormatStyle::LK_Proto && Current.is(TT_SelectorName)) in startsNextParameter()
134 Style.BreakConstructorInitializers != in startsNextParameter()
137 Style.BreakInheritanceList != FormatStyle::BILS_BeforeComma)); in startsNextParameter()
141 const FormatStyle &Style) { in opensProtoMessageField() argument
144 return Style.Language == FormatStyle::LK_TextProto || in opensProtoMessageField()
145 (Style.Language == FormatStyle::LK_Proto && in opensProtoMessageField()
[all …]
H A DUnwrappedLineFormatter.cpp45 LevelIndentTracker(const FormatStyle &Style, in LevelIndentTracker() argument
48 : Style(Style), Keywords(Keywords), AdditionalIndent(AdditionalIndent) { in LevelIndentTracker()
50 IndentForLevel.push_back(Style.IndentWidth * i + AdditionalIndent); in LevelIndentTracker()
63 if (Style.IndentPPDirectives != FormatStyle::PPDIS_None && in nextLine()
65 (Style.IndentPPDirectives == FormatStyle::PPDIS_BeforeHash && in nextLine()
68 (Style.PPIndentWidth >= 0) ? Style.PPIndentWidth : Style.IndentWidth; in nextLine()
71 (Line.Level - Line.PPLevel) * Style.IndentWidth in nextLine()
80 Indent = Line.Level * Style.IndentWidth + Style.ContinuationIndentWidth; in nextLine()
112 if (Style.Language == FormatStyle::LK_Java || Style.isJavaScript() || in getIndentOffset()
113 Style.isCSharp()) { in getIndentOffset()
[all …]
H A DTokenAnnotator.cpp113 AnnotatingParser(const FormatStyle &Style, AnnotatedLine &Line, in AnnotatingParser() argument
115 : Style(Style), Line(Line), CurrentToken(Line.First), AutoFound(false), in AnnotatingParser()
154 if (Style.Language == FormatStyle::LK_Java && in parseAngle()
181 if (Style.Language == FormatStyle::LK_TextProto || in parseAngle()
182 (Style.Language == FormatStyle::LK_Proto && Left->Previous && in parseAngle()
192 Style.Language == FormatStyle::LK_Java) { in parseAngle()
198 !Style.isCSharp() && Style.Language != FormatStyle::LK_Proto && in parseAngle()
199 Style.Language != FormatStyle::LK_TextProto)) { in parseAngle()
215 if (Style.Language == FormatStyle::LK_Proto) { in parseAngle()
272 if (!Style.isVerilog()) { in parseParens()
[all …]
H A DUnwrappedLineParser.cpp245 const FormatStyle &Style, unsigned &LineLevel) in CompoundStatementIndenter() argument
247 Style.BraceWrapping.AfterControlStatement, in CompoundStatementIndenter()
248 Style.BraceWrapping.IndentBraces) {} in CompoundStatementIndenter()
333 UnwrappedLineParser::UnwrappedLineParser(const FormatStyle &Style, in UnwrappedLineParser() argument
339 CurrentLines(&Lines), Style(Style), Keywords(Keywords), in UnwrappedLineParser()
340 CommentPragmasRegex(Style.CommentPragmas), Tokens(nullptr), in UnwrappedLineParser()
342 IncludeGuard(Style.IndentPPDirectives == FormatStyle::PPDIS_None in UnwrappedLineParser()
349 IncludeGuard = Style.IndentPPDirectives == FormatStyle::PPDIS_None in reset()
410 bool MustBeDeclaration = !Line->InPPDirective && !Style.isJavaScript(); in parseFile()
413 if (Style.Language == FormatStyle::LK_TextProto) in parseFile()
[all …]
H A DWhitespaceManager.cpp275 AlignTokenSequence(const FormatStyle &Style, unsigned Start, unsigned End, in AlignTokenSequence() argument
384 return Style.BinPackArguments; in AlignTokenSequence()
448 if (Style.PointerAlignment == FormatStyle::PAS_Right && in AlignTokenSequence()
494 static unsigned AlignTokens(const FormatStyle &Style, F &&Matches, in AlignTokens() argument
553 AlignTokenSequence(Style, StartOfSequence, EndOfSequence, in __anone58695710202()
613 AlignTokens(Style, Matches, Changes, i, ACS, RightJustify);
658 if (Style.ColumnLimit != 0 &&
659 Style.ColumnLimit < NewLeft + NewAnchor + NewRight) {
723 if (!Style.AlignConsecutiveMacros.Enabled) in alignConsecutiveMacros()
775 !Style.AlignConsecutiveMacros.AcrossEmptyLines; in alignConsecutiveMacros()
[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 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 DFormatToken.cpp78 bool FormatToken::opensBlockOrBlockTypeList(const FormatStyle &Style) const { in opensBlockOrBlockTypeList()
80 if (is(tok::l_brace) && getBlockKind() == BK_BracedInit && Style.isCSharp()) in opensBlockOrBlockTypeList()
87 (!Style.Cpp11BracedListStyle && NestingLevel == 0))) || in opensBlockOrBlockTypeList()
88 (is(tok::less) && (Style.Language == FormatStyle::LK_Proto || in opensBlockOrBlockTypeList()
89 Style.Language == FormatStyle::LK_TextProto)); in opensBlockOrBlockTypeList()
117 Style.ColumnLimit - State.Column + State.NextToken->Previous->ColumnWidth; in formatAfterToken()
184 if (Style.Cpp11BracedListStyle && !Style.BinPackArguments && in precomputeFormattingInfos()
196 if (Style.AlignAfterOpenBracket == FormatStyle::BAS_DontAlign) in precomputeFormattingInfos()
228 if (Style.Cpp11BracedListStyle && in precomputeFormattingInfos()
267 unsigned MaxItems = Style.ColumnLimit / 3; in precomputeFormattingInfos()
[all …]
H A DTokenAnalyzer.cpp86 TokenAnalyzer::TokenAnalyzer(const Environment &Env, const FormatStyle &Style) in TokenAnalyzer() argument
87 : Style(Style), Env(Env), in TokenAnalyzer()
96 LLVM_DEBUG(llvm::dbgs() << "Language: " << getLanguageName(Style.Language) in TokenAnalyzer()
104 IdentifierTable IdentTable(getFormattingLangOpts(Style)); in process()
106 Env.getFirstStartColumn(), Style, Encoding, Allocator, in process()
111 UnwrappedLineParser Parser(Style, Lex.getKeywords(), in process()
122 TokenAnnotator Annotator(Style, Lex.getKeywords()); in process()
H A DDefinitionBlockSeparator.cpp25 assert(Style.SeparateDefinitionBlocks != FormatStyle::SDS_Leave); in analyze()
36 Style.SeparateDefinitionBlocks == FormatStyle::SDS_Never; in separateBlocks()
57 (Style.isJavaScript() && in separateBlocks()
69 (Style.SeparateDefinitionBlocks == FormatStyle::SDS_Always ? 1 : 0) + 1; in separateBlocks()
71 Env.getSourceManager(), Style, in separateBlocks()
72 Style.LineEnding > FormatStyle::LE_CRLF in separateBlocks()
75 Style.LineEnding == FormatStyle::LE_DeriveCRLF) in separateBlocks()
76 : Style.LineEnding == FormatStyle::LE_CRLF); in separateBlocks()
167 if ((Style.isCSharp() && OperateLine->First->is(TT_AttributeSquare))) in separateBlocks()
H A DUnwrappedLineFormatter.h32 const FormatStyle &Style, in UnwrappedLineFormatter() argument
36 : Indenter(Indenter), Whitespaces(Whitespaces), Style(Style), in UnwrappedLineFormatter()
68 const FormatStyle &Style; variable
/openbsd-src/gnu/llvm/llvm/lib/Support/
H A DNativeFormatting.cpp57 IntegerStyle Style, bool IsNegative) { in write_unsigned_impl() argument
69 if (Len < MinDigits && Style != IntegerStyle::Number) { in write_unsigned_impl()
74 if (Style == IntegerStyle::Number) { in write_unsigned_impl()
83 IntegerStyle Style, bool IsNegative = false) { in write_unsigned() argument
86 write_unsigned_impl(S, static_cast<uint32_t>(N), MinDigits, Style, in write_unsigned()
89 write_unsigned_impl(S, N, MinDigits, Style, IsNegative); in write_unsigned()
94 IntegerStyle Style) { in write_signed() argument
100 write_unsigned(S, static_cast<UnsignedT>(N), MinDigits, Style); in write_signed()
105 write_unsigned(S, UN, MinDigits, Style, true); in write_signed()
109 IntegerStyle Style) { in write_integer() argument
[all …]
H A DChrono.cpp54 StringRef Style) { in format() argument
60 if (Style.empty()) Style = "%Y-%m-%d %H:%M:%S.%N"; in format()
63 for (unsigned I = 0; I < Style.size(); ++I) { in format()
64 if (Style[I] == '%' && Style.size() > I + 1) switch (Style[I + 1]) { in format()
85 FStream << Style[I]; in format()
H A DPath.cpp38 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 …]
/openbsd-src/gnu/llvm/lldb/source/Utility/
H A DFileSpec.cpp38 static constexpr FileSpec::Style GetNativeStyle() { in GetNativeStyle()
40 return FileSpec::Style::windows; in GetNativeStyle()
42 return FileSpec::Style::posix; in GetNativeStyle()
46 bool PathStyleIsPosix(FileSpec::Style style) { in PathStyleIsPosix()
50 const char *GetPathSeparators(FileSpec::Style style) { in GetPathSeparators()
54 char GetPreferredPathSeparator(FileSpec::Style style) { in GetPreferredPathSeparator()
58 void Denormalize(llvm::SmallVectorImpl<char> &path, FileSpec::Style style) { in Denormalize()
70 FileSpec::FileSpec(llvm::StringRef path, Style style) : m_style(style) { in FileSpec()
75 : FileSpec{path, triple.isOSWindows() ? Style::windows : Style::posix} {} in FileSpec()
173 void FileSpec::SetFile(llvm::StringRef pathname, Style style) { in SetFile()
[all …]
/openbsd-src/gnu/llvm/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 …]
/openbsd-src/gnu/llvm/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);
435 Style m_style; ///< The syntax that this path uses (e.g. Windows / Posix)
464 StringRef Style);
/openbsd-src/gnu/llvm/llvm/lib/Target/X86/
H A DX86Subtarget.h43 enum class Style { enum
62 PICStyles::Style PICStyle;
190 PICStyles::Style getPICStyle() const { return PICStyle; } in getPICStyle()
191 void setPICStyle(PICStyles::Style Style) { PICStyle = Style; } in setPICStyle() argument
331 bool isPICStyleGOT() const { return PICStyle == PICStyles::Style::GOT; } in isPICStyleGOT()
332 bool isPICStyleRIPRel() const { return PICStyle == PICStyles::Style::RIPRel; } in isPICStyleRIPRel()
335 return PICStyle == PICStyles::Style::StubPIC; in isPICStyleStubPIC()

12345678910