aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/llvm/lib/Support/Process.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2024-07-27 23:34:35 +0000
committerDimitry Andric <dim@FreeBSD.org>2024-10-23 18:26:01 +0000
commit0fca6ea1d4eea4c934cfff25ac9ee8ad6fe95583 (patch)
tree6cf5ab1f05330c6773b1f3f64799d56a9c7a1faa /contrib/llvm-project/llvm/lib/Support/Process.cpp
parent6b9f7133aba44189d9625c352bc2c2a59baf18ef (diff)
parentac9a064cb179f3425b310fa2847f8764ac970a4d (diff)
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Support/Process.cpp')
-rw-r--r--contrib/llvm-project/llvm/lib/Support/Process.cpp42
1 files changed, 29 insertions, 13 deletions
diff --git a/contrib/llvm-project/llvm/lib/Support/Process.cpp b/contrib/llvm-project/llvm/lib/Support/Process.cpp
index f81c13970d52..54462f23c842 100644
--- a/contrib/llvm-project/llvm/lib/Support/Process.cpp
+++ b/contrib/llvm-project/llvm/lib/Support/Process.cpp
@@ -67,24 +67,40 @@ Process::FindInEnvPath(StringRef EnvName, StringRef FileName,
return FoundPath;
}
-
+// clang-format off
#define COLOR(FGBG, CODE, BOLD) "\033[0;" BOLD FGBG CODE "m"
-#define ALLCOLORS(FGBG,BOLD) {\
- COLOR(FGBG, "0", BOLD),\
- COLOR(FGBG, "1", BOLD),\
- COLOR(FGBG, "2", BOLD),\
- COLOR(FGBG, "3", BOLD),\
- COLOR(FGBG, "4", BOLD),\
- COLOR(FGBG, "5", BOLD),\
- COLOR(FGBG, "6", BOLD),\
- COLOR(FGBG, "7", BOLD)\
+#define ALLCOLORS(FGBG, BRIGHT, BOLD) \
+ { \
+ COLOR(FGBG, "0", BOLD), \
+ COLOR(FGBG, "1", BOLD), \
+ COLOR(FGBG, "2", BOLD), \
+ COLOR(FGBG, "3", BOLD), \
+ COLOR(FGBG, "4", BOLD), \
+ COLOR(FGBG, "5", BOLD), \
+ COLOR(FGBG, "6", BOLD), \
+ COLOR(FGBG, "7", BOLD), \
+ COLOR(BRIGHT, "0", BOLD), \
+ COLOR(BRIGHT, "1", BOLD), \
+ COLOR(BRIGHT, "2", BOLD), \
+ COLOR(BRIGHT, "3", BOLD), \
+ COLOR(BRIGHT, "4", BOLD), \
+ COLOR(BRIGHT, "5", BOLD), \
+ COLOR(BRIGHT, "6", BOLD), \
+ COLOR(BRIGHT, "7", BOLD), \
}
-static const char colorcodes[2][2][8][10] = {
- { ALLCOLORS("3",""), ALLCOLORS("3","1;") },
- { ALLCOLORS("4",""), ALLCOLORS("4","1;") }
+// bg
+// | bold
+// | |
+// | | codes
+// | | |
+// | | |
+static const char colorcodes[2][2][16][11] = {
+ { ALLCOLORS("3", "9", ""), ALLCOLORS("3", "9", "1;"),},
+ { ALLCOLORS("4", "10", ""), ALLCOLORS("4", "10", "1;")}
};
+// clang-format on
// A CMake option controls wheter we emit core dumps by default. An application
// may disable core dumps by calling Process::PreventCoreFiles().