aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/GraphWriter.cpp
diff options
context:
space:
mode:
authorMehdi Amini <joker.eph@gmail.com>2021-07-16 07:34:41 +0000
committerMehdi Amini <joker.eph@gmail.com>2021-07-16 07:35:13 +0000
commit8d051d854619956de633047409149cdab1e3319a (patch)
treee51ddd9e2fdb3237526b74ab09484bec6b4ca44a /llvm/lib/Support/GraphWriter.cpp
parent3d3dc9523f9b2ec9d83d37bd8a757726f37b6ee5 (diff)
downloadllvm-8d051d854619956de633047409149cdab1e3319a.zip
llvm-8d051d854619956de633047409149cdab1e3319a.tar.gz
llvm-8d051d854619956de633047409149cdab1e3319a.tar.bz2
Revert "Use ManagedStatic and lazy initialization of cl::opt in libSupport to make it free of global initializer"
This reverts commit af9321739b20becf170e6bb5060b8d780e1dc8dd. Still some specific config broken in some way that requires more investigation.
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);