[cfe-commits] r84610 - /cfe/trunk/lib/Rewrite/RewriteRope.cpp
Ted Kremenek
kremenek at apple.com
Mon Oct 19 22:53:05 PDT 2009
Author: kremenek
Date: Tue Oct 20 00:53:05 2009
New Revision: 84610
URL: http://llvm.org/viewvc/llvm-project?rev=84610&view=rev
Log:
Revert 84601. Looks like it was causing failures on some systems.
Modified:
cfe/trunk/lib/Rewrite/RewriteRope.cpp
Modified: cfe/trunk/lib/Rewrite/RewriteRope.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Rewrite/RewriteRope.cpp?rev=84610&r1=84609&r2=84610&view=diff
==============================================================================
--- cfe/trunk/lib/Rewrite/RewriteRope.cpp (original)
+++ cfe/trunk/lib/Rewrite/RewriteRope.cpp Tue Oct 20 00:53:05 2009
@@ -798,8 +798,9 @@
memcpy(AllocBuffer->Data, Start, Len);
AllocOffs = Len;
- // Return a RopePiece that wraps 'AllocBuffer'. The constructor of RopePiece
- // will increment the reference count of AllocBuffer.
+ // Start out the new allocation with a refcount of 1, since we have an
+ // internal reference to it.
+ AllocBuffer->addRef();
return RopePiece(AllocBuffer, 0, Len);
}
More information about the cfe-commits
mailing list