clang.cpp: InitializePreprocessor now makes a copy of the contents of PredefinesBuffer and
passes it to the preprocessor object.
clang.cpp: DriverPreprocessorFactory now calls "InitializePreprocessor" instead of this being done in main().
html::HighlightMacros() now takes a PreprocessorFactory, allowing it to conjure up a new
Preprocessor to highlight macros.
class HTMLDiagnostics now takes a PreprocessorFactory* that it can use for html::HighlightMacros().
Updated clients of HTMLDiagnostics to use this new interface.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49875 91177308-0d34-0410-b5e6-96231b3b80d8
expanding its definition. This is a pure CSS solution.
Tested on IE7, Firefox 3b4, and Safari 3.1.
Patch by Cedric Venet!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49865 91177308-0d34-0410-b5e6-96231b3b80d8
with the Lexer. This is cheaper and gives us some advantages. For now we start
highlighting preprocessor directives (which need improvement), and disable
comments. Comments to be restored later.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49815 91177308-0d34-0410-b5e6-96231b3b80d8
allowing us to use a cheaper means to highlight keywords and making
it so that comments won't foul up macro expansions.
Start highlighting macro expansions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49779 91177308-0d34-0410-b5e6-96231b3b80d8
problems, including the fact that it doesn't work well with multi-line
comments due to Ted's crazy table. However, that could be fixed, and it
does work with single-line ones :).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49778 91177308-0d34-0410-b5e6-96231b3b80d8
a SourceLocation to get a RewriteBuffer, poke the RewriteBuffer
with an offset directly. THis is no faster, but results in
cleaner code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49774 91177308-0d34-0410-b5e6-96231b3b80d8
the new RHS directly instead of indirecting through the 'InsertResult'
struct. This eliminates InsertResult.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49694 91177308-0d34-0410-b5e6-96231b3b80d8
a nice shiny B+ Tree variant. This fixes the last of the known algorithmic
issues with the rewriter, allowing a significant speedup. For example,
-emit-html on Ted's 500K .i file speeds up from 26.8s -> 0.64s in a
debug build (41x!) and 5.475s -> 0.132s (41x!) in an optimized build.
This code is functional but needs to be cleaned up, ifdefs removed, better
commented, and moved to a .cpp file. I plan to do this tomorrow.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49635 91177308-0d34-0410-b5e6-96231b3b80d8
This results in an (IMO) simpler algorithm, results in fewer splits, and
is more amenable to delta handling (there is no reason to mutate the tree
at all when adding a delta to a position that already exists in the tree).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49609 91177308-0d34-0410-b5e6-96231b3b80d8
(but simple!) datastructures in the rewriter with a more complex but
more efficient one.
This replaces the Deltas vector with a specialized BTree that makes
delta lookups much more efficient. This speeds up -emit-html on a 500K
.i file from 157.154 to 27.127 seconds on my machine (5.8x).
While this code is functional, it isn't very pretty, I have much
refactoring planned for it, and will remove the USE_VECTOR ifdef.
Stay tuned.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49586 91177308-0d34-0410-b5e6-96231b3b80d8
the HTML file. This should reduce the amount of memory pressure on the
rewriter for files that have a lot of tabs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49406 91177308-0d34-0410-b5e6-96231b3b80d8