summaryrefslogtreecommitdiffstats
path: root/llvm/unittests
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests')
-rw-r--r--llvm/unittests/IR/ConstantsTest.cpp3
-rw-r--r--llvm/unittests/IR/VerifierTest.cpp3
-rw-r--r--llvm/unittests/Transforms/Utils/SpecialCaseList.cpp4
3 files changed, 3 insertions, 7 deletions
diff --git a/llvm/unittests/IR/ConstantsTest.cpp b/llvm/unittests/IR/ConstantsTest.cpp
index b225ba923b6..abab1220229 100644
--- a/llvm/unittests/IR/ConstantsTest.cpp
+++ b/llvm/unittests/IR/ConstantsTest.cpp
@@ -274,8 +274,7 @@ TEST(ConstantsTest, ReplaceInAliasTest) {
Type *Int32Ty = Type::getInt32Ty(getGlobalContext());
auto *Global = cast<GlobalObject>(M->getOrInsertGlobal("dummy", Int32Ty));
- auto *GA = new GlobalAlias(Int32Ty, GlobalValue::ExternalLinkage, "alias",
- Global, M.get());
+ auto *GA = new GlobalAlias(GlobalValue::ExternalLinkage, "alias", Global);
EXPECT_DEATH(Global->replaceAllUsesWith(GA),
"replaceAliasUseWith cannot form an alias cycle");
}
diff --git a/llvm/unittests/IR/VerifierTest.cpp b/llvm/unittests/IR/VerifierTest.cpp
index 92f25b3e37a..3499bc315ef 100644
--- a/llvm/unittests/IR/VerifierTest.cpp
+++ b/llvm/unittests/IR/VerifierTest.cpp
@@ -52,8 +52,7 @@ TEST(VerifierTest, AliasUnnamedAddr) {
GlobalVariable *Aliasee = new GlobalVariable(M, Ty, true,
GlobalValue::ExternalLinkage,
Init, "foo");
- auto *GA =
- new GlobalAlias(Ty, GlobalValue::ExternalLinkage, "bar", Aliasee, &M);
+ auto *GA = new GlobalAlias(GlobalValue::ExternalLinkage, "bar", Aliasee);
GA->setUnnamedAddr(true);
std::string Error;
raw_string_ostream ErrorOS(Error);
diff --git a/llvm/unittests/Transforms/Utils/SpecialCaseList.cpp b/llvm/unittests/Transforms/Utils/SpecialCaseList.cpp
index ea8fb3962be..190167d0c12 100644
--- a/llvm/unittests/Transforms/Utils/SpecialCaseList.cpp
+++ b/llvm/unittests/Transforms/Utils/SpecialCaseList.cpp
@@ -35,9 +35,7 @@ protected:
}
GlobalAlias *makeAlias(StringRef Name, GlobalObject *Aliasee) {
- return new GlobalAlias(Aliasee->getType()->getElementType(),
- GlobalValue::ExternalLinkage, Name, Aliasee,
- Aliasee->getParent());
+ return new GlobalAlias(GlobalValue::ExternalLinkage, Name, Aliasee);
}
SpecialCaseList *makeSpecialCaseList(StringRef List, std::string &Error) {
OpenPOWER on IntegriCloud