]> granicus.if.org Git - clang/commit
Reimplement SourceLocation. Instead of having a
authorChris Lattner <sabre@nondot.org>
Fri, 20 Jul 2007 16:37:10 +0000 (16:37 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 20 Jul 2007 16:37:10 +0000 (16:37 +0000)
commit9dc1f530c086d2c16f8cba758b0f59a5bf41323a
treea68f846d3ccbf60f1b03c6a382a7e706dfa917ee
parent030d8846c7e520330007087e949f621989876e3a
Reimplement SourceLocation.  Instead of having a
fileid/offset pair, it now contains a bit discriminating between
mapped locations and file locations.  This separates the tables for
macros and files in SourceManager, and allows better separation of
concepts in the rest of the compiler.  This allows us to have *many*
macro instantiations before running out of 'addressing space'.

This is also more efficient, because testing whether something is a
macro expansion is now a bit test instead of a table lookup (which
also used to require having a srcmgr around, now it doesn't).

This is fully functional, but there are several refinements and
optimizations left.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40103 91177308-0d34-0410-b5e6-96231b3b80d8
13 files changed:
Basic/SourceManager.cpp
Driver/DiagChecker.cpp
Driver/PrintPreprocessedOutput.cpp
Driver/TextDiagnosticPrinter.cpp
Driver/TextDiagnostics.cpp
Lex/Lexer.cpp
Lex/MacroExpander.cpp
Lex/Pragma.cpp
Lex/Preprocessor.cpp
Lex/ScratchBuffer.cpp
include/clang/Basic/SourceLocation.h
include/clang/Basic/SourceManager.h
include/clang/Lex/Lexer.h