diff options
author | Mehdi Amini <joker.eph@gmail.com> | 2021-07-16 07:34:41 +0000 |
---|---|---|
committer | Mehdi Amini <joker.eph@gmail.com> | 2021-07-16 07:35:13 +0000 |
commit | 8d051d854619956de633047409149cdab1e3319a (patch) | |
tree | e51ddd9e2fdb3237526b74ab09484bec6b4ca44a /llvm/lib/Support/GraphWriter.cpp | |
parent | 3d3dc9523f9b2ec9d83d37bd8a757726f37b6ee5 (diff) | |
download | llvm-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.cpp | 20 |
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); |