[llvm-commits] [llvm-gcc-4.2] r90899 - in /llvm-gcc-4.2/trunk/gcc: llvm-debug.cpp llvm-debug.h
Devang Patel
dpatel at apple.com
Tue Dec 8 15:22:51 PST 2009
Author: dpatel
Date: Tue Dec 8 17:22:51 2009
New Revision: 90899
URL: http://llvm.org/viewvc/llvm-project?rev=90899&view=rev
Log:
Revert 90806 for now.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
llvm-gcc-4.2/trunk/gcc/llvm-debug.h
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=90899&r1=90898&r2=90899&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp Tue Dec 8 17:22:51 2009
@@ -282,23 +282,7 @@
RegionMap[FnDecl] = WeakVH(SP.getNode());
}
-/// getOrCreateNameSpace - Get name space descriptor for the tree node.
-DINameSpace DebugInfo::getOrCreateNameSpace(tree Node, DIDescriptor Context) {
- std::map<tree_node *, WeakVH >::iterator I =
- NameSpaceCache.find(Node);
- if (I != NameSpaceCache.end())
- return DINameSpace(cast<MDNode>(I->second));
-
- expanded_location Loc = GetNodeLocation(Node, false);
- DINameSpace DNS =
- DebugFactory.CreateNameSpace(Context, GetNodeName(Node),
- getOrCreateCompileUnit(Loc.file), Loc.line);
-
- NameSpaceCache[Node] = WeakVH(DNS.getNode());
- return DNS;
-}
-
-/// findRegion - Find tree_node N's region.
+ /// findRegion - Find tree_node N's region.
DIDescriptor DebugInfo::findRegion(tree Node) {
if (Node == NULL_TREE)
return getOrCreateCompileUnit(main_input_filename);
@@ -309,9 +293,8 @@
return DIDescriptor(R);
if (TYPE_P (Node)) {
- if (TYPE_CONTEXT (Node)) {
+ if (TYPE_CONTEXT (Node))
return findRegion (TYPE_CONTEXT(Node));
- }
} else if (DECL_P (Node)) {
tree decl = Node;
tree context = NULL_TREE;
@@ -321,19 +304,10 @@
context = TYPE_MAIN_VARIANT
(TREE_TYPE (TREE_VALUE (TYPE_ARG_TYPES (TREE_TYPE (decl)))));
- if (context != NULL_TREE) {
- if (TREE_CODE(Node) == NAMESPACE_DECL) {
- DIDescriptor Context = findRegion(context);
- return getOrCreateNameSpace(Node, Context);
- } else
- return findRegion(context);
- }
+ if (context != NULL_TREE)
+ return findRegion(context);
}
-
- if (TREE_CODE(Node) == NAMESPACE_DECL)
- return getOrCreateNameSpace(Node,
- getOrCreateCompileUnit(main_input_filename));
-
+
// Otherwise main compile unit covers everything.
return getOrCreateCompileUnit(main_input_filename);
}
Modified: llvm-gcc-4.2/trunk/gcc/llvm-debug.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-debug.h?rev=90899&r1=90898&r2=90899&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-debug.h (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-debug.h Tue Dec 8 17:22:51 2009
@@ -68,9 +68,6 @@
std::map<tree_node *, WeakVH > SPCache;
// Cache of previously constructed
// Subprograms.
- std::map<tree_node *, WeakVH> NameSpaceCache;
- // Cache of previously constructed name
- // spaces.
SmallVector<WeakVH, 4> RegionStack;
// Stack to track declarative scopes.
@@ -139,9 +136,6 @@
/// findRegion - Find tree_node N's region.
DIDescriptor findRegion(tree_node *n);
-
- /// getOrCreateNameSpace - Get name space descriptor for the tree node.
- DINameSpace getOrCreateNameSpace(tree_node *Node, DIDescriptor Context);
};
} // end namespace llvm
More information about the llvm-commits
mailing list