[llvm-commits] [llvm] r149867 - /llvm/trunk/examples/ExceptionDemo/ExceptionDemo.cpp
Peter Collingbourne
peter at pcc.me.uk
Mon Feb 6 06:09:13 PST 2012
Author: pcc
Date: Mon Feb 6 08:09:13 2012
New Revision: 149867
URL: http://llvm.org/viewvc/llvm-project?rev=149867&view=rev
Log:
Update ExceptionDemo to use ConstantDataArray.
Modified:
llvm/trunk/examples/ExceptionDemo/ExceptionDemo.cpp
Modified: llvm/trunk/examples/ExceptionDemo/ExceptionDemo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/ExceptionDemo/ExceptionDemo.cpp?rev=149867&r1=149866&r2=149867&view=diff
==============================================================================
--- llvm/trunk/examples/ExceptionDemo/ExceptionDemo.cpp (original)
+++ llvm/trunk/examples/ExceptionDemo/ExceptionDemo.cpp Mon Feb 6 08:09:13 2012
@@ -878,7 +878,7 @@
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 @@
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) {
More information about the llvm-commits
mailing list