From 793a32dfb643c2804b79d7d675cc614659debae7 Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Mon, 6 Feb 2012 14:09:13 +0000 Subject: [PATCH] Update ExceptionDemo to use ConstantDataArray. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149867 91177308-0d34-0410-b5e6-96231b3b80d8 --- examples/ExceptionDemo/ExceptionDemo.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/ExceptionDemo/ExceptionDemo.cpp b/examples/ExceptionDemo/ExceptionDemo.cpp index c2e012c32a2..cf078bb3f54 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) {