diff options
Diffstat (limited to 'unittests')
-rw-r--r-- | unittests/IR/ConstantsTest.cpp | 2 | ||||
-rw-r--r-- | unittests/IR/VerifierTest.cpp | 2 | ||||
-rw-r--r-- | unittests/Transforms/Utils/SpecialCaseList.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/unittests/IR/ConstantsTest.cpp b/unittests/IR/ConstantsTest.cpp index abab122022..c11729c08f 100644 --- a/unittests/IR/ConstantsTest.cpp +++ b/unittests/IR/ConstantsTest.cpp @@ -274,7 +274,7 @@ TEST(ConstantsTest, ReplaceInAliasTest) { Type *Int32Ty = Type::getInt32Ty(getGlobalContext()); auto *Global = cast<GlobalObject>(M->getOrInsertGlobal("dummy", Int32Ty)); - auto *GA = new GlobalAlias(GlobalValue::ExternalLinkage, "alias", Global); + auto *GA = GlobalAlias::create(GlobalValue::ExternalLinkage, "alias", Global); EXPECT_DEATH(Global->replaceAllUsesWith(GA), "replaceAliasUseWith cannot form an alias cycle"); } diff --git a/unittests/IR/VerifierTest.cpp b/unittests/IR/VerifierTest.cpp index 3499bc315e..252bdd333c 100644 --- a/unittests/IR/VerifierTest.cpp +++ b/unittests/IR/VerifierTest.cpp @@ -52,7 +52,7 @@ TEST(VerifierTest, AliasUnnamedAddr) { GlobalVariable *Aliasee = new GlobalVariable(M, Ty, true, GlobalValue::ExternalLinkage, Init, "foo"); - auto *GA = new GlobalAlias(GlobalValue::ExternalLinkage, "bar", Aliasee); + auto *GA = GlobalAlias::create(GlobalValue::ExternalLinkage, "bar", Aliasee); GA->setUnnamedAddr(true); std::string Error; raw_string_ostream ErrorOS(Error); diff --git a/unittests/Transforms/Utils/SpecialCaseList.cpp b/unittests/Transforms/Utils/SpecialCaseList.cpp index 190167d0c1..fd00687f89 100644 --- a/unittests/Transforms/Utils/SpecialCaseList.cpp +++ b/unittests/Transforms/Utils/SpecialCaseList.cpp @@ -35,7 +35,7 @@ protected: } GlobalAlias *makeAlias(StringRef Name, GlobalObject *Aliasee) { - return new GlobalAlias(GlobalValue::ExternalLinkage, Name, Aliasee); + return GlobalAlias::create(GlobalValue::ExternalLinkage, Name, Aliasee); } SpecialCaseList *makeSpecialCaseList(StringRef List, std::string &Error) { |