switch to the new struct apis.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137481 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2011-08-12 18:07:07 +00:00
parent 3ebb64946b
commit c4d0e9fbdd
4 changed files with 9 additions and 9 deletions

View File

@ -533,9 +533,9 @@ void CppWriter::printType(Type* Ty) {
}
case Type::StructTyID: {
StructType* ST = cast<StructType>(Ty);
if (!ST->isAnonymous()) {
if (!ST->isLiteral()) {
Out << "StructType *" << typeName << " = ";
Out << "StructType::createNamed(mod->getContext(), \"";
Out << "StructType::create(mod->getContext(), \"";
printEscapedString(ST->getName());
Out << "\");";
nl(Out);
@ -556,7 +556,7 @@ void CppWriter::printType(Type* Ty) {
nl(Out);
}
if (ST->isAnonymous()) {
if (ST->isLiteral()) {
Out << "StructType *" << typeName << " = ";
Out << "StructType::get(" << "mod->getContext(), ";
} else {