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/unittests/Support/CommandLineTest.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/unittests/Support/CommandLineTest.cpp')
-rw-r--r-- | llvm/unittests/Support/CommandLineTest.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/llvm/unittests/Support/CommandLineTest.cpp b/llvm/unittests/Support/CommandLineTest.cpp index a0352bc..7d88046 100644 --- a/llvm/unittests/Support/CommandLineTest.cpp +++ b/llvm/unittests/Support/CommandLineTest.cpp @@ -110,7 +110,7 @@ TEST(CommandLineTest, ModifyExisitingOption) { ASSERT_NE(Retrieved->Categories.end(), find_if(Retrieved->Categories, [&](const llvm::cl::OptionCategory *Cat) { - return Cat == &cl::getGeneralCategory(); + return Cat == &cl::GeneralCategory; })) << "Incorrect default option category."; @@ -152,10 +152,10 @@ TEST(CommandLineTest, UseOptionCategory) { TEST(CommandLineTest, UseMultipleCategories) { StackOption<int> TestOption2("test-option2", cl::cat(TestCategory), - cl::cat(cl::getGeneralCategory()), - cl::cat(cl::getGeneralCategory())); + cl::cat(cl::GeneralCategory), + cl::cat(cl::GeneralCategory)); - // Make sure cl::getGeneralCategory() wasn't added twice. + // Make sure cl::GeneralCategory wasn't added twice. ASSERT_EQ(TestOption2.Categories.size(), 2U); ASSERT_NE(TestOption2.Categories.end(), @@ -166,9 +166,9 @@ TEST(CommandLineTest, UseMultipleCategories) { << "Failed to assign Option Category."; ASSERT_NE(TestOption2.Categories.end(), find_if(TestOption2.Categories, - [&](const llvm::cl::OptionCategory *Cat) { - return Cat == &cl::getGeneralCategory(); - })) + [&](const llvm::cl::OptionCategory *Cat) { + return Cat == &cl::GeneralCategory; + })) << "Failed to assign General Category."; cl::OptionCategory AnotherCategory("Additional test Options", "Description"); @@ -176,9 +176,9 @@ TEST(CommandLineTest, UseMultipleCategories) { cl::cat(AnotherCategory)); ASSERT_EQ(TestOption.Categories.end(), find_if(TestOption.Categories, - [&](const llvm::cl::OptionCategory *Cat) { - return Cat == &cl::getGeneralCategory(); - })) + [&](const llvm::cl::OptionCategory *Cat) { + return Cat == &cl::GeneralCategory; + })) << "Failed to remove General Category."; ASSERT_NE(TestOption.Categories.end(), find_if(TestOption.Categories, |