LLVM  9.0.0svn
Options.cpp
Go to the documentation of this file.
1 //===- llvm/Support/Options.cpp - Debug options support ---------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file implements the helper objects for defining debug options using the
10 // new API built on cl::opt, but not requiring the use of static globals.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #include "llvm/Support/Options.h"
16 
17 using namespace llvm;
18 
20  for (auto IT = Options.begin(); IT != Options.end(); ++IT)
21  delete IT->second;
22 }
23 
24 void OptionRegistry::addOption(void *Key, cl::Option *O) {
25  assert(Options.find(Key) == Options.end() &&
26  "Argument with this key already registerd");
27  Options.insert(std::make_pair(Key, O));
28 }
29 
31 
This class represents lattice values for constants.
Definition: AllocatorList.h:23
Key
PAL metadata keys.
static OptionRegistry & instance()
Returns a reference to the singleton instance.
Definition: Options.cpp:32
static ManagedStatic< OptionRegistry > OR
Definition: Options.cpp:30
Singleton class used to register debug options.
Definition: Options.h:64
This file declares helper objects for defining debug options that can be configured via the command l...
static cl::opt< ITMode > IT(cl::desc("IT block support"), cl::Hidden, cl::init(DefaultIT), cl::ZeroOrMore, cl::values(clEnumValN(DefaultIT, "arm-default-it", "Generate IT block based on arch"), clEnumValN(RestrictedIT, "arm-restrict-it", "Disallow deprecated IT based on ARMv8"), clEnumValN(NoRestrictedIT, "arm-no-restrict-it", "Allow IT blocks based on ARMv7")))
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
ManagedStatic - This transparently changes the behavior of global statics to be lazily constructed on...
Definition: ManagedStatic.h:79