forked from OSchip/llvm-project
use std::copy instead of memcpy for abstraction.
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. llvm-svn: 43880
This commit is contained in:
parent
4573cc708a
commit
9fd5890e52
|
@ -195,7 +195,9 @@ void RewriteTest::HandleDeclInMainFile(Decl *D) {
|
|||
|
||||
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;
|
||||
|
|
|
@ -121,7 +121,8 @@ void RewriteBuffer::ReplaceText(unsigned OrigOffset, unsigned OrigLength,
|
|||
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)
|
||||
|
|
Loading…
Reference in New Issue