From bf50a41a769f764c5b30c5854d71da0965869c74 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Tue, 13 Feb 2007 02:45:57 +0000 Subject: Update for recent interface changes in GEP constructor. llvm-svn: 34220 --- stacker/lib/compiler/StackerCompiler.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'stacker') diff --git a/stacker/lib/compiler/StackerCompiler.cpp b/stacker/lib/compiler/StackerCompiler.cpp index 807269fa91c..85559050da6 100644 --- a/stacker/lib/compiler/StackerCompiler.cpp +++ b/stacker/lib/compiler/StackerCompiler.cpp @@ -427,7 +427,8 @@ StackerCompiler::get_stack_pointer( BasicBlock* bb, Value* index = 0 ) } // Get the address of the indexed stack element - GetElementPtrInst* gep = new GetElementPtrInst( TheStack, indexVec ); + GetElementPtrInst* gep = new GetElementPtrInst(TheStack, &indexVec[0], + indexVec.size() ); bb->getInstList().push_back( gep ); // Put GEP in Block return gep; @@ -1518,7 +1519,8 @@ StackerCompiler::handle_word( int tkn ) // Get address of op1'th element of the string std::vector indexVec; indexVec.push_back( chr_idx ); - GetElementPtrInst* gep = new GetElementPtrInst( ptr, indexVec ); + GetElementPtrInst* gep = new GetElementPtrInst( ptr, &indexVec[0], + indexVec.size() ); bb->getInstList().push_back( gep ); // Get the value and push it @@ -1550,7 +1552,8 @@ StackerCompiler::handle_word( int tkn ) // Get address of op2'th element of the string std::vector indexVec; indexVec.push_back( chr_idx ); - GetElementPtrInst* gep = new GetElementPtrInst( ptr, indexVec ); + GetElementPtrInst* gep = new GetElementPtrInst( ptr, &indexVec[0], + indexVec.size()); bb->getInstList().push_back( gep ); // Cast the value and put it @@ -1600,7 +1603,7 @@ StackerCompiler::handle_word( int tkn ) indexVec.push_back( Zero ); indexVec.push_back( Zero ); GetElementPtrInst* format_gep = - new GetElementPtrInst( ChrFormat, indexVec ); + new GetElementPtrInst( ChrFormat, &indexVec[0], indexVec.size() ); bb->getInstList().push_back( format_gep ); // Get the character to print (a tab) @@ -1622,7 +1625,7 @@ StackerCompiler::handle_word( int tkn ) indexVec.push_back( Zero ); indexVec.push_back( Zero ); GetElementPtrInst* format_gep = - new GetElementPtrInst( ChrFormat, indexVec ); + new GetElementPtrInst( ChrFormat, &indexVec[0], indexVec.size() ); bb->getInstList().push_back( format_gep ); // Get the character to print (a space) @@ -1644,7 +1647,7 @@ StackerCompiler::handle_word( int tkn ) indexVec.push_back( Zero ); indexVec.push_back( Zero ); GetElementPtrInst* format_gep = - new GetElementPtrInst( ChrFormat, indexVec ); + new GetElementPtrInst( ChrFormat, &indexVec[0], indexVec.size() ); bb->getInstList().push_back( format_gep ); // Get the character to print (a newline) @@ -1742,7 +1745,7 @@ StackerCompiler::handle_word( int tkn ) indexVec.push_back( Zero ); indexVec.push_back( Zero ); GetElementPtrInst* format_gep = - new GetElementPtrInst( StrFormat, indexVec ); + new GetElementPtrInst( StrFormat, &indexVec[0], indexVec.size() ); bb->getInstList().push_back( format_gep ); // Build function call arguments std::vector args; @@ -1763,7 +1766,7 @@ StackerCompiler::handle_word( int tkn ) indexVec.push_back( Zero ); indexVec.push_back( Zero ); GetElementPtrInst* format_gep = - new GetElementPtrInst( NumFormat, indexVec ); + new GetElementPtrInst( NumFormat, &indexVec[0], indexVec.size() ); bb->getInstList().push_back( format_gep ); // Build function call arguments @@ -1786,7 +1789,7 @@ StackerCompiler::handle_word( int tkn ) indexVec.push_back( Zero ); indexVec.push_back( Zero ); GetElementPtrInst* format_gep = - new GetElementPtrInst( ChrFormat, indexVec ); + new GetElementPtrInst( ChrFormat, &indexVec[0], indexVec.size() ); bb->getInstList().push_back( format_gep ); // Build function call arguments -- cgit v1.2.3