[cfe-commits] r44490 - /cfe/trunk/CodeGen/CodeGenTypes.cpp
Christopher Lamb
christopher.lamb at gmail.com
Sat Dec 1 01:20:34 PST 2007
Author: clamb
Date: Sat Dec 1 03:20:34 2007
New Revision: 44490
URL: http://llvm.org/viewvc/llvm-project?rev=44490&view=rev
Log:
Better match llvm-gcc's behavior for CodeGen naming of anonymous structs and unions.
Modified:
cfe/trunk/CodeGen/CodeGenTypes.cpp
Modified: cfe/trunk/CodeGen/CodeGenTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CodeGen/CodeGenTypes.cpp?rev=44490&r1=44489&r2=44490&view=diff
==============================================================================
--- cfe/trunk/CodeGen/CodeGenTypes.cpp (original)
+++ cfe/trunk/CodeGen/CodeGenTypes.cpp Sat Dec 1 03:20:34 2007
@@ -313,9 +313,12 @@
// Name the codegen type after the typedef name
// if there is no tag type name available
- if (TD->getName() == "" && T->getTypeClass() == Type::TypeName) {
- const TypedefType *TdT = cast<TypedefType>(T);
- TypeName += TdT->getDecl()->getName();
+ if (TD->getName() == "") {
+ if (T->getTypeClass() == Type::TypeName) {
+ const TypedefType *TdT = cast<TypedefType>(T);
+ TypeName += TdT->getDecl()->getName();
+ } else
+ TypeName += "anon";
} else
TypeName += TD->getName();
More information about the cfe-commits
mailing list