summaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-05-17 21:29:57 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-05-17 21:29:57 +0000
commitc86235f4eb3ee71272aed492d3faa18360d54bbc (patch)
tree457375892b6c914a95ac0dc0d8bd5442b484e869 /unittests
parente7a6c2f1dfca147cdedb9683f7193882b548753d (diff)
downloadllvm-c86235f4eb3ee71272aed492d3faa18360d54bbc.tar.gz
llvm-c86235f4eb3ee71272aed492d3faa18360d54bbc.tar.bz2
llvm-c86235f4eb3ee71272aed492d3faa18360d54bbc.tar.xz
Use create methods since msvc doesn't handle delegating constructors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209076 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/IR/ConstantsTest.cpp2
-rw-r--r--unittests/IR/VerifierTest.cpp2
-rw-r--r--unittests/Transforms/Utils/SpecialCaseList.cpp2
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) {