aboutsummaryrefslogtreecommitdiffstats
path: root/tools/llvm2cpp
diff options
context:
space:
mode:
authorGordon Henriksen <gordonhenriksen@mac.com>2007-12-25 22:16:06 +0000
committerGordon Henriksen <gordonhenriksen@mac.com>2007-12-25 22:16:06 +0000
commit3e7ea1e79f0bdb067ad0f983bdacdfb00b0b19ad (patch)
treeb77faaa1cebd7341073265b7f230b82a86a80dc3 /tools/llvm2cpp
parent6c8de969de87d972212dd690aef18ac77bea0bea (diff)
downloadexternal_llvm-3e7ea1e79f0bdb067ad0f983bdacdfb00b0b19ad.zip
external_llvm-3e7ea1e79f0bdb067ad0f983bdacdfb00b0b19ad.tar.gz
external_llvm-3e7ea1e79f0bdb067ad0f983bdacdfb00b0b19ad.tar.bz2
Fixing several transforms which would drop the collector attribute
when copying functions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45356 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm2cpp')
-rw-r--r--tools/llvm2cpp/CppWriter.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/llvm2cpp/CppWriter.cpp b/tools/llvm2cpp/CppWriter.cpp
index b3aaf25..ccb2a37 100644
--- a/tools/llvm2cpp/CppWriter.cpp
+++ b/tools/llvm2cpp/CppWriter.cpp
@@ -1572,6 +1572,11 @@ void CppWriter::printFunctionHead(const Function* F) {
Out << ");";
nl(Out);
}
+ if (F->hasCollector()) {
+ printCppName(F);
+ Out << "->setCollector(\"" << F->getCollector() << "\");";
+ nl(Out);
+ }
if (is_inline) {
Out << "}";
nl(Out);