mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-15 23:31:37 +00:00
Print empty structs as {} rather than { }.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100787 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
88ccf742a3
commit
29e13e0c18
@ -227,13 +227,15 @@ void TypePrinting::CalcTypeName(const Type *Ty,
|
||||
const StructType *STy = cast<StructType>(Ty);
|
||||
if (STy->isPacked())
|
||||
OS << '<';
|
||||
OS << "{ ";
|
||||
OS << '{';
|
||||
for (StructType::element_iterator I = STy->element_begin(),
|
||||
E = STy->element_end(); I != E; ++I) {
|
||||
CalcTypeName(*I, TypeStack, OS);
|
||||
if (next(I) != STy->element_end())
|
||||
OS << ',';
|
||||
OS << ' ';
|
||||
CalcTypeName(*I, TypeStack, OS);
|
||||
if (next(I) == STy->element_end())
|
||||
OS << ' ';
|
||||
else
|
||||
OS << ',';
|
||||
}
|
||||
OS << '}';
|
||||
if (STy->isPacked())
|
||||
@ -245,10 +247,12 @@ void TypePrinting::CalcTypeName(const Type *Ty,
|
||||
OS << "union {";
|
||||
for (StructType::element_iterator I = UTy->element_begin(),
|
||||
E = UTy->element_end(); I != E; ++I) {
|
||||
CalcTypeName(*I, TypeStack, OS);
|
||||
if (next(I) != UTy->element_end())
|
||||
OS << ',';
|
||||
OS << ' ';
|
||||
CalcTypeName(*I, TypeStack, OS);
|
||||
if (next(I) == UTy->element_end())
|
||||
OS << ' ';
|
||||
else
|
||||
OS << ',';
|
||||
}
|
||||
OS << '}';
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user