Disable rewrite-tabs. This speeds up processing of the commentified huge
crazy testcase steve gave me from 20s to 6.6s in a release build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43880
91177308-0d34-0410-b5e6-
96231b3b80d8
RewriteTest::~RewriteTest() {
// Get the top-level buffer that this corresponds to.
- RewriteTabs();
+
+ // Rewrite tabs if we care.
+ //RewriteTabs();
// Rewrite Objective-c meta data*
std::string ResultStr;
assert(RealOffset+OrigLength <= Buffer.size() && "Invalid location");
// Overwrite the common piece.
- memcpy(&Buffer[RealOffset], NewStr, std::min(OrigLength, NewLength));
+ std::copy(NewStr, NewStr+std::min(OrigLength, NewLength),
+ Buffer.begin()+RealOffset);
// If replacing without shifting around, just overwrite the text.
if (OrigLength == NewLength)