llvm.org GIT mirror llvm / 793a32d
Update ExceptionDemo to use ConstantDataArray. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149867 91177308-0d34-0410-b5e6-96231b3b80d8 Peter Collingbourne 7 years ago
1 changed file(s) with 3 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
877877
878878 llvm::Value *stringVar;
879879 llvm::Constant *stringConstant =
880 llvm::ConstantArray::get(context, toPrint);
880 llvm::ConstantDataArray::getString(context, toPrint);
881881
882882 if (useGlobal) {
883883 // Note: Does not work without allocation
919919 llvm::Value &toPrint,
920920 std::string format,
921921 bool useGlobal = true) {
922 llvm::Constant *stringConstant = llvm::ConstantArray::get(context, format);
922 llvm::Constant *stringConstant =
923 llvm::ConstantDataArray::getString(context, format);
923924 llvm::Value *stringVar;
924925
925926 if (useGlobal) {