1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

WithColor.h - reduce CommandLine.h include to forward declaration. NFC.

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:🆑:OptionCategory and just including raw_ostream.h instead.
This commit is contained in:
Simon Pilgrim 2020-06-23 16:55:59 +01:00
parent 115dd458c9
commit 12aae3e8af
2 changed files with 6 additions and 3 deletions

View File

@ -9,14 +9,17 @@
#ifndef LLVM_SUPPORT_WITHCOLOR_H
#define LLVM_SUPPORT_WITHCOLOR_H
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/raw_ostream.h"
namespace llvm {
class Error;
class raw_ostream;
class StringRef;
namespace cl {
class OptionCategory;
}
extern cl::OptionCategory ColorCategory;
// Symbolic names for various syntax elements.

View File

@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "llvm/Support/WithColor.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Support/CommandLine.h"
using namespace llvm;