diff options
author | David Robillard <d@drobilla.net> | 2010-12-30 23:28:32 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-12-30 23:28:32 +0000 |
commit | 548c6c5cf2bdc9e61eef5bdf491b3650c1daba11 (patch) | |
tree | 4bceb94e796ae8fc25cab1b253d49f36d1c78194 | |
parent | ce194021127c1e19b03d12445dc6986ca67b51c3 (diff) | |
download | resp-548c6c5cf2bdc9e61eef5bdf491b3650c1daba11.tar.gz resp-548c6c5cf2bdc9e61eef5bdf491b3650c1daba11.tar.bz2 resp-548c6c5cf2bdc9e61eef5bdf491b3650c1daba11.zip |
More human readable names for allocated memory in output IR.
git-svn-id: http://svn.drobilla.net/resp/resp@383 ad02d1e2-f140-0410-9f75-f8b11f17cedd
-rw-r--r-- | src/llvm.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/llvm.cpp b/src/llvm.cpp index 437bd40..4bbc75f 100644 --- a/src/llvm.cpp +++ b/src/llvm.cpp @@ -224,9 +224,10 @@ LLVMEngine::compileCons(CEnv& cenv, const ATuple* type, CVal rtti, const vector< s += engine->getTargetData()->getTypeSizeInBits(llType(*i)); // Allocate struct + const std::string name = type->fst()->str(); Value* structSize = ConstantInt::get(Type::getInt32Ty(context), bitsToBytes(s)); - Value* mem = builder.CreateCall(alloc, structSize, "tupMem"); - Value* structPtr = builder.CreateBitCast(mem, llType(type), "tup"); + Value* mem = builder.CreateCall(alloc, structSize, name + "_mem"); + Value* structPtr = builder.CreateBitCast(mem, llType(type), name); // Set struct fields if (rtti) |