Arnamoy Bhattacharyya
2012-Sep-05 08:13 UTC
[LLVMdev] llvm::ConstantArray::get(llvm::LLVMContext&, llvm::StringRef, bool) deprecated?
Hi all; I have been trying to use the llvm::ConstantArray::get(llvm::LLVMContext&, llvm::StringRef, bool) function but seems it has been deprecated. ProfileDependence.cpp:68:73: error: no matching function for call to ‘llvm::ConstantArray::get(llvm::LLVMContext&, llvm::StringRef, bool)’ ProfileDependence.cpp:68:73: note: candidate is: /home/arnie/llvm-clang/llvm/include/llvm/Constants.h:354:20: note: static llvm::Constant* llvm::ConstantArray::get(llvm::ArrayType*, llvm::ArrayRef<llvm::Constant*>) Could anyone tell me how to give a value (lets say "hello world") to the Array Constant using currently available get method? Previously llvm::ConstantArray::get(getGlobalContext(), "hello world", true) should have worked. Thank you; -- Arnamoy Bhattacharyya Athabasca Hall 143 Department of Computing Science - University of Alberta Edmonton, Alberta, Canada, T6G 2E8 587-710-7073 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120905/1bfb4bec/attachment.html>
Duncan Sands
2012-Sep-05 08:24 UTC
[LLVMdev] llvm::ConstantArray::get(llvm::LLVMContext&, llvm::StringRef, bool) deprecated?
Hi Arnamoy,> I have been trying to use the llvm::ConstantArray::get(llvm::LLVMContext&, > llvm::StringRef, bool) function but seems it has been deprecated.maybe you are looking for ConstantDataArray::getString? Ciao, Duncan.> > ProfileDependence.cpp:68:73: error: no matching function for call to > ‘llvm::ConstantArray::get(llvm::LLVMContext&, llvm::StringRef, bool)’ > ProfileDependence.cpp:68:73: note: candidate is: > /home/arnie/llvm-clang/llvm/include/llvm/Constants.h:354:20: note: static > llvm::Constant* llvm::ConstantArray::get(llvm::ArrayType*, > llvm::ArrayRef<llvm::Constant*>) > > Could anyone tell me how to give a value (lets say "hello world") to the Array > Constant using currently available get method? > > Previously llvm::ConstantArray::get(getGlobalContext(), "hello world", true) > should have worked. > > Thank you; > > -- > Arnamoy Bhattacharyya > Athabasca Hall 143 > Department of Computing Science - University of Alberta > Edmonton, Alberta, Canada, T6G 2E8 > 587-710-7073 > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
Eli Friedman
2012-Sep-05 08:25 UTC
[LLVMdev] llvm::ConstantArray::get(llvm::LLVMContext&, llvm::StringRef, bool) deprecated?
On Wed, Sep 5, 2012 at 1:13 AM, Arnamoy Bhattacharyya <arnamoy at ualberta.ca> wrote:> Hi all; > > I have been trying to use the llvm::ConstantArray::get(llvm::LLVMContext&, > llvm::StringRef, bool) function but seems it has been deprecated. > > ProfileDependence.cpp:68:73: error: no matching function for call to > ‘llvm::ConstantArray::get(llvm::LLVMContext&, llvm::StringRef, bool)’ > ProfileDependence.cpp:68:73: note: candidate is: > /home/arnie/llvm-clang/llvm/include/llvm/Constants.h:354:20: note: static > llvm::Constant* llvm::ConstantArray::get(llvm::ArrayType*, > llvm::ArrayRef<llvm::Constant*>) > > Could anyone tell me how to give a value (lets say "hello world") to the > Array Constant using currently available get method?ConstantDataArray::getString. -Eli
Seemingly Similar Threads
- [LLVMdev] Calling a function with a pointer to a global char array as argument
- [LLVMdev] "symbol lookup error" while running a Simple Loop Pass
- [LLVMdev] Error While Inserting New Instruction to LLVM IR
- [LLVMdev] "symbol lookup error" while running a Simple Loop Pass
- [LLVMdev] "symbol lookup error" while running a Simple Loop Pass