<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Support/WithColor.cpp, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[Support] Allow the ability to change WithColor's auto detection function</title>
<updated>2022-03-01T04:30:06+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2022-02-28T21:59:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4429cf146e8ad393ec1d4e6bddab73b7e53957d2'/>
<id>4429cf146e8ad393ec1d4e6bddab73b7e53957d2</id>
<content type='text'>
WithColor has an "auto detection mode" which looks whether the
corresponding whether the corresponding cl::opt is enabled or not. While
this is great when opting into cl::opt, it's not so great for downstream
users of this utility, which might have their own competing options to
enable or disable colors. The WithColor constructor takes a color mode,
but the big benefit of the class are its static error and warning
helpers and default error handlers.

In order to allow users of this utility to enable or disable colors
globally, this patch adds the ability to specify a global auto detection
function. By default, the auto detection function behaves the way that
it does today. The benefit of this patch lies in that it can be
overwritten. In addition to a ability to change the auto detection
function, I've also made it possible to get your hands on the default
auto detection function, so you swap it back if if you so desire.

This patch allow downstream users (like LLDB) to globally disable colors
with its own command line flag.

Differential revision: https://reviews.llvm.org/D120593
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
WithColor has an "auto detection mode" which looks whether the
corresponding whether the corresponding cl::opt is enabled or not. While
this is great when opting into cl::opt, it's not so great for downstream
users of this utility, which might have their own competing options to
enable or disable colors. The WithColor constructor takes a color mode,
but the big benefit of the class are its static error and warning
helpers and default error handlers.

In order to allow users of this utility to enable or disable colors
globally, this patch adds the ability to specify a global auto detection
function. By default, the auto detection function behaves the way that
it does today. The benefit of this patch lies in that it can be
overwritten. In addition to a ability to change the auto detection
function, I've also made it possible to get your hands on the default
auto detection function, so you swap it back if if you so desire.

This patch allow downstream users (like LLDB) to globally disable colors
with its own command line flag.

Differential revision: https://reviews.llvm.org/D120593
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[Support] Allow the ability to change WithColor's auto detection function"</title>
<updated>2022-02-28T23:32:15+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2022-02-28T23:31:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3a167c4a90b0352ff3cca576392882e45b70dc36'/>
<id>3a167c4a90b0352ff3cca576392882e45b70dc36</id>
<content type='text'>
This reverts commit a83cf7a84628a9e3a24cfd33c69f786cf74df4ec because it
breaks a bunch of build bots.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit a83cf7a84628a9e3a24cfd33c69f786cf74df4ec because it
breaks a bunch of build bots.
</pre>
</div>
</content>
</entry>
<entry>
<title>[Support] Allow the ability to change WithColor's auto detection function</title>
<updated>2022-02-28T23:03:04+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2022-02-28T21:59:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a83cf7a84628a9e3a24cfd33c69f786cf74df4ec'/>
<id>a83cf7a84628a9e3a24cfd33c69f786cf74df4ec</id>
<content type='text'>
WithColor has an "auto detection mode" which looks whether the
corresponding whether the corresponding cl::opt is enabled or not. While
this is great when opting into cl::opt, it's not so great for downstream
users of this utility, which might have their own competing options to
enable or disable colors. The WithColor constructor takes a color mode,
but the big benefit of the class are its static error and warning
helpers and default error handlers.

In order to allow users of this utility to enable or disable colors
globally, this patch adds the ability to specify a global auto detection
function. By default, the auto detection function behaves the way that
it does today. The benefit of this patch lies in that it can be
overwritten. In addition to a ability to change the auto detection
function, I've also made it possible to get your hands on the default
auto detection function, so you swap it back if if you so desire.

This patch allow downstream users (like LLDB) to globally disable colors
with its own command line flag.

Differential revision: https://reviews.llvm.org/D120593
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
WithColor has an "auto detection mode" which looks whether the
corresponding whether the corresponding cl::opt is enabled or not. While
this is great when opting into cl::opt, it's not so great for downstream
users of this utility, which might have their own competing options to
enable or disable colors. The WithColor constructor takes a color mode,
but the big benefit of the class are its static error and warning
helpers and default error handlers.

In order to allow users of this utility to enable or disable colors
globally, this patch adds the ability to specify a global auto detection
function. By default, the auto detection function behaves the way that
it does today. The benefit of this patch lies in that it can be
overwritten. In addition to a ability to change the auto detection
function, I've also made it possible to get your hands on the default
auto detection function, so you swap it back if if you so desire.

This patch allow downstream users (like LLDB) to globally disable colors
with its own command line flag.

Differential revision: https://reviews.llvm.org/D120593
</pre>
</div>
</content>
</entry>
<entry>
<title>Use ManagedStatic and lazy initialization of cl::opt in libSupport to make it free of global initializer</title>
<updated>2021-07-16T07:38:16+00:00</updated>
<author>
<name>Mehdi Amini</name>
<email>joker.eph@gmail.com</email>
</author>
<published>2021-07-15T23:52:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=76374573ce829b083b95b74937a11e9b91f8f45f'/>
<id>76374573ce829b083b95b74937a11e9b91f8f45f</id>
<content type='text'>
We can build it with -Werror=global-constructors now. This helps
in situation where libSupport is embedded as a shared library,
potential with dlopen/dlclose scenario, and when command-line
parsing or other facilities may not be involved. Avoiding the
implicit construction of these cl::opt can avoid double-registration
issues and other kind of behavior.

Reviewed By: lattner, jpienaar

Differential Revision: https://reviews.llvm.org/D105959
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We can build it with -Werror=global-constructors now. This helps
in situation where libSupport is embedded as a shared library,
potential with dlopen/dlclose scenario, and when command-line
parsing or other facilities may not be involved. Avoiding the
implicit construction of these cl::opt can avoid double-registration
issues and other kind of behavior.

Reviewed By: lattner, jpienaar

Differential Revision: https://reviews.llvm.org/D105959
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Use ManagedStatic and lazy initialization of cl::opt in libSupport to make it free of global initializer"</title>
<updated>2021-07-16T07:35:13+00:00</updated>
<author>
<name>Mehdi Amini</name>
<email>joker.eph@gmail.com</email>
</author>
<published>2021-07-16T07:34:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8d051d854619956de633047409149cdab1e3319a'/>
<id>8d051d854619956de633047409149cdab1e3319a</id>
<content type='text'>
This reverts commit af9321739b20becf170e6bb5060b8d780e1dc8dd.
Still some specific config broken in some way that requires more
investigation.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit af9321739b20becf170e6bb5060b8d780e1dc8dd.
Still some specific config broken in some way that requires more
investigation.
</pre>
</div>
</content>
</entry>
<entry>
<title>Use ManagedStatic and lazy initialization of cl::opt in libSupport to make it free of global initializer</title>
<updated>2021-07-16T06:54:26+00:00</updated>
<author>
<name>Mehdi Amini</name>
<email>joker.eph@gmail.com</email>
</author>
<published>2021-07-15T23:52:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=af9321739b20becf170e6bb5060b8d780e1dc8dd'/>
<id>af9321739b20becf170e6bb5060b8d780e1dc8dd</id>
<content type='text'>
We can build it with -Werror=global-constructors now. This helps
in situation where libSupport is embedded as a shared library,
potential with dlopen/dlclose scenario, and when command-line
parsing or other facilities may not be involved. Avoiding the
implicit construction of these cl::opt can avoid double-registration
issues and other kind of behavior.

Reviewed By: lattner, jpienaar

Differential Revision: https://reviews.llvm.org/D105959
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We can build it with -Werror=global-constructors now. This helps
in situation where libSupport is embedded as a shared library,
potential with dlopen/dlclose scenario, and when command-line
parsing or other facilities may not be involved. Avoiding the
implicit construction of these cl::opt can avoid double-registration
issues and other kind of behavior.

Reviewed By: lattner, jpienaar

Differential Revision: https://reviews.llvm.org/D105959
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Use ManagedStatic and lazy initialization of cl::opt in libSupport to make it free of global initializer"</title>
<updated>2021-07-16T03:46:53+00:00</updated>
<author>
<name>Mehdi Amini</name>
<email>joker.eph@gmail.com</email>
</author>
<published>2021-07-16T03:46:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=16b5e9d6a269913e8da0fa037e8af32eaf304c8f'/>
<id>16b5e9d6a269913e8da0fa037e8af32eaf304c8f</id>
<content type='text'>
This reverts commit 42f588f39c5ce6f521e3709b8871d1fdd076292f.
Broke some buildbots
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 42f588f39c5ce6f521e3709b8871d1fdd076292f.
Broke some buildbots
</pre>
</div>
</content>
</entry>
<entry>
<title>Use ManagedStatic and lazy initialization of cl::opt in libSupport to make it free of global initializer</title>
<updated>2021-07-16T03:33:20+00:00</updated>
<author>
<name>Mehdi Amini</name>
<email>joker.eph@gmail.com</email>
</author>
<published>2021-07-15T23:52:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=42f588f39c5ce6f521e3709b8871d1fdd076292f'/>
<id>42f588f39c5ce6f521e3709b8871d1fdd076292f</id>
<content type='text'>
We can build it with -Werror=global-constructors now. This helps
in situation where libSupport is embedded as a shared library,
potential with dlopen/dlclose scenario, and when command-line
parsing or other facilities may not be involved. Avoiding the
implicit construction of these cl::opt can avoid double-registration
issues and other kind of behavior.

Reviewed By: lattner, jpienaar

Differential Revision: https://reviews.llvm.org/D105959
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We can build it with -Werror=global-constructors now. This helps
in situation where libSupport is embedded as a shared library,
potential with dlopen/dlclose scenario, and when command-line
parsing or other facilities may not be involved. Avoiding the
implicit construction of these cl::opt can avoid double-registration
issues and other kind of behavior.

Reviewed By: lattner, jpienaar

Differential Revision: https://reviews.llvm.org/D105959
</pre>
</div>
</content>
</entry>
<entry>
<title>[Support] Don't include VirtualFileSystem.h in CommandLine.h</title>
<updated>2021-04-21T14:19:01+00:00</updated>
<author>
<name>Nico Weber</name>
<email>thakis@chromium.org</email>
</author>
<published>2021-04-21T14:00:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ba7a92c01e86b5048a93abe7c26c25b90ea9040a'/>
<id>ba7a92c01e86b5048a93abe7c26c25b90ea9040a</id>
<content type='text'>
CommandLine.h is indirectly included in ~50% of TUs when building
clang, and VirtualFileSystem.h is large.

(Already remarked by jhenderson on D70769.)

No behavior change.

Differential Revision: https://reviews.llvm.org/D100957
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
CommandLine.h is indirectly included in ~50% of TUs when building
clang, and VirtualFileSystem.h is large.

(Already remarked by jhenderson on D70769.)

No behavior change.

Differential Revision: https://reviews.llvm.org/D100957
</pre>
</div>
</content>
</entry>
<entry>
<title>WithColor.h - reduce CommandLine.h include to forward declaration. NFC.</title>
<updated>2020-06-23T16:07:53+00:00</updated>
<author>
<name>Simon Pilgrim</name>
<email>llvm-dev@redking.me.uk</email>
</author>
<published>2020-06-23T15:55:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ddc6ec9470bd081c358dea78e5c5d9babb20e034'/>
<id>ddc6ec9470bd081c358dea78e5c5d9babb20e034</id>
<content type='text'>
WithColor.h is one of the most common headers, we can severely reduce its frontend impact (in ClangBuildAnalyzer reports) by removing the bulky CommandLine.h include, forward declaring llvm::cl::OptionCategory and just including raw_ostream.h instead.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
WithColor.h is one of the most common headers, we can severely reduce its frontend impact (in ClangBuildAnalyzer reports) by removing the bulky CommandLine.h include, forward declaring llvm::cl::OptionCategory and just including raw_ostream.h instead.
</pre>
</div>
</content>
</entry>
</feed>
