aboutsummaryrefslogtreecommitdiffstats
path: root/llvm.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-03-15 15:16:09 +0000
committerDavid Robillard <d@drobilla.net>2009-03-15 15:16:09 +0000
commit52ae7f1842e0f079152902ee73008a2a00aaeb3f (patch)
tree6e511b17cd3f6a06936ea53fa52110706e52ae61 /llvm.cpp
parent0bd85b083b35ec9287462ca42fba45dc7af48797 (diff)
downloadresp-52ae7f1842e0f079152902ee73008a2a00aaeb3f.tar.gz
resp-52ae7f1842e0f079152902ee73008a2a00aaeb3f.tar.bz2
resp-52ae7f1842e0f079152902ee73008a2a00aaeb3f.zip
Set name of closures so defined functions are emitted with meaningful names.
git-svn-id: http://svn.drobilla.net/resp/tuplr@103 ad02d1e2-f140-0410-9f75-f8b11f17cedd
Diffstat (limited to 'llvm.cpp')
-rw-r--r--llvm.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm.cpp b/llvm.cpp
index 0cd5199..64fc6a6 100644
--- a/llvm.cpp
+++ b/llvm.cpp
@@ -341,6 +341,9 @@ ADefinition::lift(CEnv& cenv)
{
// Define first for recursion
cenv.def(at(1)->as<ASymbol*>(), at(2), cenv.type(at(2)), NULL);
+ AClosure* c = dynamic_cast<AClosure*>(at(2));
+ if (c)
+ c->name = at(1)->str();
at(2)->lift(cenv);
}