From 371064481a9b15b1f73b7b021ec1c808c6fa5d1f Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 15 Feb 2004 04:05:58 +0000 Subject: [PATCH] Remove dependence on the return type of ConstantArray::get git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11463 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Instrumentation/EmitFunctions.cpp | 2 +- lib/VMCore/Constants.cpp | 2 +- projects/Stacker/lib/compiler/StackerCompiler.cpp | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/Transforms/Instrumentation/EmitFunctions.cpp b/lib/Transforms/Instrumentation/EmitFunctions.cpp index 57254b90800..0025d3e2b60 100644 --- a/lib/Transforms/Instrumentation/EmitFunctions.cpp +++ b/lib/Transforms/Instrumentation/EmitFunctions.cpp @@ -89,7 +89,7 @@ bool EmitFunctionTable::run(Module &M){ cstruct, "llvmFunctionTable"); M.getGlobalList().push_back(gb); - ConstantArray *constArray = ConstantArray::get(ArrayType::get(Type::SByteTy, + Constant *constArray = ConstantArray::get(ArrayType::get(Type::SByteTy, sBCons.size()), sBCons); diff --git a/lib/VMCore/Constants.cpp b/lib/VMCore/Constants.cpp index f86fcc1a23b..280e00520e5 100644 --- a/lib/VMCore/Constants.cpp +++ b/lib/VMCore/Constants.cpp @@ -434,7 +434,7 @@ void ConstantArray::replaceUsesOfWithOnConstant(Value *From, Value *To, Values.push_back(Val); } - ConstantArray *Replacement = ConstantArray::get(getType(), Values); + Constant *Replacement = ConstantArray::get(getType(), Values); assert(Replacement != this && "I didn't contain From!"); // Everyone using this now uses the replacement... diff --git a/projects/Stacker/lib/compiler/StackerCompiler.cpp b/projects/Stacker/lib/compiler/StackerCompiler.cpp index 931796f9a81..11839793891 100644 --- a/projects/Stacker/lib/compiler/StackerCompiler.cpp +++ b/projects/Stacker/lib/compiler/StackerCompiler.cpp @@ -173,7 +173,7 @@ StackerCompiler::compile( TheExit = new Function( exit_type, GlobalValue::ExternalLinkage, "exit", TheModule); - ConstantArray* str_format = ConstantArray::get("%s"); + Constant* str_format = ConstantArray::get("%s"); StrFormat = new GlobalVariable( /*type=*/ArrayType::get( Type::SByteTy, 3 ), /*isConstant=*/true, @@ -183,7 +183,7 @@ StackerCompiler::compile( /*parent=*/TheModule ); - ConstantArray* in_str_format = ConstantArray::get(" %as"); + Constant* in_str_format = ConstantArray::get(" %as"); InStrFormat = new GlobalVariable( /*type=*/ArrayType::get( Type::SByteTy, 5 ), /*isConstant=*/true, @@ -193,7 +193,7 @@ StackerCompiler::compile( /*parent=*/TheModule ); - ConstantArray* num_format = ConstantArray::get("%d"); + Constant* num_format = ConstantArray::get("%d"); NumFormat = new GlobalVariable( /*type=*/ArrayType::get( Type::SByteTy, 3 ), /*isConstant=*/true, @@ -203,7 +203,7 @@ StackerCompiler::compile( /*parent=*/TheModule ); - ConstantArray* in_num_format = ConstantArray::get(" %d"); + Constant* in_num_format = ConstantArray::get(" %d"); InNumFormat = new GlobalVariable( /*type=*/ArrayType::get( Type::SByteTy, 4 ), /*isConstant=*/true, @@ -213,7 +213,7 @@ StackerCompiler::compile( /*parent=*/TheModule ); - ConstantArray* chr_format = ConstantArray::get("%c"); + Constant* chr_format = ConstantArray::get("%c"); ChrFormat = new GlobalVariable( /*type=*/ArrayType::get( Type::SByteTy, 3 ), /*isConstant=*/true, @@ -223,7 +223,7 @@ StackerCompiler::compile( /*parent=*/TheModule ); - ConstantArray* in_chr_format = ConstantArray::get(" %c"); + Constant* in_chr_format = ConstantArray::get(" %c"); InChrFormat = new GlobalVariable( /*type=*/ArrayType::get( Type::SByteTy, 4 ), /*isConstant=*/true, @@ -413,7 +413,7 @@ StackerCompiler::push_string( BasicBlock* bb, const char* value ) ArrayType* char_array = ArrayType::get( Type::SByteTy, len + 1 ); // Create an initializer for the value - ConstantArray* initVal = ConstantArray::get( value ); + Constant* initVal = ConstantArray::get( value ); // Create an internal linkage global variable to hold the constant. GlobalVariable* strconst = new GlobalVariable(