summaryrefslogtreecommitdiff
path: root/tools/llvm2cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-04-11 10:01:32 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-04-11 10:01:32 +0000
commita9297b1a09ae919c5b13a94350971f873fc92b4c (patch)
tree5ede33be5fa020a16abdaa47b2eb298776d3516b /tools/llvm2cpp
parent6abd3daae16aeae4fa7e3dbec2018820887f3cff (diff)
downloadllvm-a9297b1a09ae919c5b13a94350971f873fc92b4c.tar.gz
llvm-a9297b1a09ae919c5b13a94350971f873fc92b4c.tar.bz2
llvm-a9297b1a09ae919c5b13a94350971f873fc92b4c.tar.xz
Fix some issues with param attrs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35894 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm2cpp')
-rw-r--r--tools/llvm2cpp/CppWriter.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/llvm2cpp/CppWriter.cpp b/tools/llvm2cpp/CppWriter.cpp
index a2f02c3f20..d954ccb948 100644
--- a/tools/llvm2cpp/CppWriter.cpp
+++ b/tools/llvm2cpp/CppWriter.cpp
@@ -460,8 +460,10 @@ CppWriter::printTypeInternal(const Type* Ty) {
}
const ParamAttrsList *PAL = FT->getParamAttrs();
Out << "ParamAttrsList *" << typeName << "_PAL = 0;";
+ nl(Out);
if (PAL && !PAL->empty()) {
Out << typeName << "_PAL = new ParamAttrsList();";
+ nl(Out);
for (unsigned i = 0; i < PAL->size(); ++i) {
uint16_t index = PAL->getParamIndex(i);
uint16_t attrs = PAL->getParamAttrs(index);
@@ -479,6 +481,7 @@ CppWriter::printTypeInternal(const Type* Ty) {
if (attrs & ParamAttr::NoUnwind)
Out << " | ParamAttr::NoUnwind";
Out << ");";
+ nl(Out);
}
}
bool isForward = printTypeInternal(FT->getReturnType());
@@ -490,7 +493,7 @@ CppWriter::printTypeInternal(const Type* Ty) {
Out << ",";
nl(Out) << "/*Params=*/" << typeName << "_args,";
nl(Out) << "/*isVarArg=*/" << (FT->isVarArg() ? "true" : "false") ;
- nl(Out) << "/*ParamAttrs=/" << typeName << "_PAL" << ");";
+ nl(Out) << "/*ParamAttrs=*/" << typeName << "_PAL" << ");";
out();
nl(Out);
break;