diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-10-20 05:53:05 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-10-20 05:53:05 +0000 |
commit | 8f99993856b4647a094bf1c2b703c4acc003f577 (patch) | |
tree | 9029e30501e4d4b2800beb06c023fabaa0e15a75 /lib/Rewrite/RewriteRope.cpp | |
parent | 375e69cb19e9ba65ab5f822ad5d44cffae15edb1 (diff) |
Revert 84601. Looks like it was causing failures on some systems.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84610 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Rewrite/RewriteRope.cpp')
-rw-r--r-- | lib/Rewrite/RewriteRope.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Rewrite/RewriteRope.cpp b/lib/Rewrite/RewriteRope.cpp index bd99732dc8..30bbcfafb5 100644 --- a/lib/Rewrite/RewriteRope.cpp +++ b/lib/Rewrite/RewriteRope.cpp @@ -798,8 +798,9 @@ RopePiece RewriteRope::MakeRopeString(const char *Start, const char *End) { 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); } |