[LLVMdev] llvm::ConstantArray::get(llvm::LLVMContext&, llvm::StringRef, bool) deprecated?

Arnamoy Bhattacharyya arnamoy at ualberta.ca
Wed Sep 5 01:13:11 PDT 2012


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>


More information about the llvm-dev mailing list