From 5fdd6c8793462549e3593890ec61573da06e3346 Mon Sep 17 00:00:00 2001 From: Jay Foad Date: Tue, 12 Jul 2011 14:06:48 +0000 Subject: Second attempt at de-constifying LLVM Types in FunctionType::get(), StructType::get() and TargetData::getIntPtrType(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134982 91177308-0d34-0410-b5e6-96231b3b80d8 --- unittests/Analysis/ScalarEvolutionTest.cpp | 2 +- unittests/ExecutionEngine/JIT/JITMemoryManagerTest.cpp | 2 +- unittests/ExecutionEngine/JIT/JITTest.cpp | 4 ++-- unittests/Support/TypeBuilderTest.cpp | 6 +++--- unittests/VMCore/PassManagerTest.cpp | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) (limited to 'unittests') 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(), false); + std::vector(), false); Function *F = cast(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 params; + std::vector 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 params; + std::vector 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(TypeBuilder::get(Context)); - std::vector arg_types; + std::vector 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..06091784cf 100644 --- a/unittests/Support/TypeBuilderTest.cpp +++ b/unittests/Support/TypeBuilderTest.cpp @@ -120,7 +120,7 @@ TEST(TypeBuilderTest, Derived) { } TEST(TypeBuilderTest, Functions) { - std::vector params; + std::vector params; EXPECT_EQ(FunctionType::get(Type::getVoidTy(getGlobalContext()), params, false), (TypeBuilder::get(getGlobalContext()))); EXPECT_EQ(FunctionType::get(Type::getInt8Ty(getGlobalContext()), params, true), @@ -187,7 +187,7 @@ public: static const StructType *get(LLVMContext &Context) { // Using the static result variable ensures that the type is // only looked up once. - std::vector st; + std::vector st; st.push_back(TypeBuilder::get(Context)); st.push_back(TypeBuilder::get(Context)); st.push_back(TypeBuilder::get(Context)); @@ -210,7 +210,7 @@ public: static const StructType *get(LLVMContext &Context) { // Using the static result variable ensures that the type is // only looked up once. - std::vector st; + std::vector st; st.push_back(TypeBuilder, cross>::get(Context)); st.push_back(TypeBuilder*, cross>::get(Context)); st.push_back(TypeBuilder*[], cross>::get(Context)); 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::vectorFuncTy_0_args; + std::vectorFuncTy_0_args; FunctionType* FuncTy_0 = FunctionType::get( /*Result=*/IntegerType::get(getGlobalContext(), 32), /*Params=*/FuncTy_0_args, /*isVarArg=*/false); - std::vectorFuncTy_2_args; + std::vectorFuncTy_2_args; FuncTy_2_args.push_back(IntegerType::get(getGlobalContext(), 1)); FunctionType* FuncTy_2 = FunctionType::get( /*Result=*/Type::getVoidTy(getGlobalContext()), -- cgit v1.2.3