aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/GraphWriter.cpp
diff options
context:
space:
mode:
authorMehdi Amini <joker.eph@gmail.com>2021-07-16 03:46:22 +0000
committerMehdi Amini <joker.eph@gmail.com>2021-07-16 03:46:53 +0000
commit16b5e9d6a269913e8da0fa037e8af32eaf304c8f (patch)
tree2029314f1156239954ae10c5eb6748a303fdfc14 /llvm/lib/Support/GraphWriter.cpp
parent42f588f39c5ce6f521e3709b8871d1fdd076292f (diff)
downloadllvm-16b5e9d6a269913e8da0fa037e8af32eaf304c8f.zip
llvm-16b5e9d6a269913e8da0fa037e8af32eaf304c8f.tar.gz
llvm-16b5e9d6a269913e8da0fa037e8af32eaf304c8f.tar.bz2
Revert "Use ManagedStatic and lazy initialization of cl::opt in libSupport to make it free of global initializer"
This reverts commit 42f588f39c5ce6f521e3709b8871d1fdd076292f. Broke some buildbots
Diffstat (limited to 'llvm/lib/Support/GraphWriter.cpp')
-rw-r--r--llvm/lib/Support/GraphWriter.cpp20
1 files changed, 2 insertions, 18 deletions
diff --git a/llvm/lib/Support/GraphWriter.cpp b/llvm/lib/Support/GraphWriter.cpp
index 240f597..f47a52a 100644
--- a/llvm/lib/Support/GraphWriter.cpp
+++ b/llvm/lib/Support/GraphWriter.cpp
@@ -11,9 +11,6 @@
//===----------------------------------------------------------------------===//
#include "llvm/Support/GraphWriter.h"
-
-#include "DebugOptions.h"
-
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
@@ -32,21 +29,8 @@
using namespace llvm;
-#ifdef __APPLE__
-namespace {
-struct CreateViewBackground {
- static void *call() {
- return new cl::opt<bool>("view-background", cl::Hidden,
- cl::desc("Execute graph viewer in the background. "
- "Creates tmp file litter."));
- }
-};
-} // namespace
-static ManagedStatic<cl::opt<bool>, CreateViewBackground> ViewBackground;
-void llvm::initGraphWriterOptions() { *ViewBackground; }
-#else
-void llvm::initGraphWriterOptions() {}
-#endif
+static cl::opt<bool> ViewBackground("view-background", cl::Hidden,
+ cl::desc("Execute graph viewer in the background. Creates tmp file litter."));
std::string llvm::DOT::EscapeString(const std::string &Label) {
std::string Str(Label);