[llvm-commits] [llvm-gcc-4.2] r61204 - /llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
Devang Patel
dpatel at apple.com
Thu Dec 18 10:08:26 PST 2008
Author: dpatel
Date: Thu Dec 18 12:08:24 2008
New Revision: 61204
URL: http://llvm.org/viewvc/llvm-project?rev=61204&view=rev
Log:
Do not clobber 'type', which is used to maintain type cache, while walking array elements.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp?rev=61204&r1=61203&r2=61204&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp Thu Dec 18 12:08:24 2008
@@ -468,9 +468,10 @@
// There will be ARRAY_TYPE nodes for each rank. Followed by the derived
// type.
- tree EltTy = TREE_TYPE(type);
- for (; TREE_CODE(type) == ARRAY_TYPE; type = TREE_TYPE(type)) {
- tree Domain = TYPE_DOMAIN(type);
+ tree atype = type;
+ tree EltTy = TREE_TYPE(atype);
+ for (; TREE_CODE(atype) == ARRAY_TYPE; atype = TREE_TYPE(atype)) {
+ tree Domain = TYPE_DOMAIN(atype);
if (Domain) {
// FIXME - handle dynamic ranges
tree MinValue = TYPE_MIN_VALUE(Domain);
@@ -482,7 +483,7 @@
Subscripts.push_back(DebugFactory.GetOrCreateSubrange(Low, Hi));
}
}
- EltTy = TREE_TYPE(type);
+ EltTy = TREE_TYPE(atype);
}
llvm::DIArray SubscriptArray =
More information about the llvm-commits
mailing list