summaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorJay Foad <jay.foad@gmail.com>2011-07-11 07:56:41 +0000
committerJay Foad <jay.foad@gmail.com>2011-07-11 07:56:41 +0000
commitf362affa3a695164a94d275fb44d18f44ebb855a (patch)
treec07a3ce28c975fcda45c377276692e508f0dc79a /unittests
parent7f0ce349187e6526ed2d92fe7d2757f84f73ce04 (diff)
downloadllvm-f362affa3a695164a94d275fb44d18f44ebb855a.tar.gz
llvm-f362affa3a695164a94d275fb44d18f44ebb855a.tar.bz2
llvm-f362affa3a695164a94d275fb44d18f44ebb855a.tar.xz
De-constify Types in FunctionType::get().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134888 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/Analysis/ScalarEvolutionTest.cpp2
-rw-r--r--unittests/ExecutionEngine/JIT/JITMemoryManagerTest.cpp2
-rw-r--r--unittests/ExecutionEngine/JIT/JITTest.cpp4
-rw-r--r--unittests/Support/TypeBuilderTest.cpp2
-rw-r--r--unittests/VMCore/PassManagerTest.cpp4
5 files changed, 7 insertions, 7 deletions
diff --git a/unittests/Analysis/ScalarEvolutionTest.cpp b/unittests/Analysis/ScalarEvolutionTest.cpp
index b7341603cf..39ced2a16e 100644
--- a/unittests/Analysis/ScalarEvolutionTest.cpp
+++ b/unittests/Analysis/ScalarEvolutionTest.cpp
@@ -23,7 +23,7 @@ TEST(ScalarEvolutionsTest, SCEVUnknownRAUW) {
Module M("world", Context);
const FunctionType *FTy = FunctionType::get(Type::getVoidTy(Context),
- std::vector<const Type *>(), false);
+ std::vector<Type *>(), false);
Function *F = cast<Function>(M.getOrInsertFunction("f", FTy));
BasicBlock *BB = BasicBlock::Create(Context, "entry", F);
ReturnInst::Create(Context, 0, BB);
diff --git a/unittests/ExecutionEngine/JIT/JITMemoryManagerTest.cpp b/unittests/ExecutionEngine/JIT/JITMemoryManagerTest.cpp
index 0bc1966781..039b5e00f2 100644
--- a/unittests/ExecutionEngine/JIT/JITMemoryManagerTest.cpp
+++ b/unittests/ExecutionEngine/JIT/JITMemoryManagerTest.cpp
@@ -21,7 +21,7 @@ using namespace llvm;
namespace {
Function *makeFakeFunction() {
- std::vector<const Type*> params;
+ std::vector<Type*> params;
const FunctionType *FTy =
FunctionType::get(Type::getVoidTy(getGlobalContext()), params, false);
return Function::Create(FTy, GlobalValue::ExternalLinkage);
diff --git a/unittests/ExecutionEngine/JIT/JITTest.cpp b/unittests/ExecutionEngine/JIT/JITTest.cpp
index ceacbbe62a..9c001c423f 100644
--- a/unittests/ExecutionEngine/JIT/JITTest.cpp
+++ b/unittests/ExecutionEngine/JIT/JITTest.cpp
@@ -37,7 +37,7 @@ using namespace llvm;
namespace {
Function *makeReturnGlobal(std::string Name, GlobalVariable *G, Module *M) {
- std::vector<const Type*> params;
+ std::vector<Type*> params;
const FunctionType *FTy = FunctionType::get(G->getType()->getElementType(),
params, false);
Function *F = Function::Create(FTy, GlobalValue::ExternalLinkage, Name, M);
@@ -322,7 +322,7 @@ TEST_F(JITTest, NonLazyCompilationStillNeedsStubs) {
const FunctionType *Func1Ty =
cast<FunctionType>(TypeBuilder<void(void), false>::get(Context));
- std::vector<const Type*> arg_types;
+ std::vector<Type*> arg_types;
arg_types.push_back(Type::getInt1Ty(Context));
const FunctionType *FuncTy = FunctionType::get(
Type::getVoidTy(Context), arg_types, false);
diff --git a/unittests/Support/TypeBuilderTest.cpp b/unittests/Support/TypeBuilderTest.cpp
index bd19c651ec..52b51b3875 100644
--- a/unittests/Support/TypeBuilderTest.cpp
+++ b/unittests/Support/TypeBuilderTest.cpp
@@ -120,7 +120,7 @@ TEST(TypeBuilderTest, Derived) {
}
TEST(TypeBuilderTest, Functions) {
- std::vector<const Type*> params;
+ std::vector<Type*> params;
EXPECT_EQ(FunctionType::get(Type::getVoidTy(getGlobalContext()), params, false),
(TypeBuilder<void(), true>::get(getGlobalContext())));
EXPECT_EQ(FunctionType::get(Type::getInt8Ty(getGlobalContext()), params, true),
diff --git a/unittests/VMCore/PassManagerTest.cpp b/unittests/VMCore/PassManagerTest.cpp
index 2f2a200e1d..af845b0ca4 100644
--- a/unittests/VMCore/PassManagerTest.cpp
+++ b/unittests/VMCore/PassManagerTest.cpp
@@ -405,13 +405,13 @@ namespace llvm {
mod->setTargetTriple("x86_64-unknown-linux-gnu");
// Type Definitions
- std::vector<const Type*>FuncTy_0_args;
+ std::vector<Type*>FuncTy_0_args;
FunctionType* FuncTy_0 = FunctionType::get(
/*Result=*/IntegerType::get(getGlobalContext(), 32),
/*Params=*/FuncTy_0_args,
/*isVarArg=*/false);
- std::vector<const Type*>FuncTy_2_args;
+ std::vector<Type*>FuncTy_2_args;
FuncTy_2_args.push_back(IntegerType::get(getGlobalContext(), 1));
FunctionType* FuncTy_2 = FunctionType::get(
/*Result=*/Type::getVoidTy(getGlobalContext()),