[cfe-commits] r89054 - /cfe/trunk/lib/Rewrite/DeltaTree.cpp
Douglas Gregor
dgregor at apple.com
Mon Nov 16 22:52:38 PST 2009
Author: dgregor
Date: Tue Nov 17 00:52:37 2009
New Revision: 89054
URL: http://llvm.org/viewvc/llvm-project?rev=89054&view=rev
Log:
Be more careful with anonymous namespaces, since Clang diagnoses the ambiguity here
Modified:
cfe/trunk/lib/Rewrite/DeltaTree.cpp
Modified: cfe/trunk/lib/Rewrite/DeltaTree.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Rewrite/DeltaTree.cpp?rev=89054&r1=89053&r2=89054&view=diff
==============================================================================
--- cfe/trunk/lib/Rewrite/DeltaTree.cpp (original)
+++ cfe/trunk/lib/Rewrite/DeltaTree.cpp Tue Nov 17 00:52:37 2009
@@ -19,12 +19,6 @@
using llvm::cast;
using llvm::dyn_cast;
-namespace {
- struct SourceDelta;
- class DeltaTreeNode;
- class DeltaTreeInteriorNode;
-}
-
/// The DeltaTree class is a multiway search tree (BTree) structure with some
/// fancy features. B-Trees are are generally more memory and cache efficient
/// than binary trees, because they store multiple keys/values in each node.
@@ -55,21 +49,17 @@
return Delta;
}
};
-} // end anonymous namespace
-
-
-namespace {
- struct InsertResult {
- DeltaTreeNode *LHS, *RHS;
- SourceDelta Split;
- };
-} // end anonymous namespace
-
-
-namespace {
+
/// DeltaTreeNode - The common part of all nodes.
///
class DeltaTreeNode {
+ public:
+ struct InsertResult {
+ DeltaTreeNode *LHS, *RHS;
+ SourceDelta Split;
+ };
+
+ private:
friend class DeltaTreeInteriorNode;
/// WidthFactor - This controls the number of K/V slots held in the BTree:
@@ -473,7 +463,7 @@
assert(Delta && "Adding a noop?");
DeltaTreeNode *MyRoot = getRoot(Root);
- InsertResult InsertRes;
+ DeltaTreeNode::InsertResult InsertRes;
if (MyRoot->DoInsertion(FileIndex, Delta, &InsertRes)) {
Root = MyRoot = new DeltaTreeInteriorNode(InsertRes);
}
More information about the cfe-commits
mailing list