diff options
Diffstat (limited to 'examples/ExceptionDemo/ExceptionDemo.cpp')
-rw-r--r-- | examples/ExceptionDemo/ExceptionDemo.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/ExceptionDemo/ExceptionDemo.cpp b/examples/ExceptionDemo/ExceptionDemo.cpp index c2e012c32a..cf078bb3f5 100644 --- a/examples/ExceptionDemo/ExceptionDemo.cpp +++ b/examples/ExceptionDemo/ExceptionDemo.cpp @@ -878,7 +878,7 @@ void generateStringPrint(llvm::LLVMContext &context, llvm::Value *stringVar; llvm::Constant *stringConstant = - llvm::ConstantArray::get(context, toPrint); + llvm::ConstantDataArray::getString(context, toPrint); if (useGlobal) { // Note: Does not work without allocation @@ -920,7 +920,8 @@ void generateIntegerPrint(llvm::LLVMContext &context, llvm::Value &toPrint, std::string format, bool useGlobal = true) { - llvm::Constant *stringConstant = llvm::ConstantArray::get(context, format); + llvm::Constant *stringConstant = + llvm::ConstantDataArray::getString(context, format); llvm::Value *stringVar; if (useGlobal) { |