]> granicus.if.org Git - clang/commit
Change the datastructure for UnwrappedLines.
authorDaniel Jasper <djasper@google.com>
Wed, 16 Jan 2013 09:10:19 +0000 (09:10 +0000)
committerDaniel Jasper <djasper@google.com>
Wed, 16 Jan 2013 09:10:19 +0000 (09:10 +0000)
commitcbb6c41f3cec4a940201a8e2e65743c9f26c3673
tree0db68e00f9edf572da749ae9323932160d65cdba
parent6b825c2e1e691deca41c6f979164b5d20c203593
Change the datastructure for UnwrappedLines.

It was quite convoluted leading to us accidentally introducing O(N^2)
complexity while copying from UnwrappedLine to AnnotatedLine. We might
still want to improve the datastructure in AnnotatedLine (most
importantly not put them in a vector where they need to be copied on
vector resizing but that will be done as a follow-up.

This fixes most of the regression in llvm.org/PR14959.

No formatting changes intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172602 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Format/Format.cpp
lib/Format/UnwrappedLineParser.cpp
lib/Format/UnwrappedLineParser.h