diff options
author | Reid Kleckner <rnk@google.com> | 2019-11-14 14:47:11 -0800 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2019-11-15 13:32:52 -0800 |
commit | 631be5c0d41161057d02fe08a7aeb4fbde1a91d6 (patch) | |
tree | 8f387464e273c3dbe10bce5b04aa92883ceec55d /llvm/lib/Support/Options.cpp | |
parent | caf3166d40ffbb0d61b29f423318ce6cfbcf4a9f (diff) | |
download | bcm5719-llvm-631be5c0d41161057d02fe08a7aeb4fbde1a91d6.tar.gz bcm5719-llvm-631be5c0d41161057d02fe08a7aeb4fbde1a91d6.zip |
Remove Support/Options.h, it is unused
It was added in 2014 in 732e0aa9fb84f1 with one use in Scalarizer.cpp.
That one use was then removed when porting to the new pass manager in
2018 in b6f76002d9158628e78.
While the RFC and the desire to get off of static initializers for
cl::opt all still stand, this code is now dead, and I think we should
delete this code until someone is ready to do the migration.
There were many clients of CommandLine.h that were it transitively
through LLVMContext.h, so I cleaned that up in 4c1a1d3cf97e1ede466.
Reviewers: beanz
Differential Revision: https://reviews.llvm.org/D70280
Diffstat (limited to 'llvm/lib/Support/Options.cpp')
-rw-r--r-- | llvm/lib/Support/Options.cpp | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/llvm/lib/Support/Options.cpp b/llvm/lib/Support/Options.cpp deleted file mode 100644 index 770b7381c20..00000000000 --- a/llvm/lib/Support/Options.cpp +++ /dev/null @@ -1,32 +0,0 @@ -//===- llvm/Support/Options.cpp - Debug options support ---------*- C++ -*-===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// -// -// This file implements the helper objects for defining debug options using the -// new API built on cl::opt, but not requiring the use of static globals. -// -//===----------------------------------------------------------------------===// - -#include "llvm/Support/Options.h" -#include "llvm/Support/ManagedStatic.h" - -using namespace llvm; - -OptionRegistry::~OptionRegistry() { - for (auto IT = Options.begin(); IT != Options.end(); ++IT) - delete IT->second; -} - -void OptionRegistry::addOption(void *Key, cl::Option *O) { - assert(Options.find(Key) == Options.end() && - "Argument with this key already registerd"); - Options.insert(std::make_pair(Key, O)); -} - -static ManagedStatic<OptionRegistry> OR; - -OptionRegistry &OptionRegistry::instance() { return *OR; } |