summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/CommandLine.cpp
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2019-04-04 18:45:05 +0000
committerReid Kleckner <rnk@google.com>2019-04-04 18:45:05 +0000
commit4312fee0a9fb5b2bfe4a52766a4abdd35f23c018 (patch)
treedca1a48ea7711c3fb08d54869706177f11832320 /llvm/lib/Support/CommandLine.cpp
parent09137be7f8f604b28fc122e14631b133f3ec4ef0 (diff)
downloadbcm5719-llvm-4312fee0a9fb5b2bfe4a52766a4abdd35f23c018.tar.gz
bcm5719-llvm-4312fee0a9fb5b2bfe4a52766a4abdd35f23c018.zip
Appease STLs where std::atomic<void*> lacks a constexpr default ctor
MSVC 2019 casts the pointer to a pointer-sized integer, which is a reinterpret_cast, which is invalid in a constexpr context, so I have to remove the LLVM_REQUIRES_CONSTANT_INITIALIZATION annotation for now. llvm-svn: 357716
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
-rw-r--r--llvm/lib/Support/CommandLine.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp
index d2cfef9f42a..1858fe941ae 100644
--- a/llvm/lib/Support/CommandLine.cpp
+++ b/llvm/lib/Support/CommandLine.cpp
@@ -377,12 +377,10 @@ void OptionCategory::registerCategory() {
// that this ManagedStatic uses constant initailization and not dynamic
// initialization because it is referenced from cl::opt constructors, which run
// dynamically in an arbitrary order.
-LLVM_REQUIRE_CONSTANT_INITIALIZATION ManagedStatic<SubCommand>
- llvm::cl::TopLevelSubCommand;
+ManagedStatic<SubCommand> llvm::cl::TopLevelSubCommand;
// A special subcommand that can be used to put an option into all subcommands.
-LLVM_REQUIRE_CONSTANT_INITIALIZATION ManagedStatic<SubCommand>
- llvm::cl::AllSubCommands;
+ManagedStatic<SubCommand> llvm::cl::AllSubCommands;
void SubCommand::registerSubCommand() {
GlobalParser->registerSubCommand(this);
OpenPOWER on IntegriCloud