[llvm-commits] [126896] Fix PR 1250.
dpatel at apple.com
dpatel at apple.com
Fri May 4 11:42:00 PDT 2007
Revision: 126896
Author: dpatel
Date: 2007-05-04 11:42:00 -0700 (Fri, 04 May 2007)
Log Message:
-----------
Fix PR 1250.
Apply Duncan's patch.
Modified Paths:
--------------
apple-local/branches/llvm/gcc/llvm-types.cpp
Modified: apple-local/branches/llvm/gcc/llvm-types.cpp
===================================================================
--- apple-local/branches/llvm/gcc/llvm-types.cpp 2007-05-04 16:16:23 UTC (rev 126895)
+++ apple-local/branches/llvm/gcc/llvm-types.cpp 2007-05-04 18:42:00 UTC (rev 126896)
@@ -473,16 +473,17 @@
}
case ENUMERAL_TYPE:
// Use of an enum that is implicitly declared?
- if (TYPE_SIZE(type) == 0) {
+ if (TYPE_SIZE(orig_type) == 0) {
// If we already compiled this type, use the old type.
- if (const Type *Ty = GET_TYPE_LLVM(type))
+ if (const Type *Ty = GET_TYPE_LLVM(orig_type))
return Ty;
const Type *Ty = OpaqueType::get();
TheModule->addTypeName(GetTypeName("enum.", orig_type), Ty);
- return TypeDB.setType(type, Ty);
+ return TypeDB.setType(orig_type, Ty);
}
// FALL THROUGH.
+ type = orig_type;
case INTEGER_TYPE:
if (const Type *Ty = GET_TYPE_LLVM(type)) return Ty;
More information about the llvm-commits
mailing list