aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2012-02-06 14:09:13 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2012-02-06 14:09:13 +0000
commit793a32dfb643c2804b79d7d675cc614659debae7 (patch)
tree03addd645baf35e5656cd74b3bdb753385a5a651
parent699ddcbcb32e933f5a2a63c41c80832da91942ad (diff)
Update ExceptionDemo to use ConstantDataArray.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149867 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--examples/ExceptionDemo/ExceptionDemo.cpp5
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) {