mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
Update ExceptionDemo to use ConstantDataArray.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149867 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
699ddcbcb3
commit
793a32dfb6
@ -878,7 +878,7 @@ void generateStringPrint(llvm::LLVMContext &context,
|
|||||||
|
|
||||||
llvm::Value *stringVar;
|
llvm::Value *stringVar;
|
||||||
llvm::Constant *stringConstant =
|
llvm::Constant *stringConstant =
|
||||||
llvm::ConstantArray::get(context, toPrint);
|
llvm::ConstantDataArray::getString(context, toPrint);
|
||||||
|
|
||||||
if (useGlobal) {
|
if (useGlobal) {
|
||||||
// Note: Does not work without allocation
|
// Note: Does not work without allocation
|
||||||
@ -920,7 +920,8 @@ void generateIntegerPrint(llvm::LLVMContext &context,
|
|||||||
llvm::Value &toPrint,
|
llvm::Value &toPrint,
|
||||||
std::string format,
|
std::string format,
|
||||||
bool useGlobal = true) {
|
bool useGlobal = true) {
|
||||||
llvm::Constant *stringConstant = llvm::ConstantArray::get(context, format);
|
llvm::Constant *stringConstant =
|
||||||
|
llvm::ConstantDataArray::getString(context, format);
|
||||||
llvm::Value *stringVar;
|
llvm::Value *stringVar;
|
||||||
|
|
||||||
if (useGlobal) {
|
if (useGlobal) {
|
||||||
|
Loading…
Reference in New Issue
Block a user