#
25029d49 |
| 03-Oct-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Make sure SourceManager::getFileIDLoaded doesn't hang in release build because of invalid passed parameter. rdar://10210140
llvm-svn: 141048
|
#
04a6e5f8 |
| 27-Sep-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Break SourceManager::translateFileLineCol into translateFile, no functionality change.
llvm-svn: 140610
|
#
4bdd6aa1 |
| 26-Sep-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Associate the macro arguments location map with a FileID instead of a ContentCache, since multiple FileIDs can have the same ContentCache but the expanded macro arguments locations will be different.
Associate the macro arguments location map with a FileID instead of a ContentCache, since multiple FileIDs can have the same ContentCache but the expanded macro arguments locations will be different.
llvm-svn: 140521
show more ...
|
#
9c902b55 |
| 25-Sep-2011 |
David Blaikie <dblaikie@gmail.com> |
Rename Diagnostic to DiagnosticsEngine as per issue 5397
llvm-svn: 140478
|
#
7c2b28a1 |
| 20-Sep-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
In SourceManager::translateLineCol, handle the case where we are pointing directly at the end of the source file.
llvm-svn: 140192
|
#
7c06d866 |
| 19-Sep-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[libclang] When getting a source location from a file:line:col triplet check whether the requested location points inside the precompiled preamble, in which case the returned source location will be
[libclang] When getting a source location from a file:line:col triplet check whether the requested location points inside the precompiled preamble, in which case the returned source location will be a "loaded" one.
llvm-svn: 140060
show more ...
|
#
532c5196 |
| 19-Sep-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Break SourceManager::translateFileLineCol into translateLineCol that returns the source location of line:col of a specific FileID.
llvm-svn: 140059
|
#
e6e67dee |
| 19-Sep-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Rename SourceLocation::getFileLocWithOffset -> getLocWithOffset.
It already works (and is useful with) macro locs as well.
llvm-svn: 140057
|
#
b4199b65 |
| 19-Sep-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
For SourceManager::isBeforeInTranslationUnit, a location pointing inside a macro argument should be regarded as coming before the location of the expanded tokens.
llvm-svn: 140053
|
#
18c88a96 |
| 23-Aug-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Remove one SourceManager::isInFileID overload and use isOffsetInFileID for the other.
llvm-svn: 138381
|
#
2797df6a |
| 23-Aug-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Amend r138129 (reduction of SLocEntries) which introduced performance regression due to increased calls to SourceManager::getFileID. (rdar://9992664)
Use a slightly different approach that is more e
Amend r138129 (reduction of SLocEntries) which introduced performance regression due to increased calls to SourceManager::getFileID. (rdar://9992664)
Use a slightly different approach that is more efficient both in terms of speed (no extra getFileID calls) and in SLocEntries reduction.
Comparing pre-r138129 and this patch we get:
For compiling SemaExpr.cpp reduction of SLocEntries by 26%. For the boost enum library: -SLocEntries -34% (note that this was -5% for r138129) -Memory consumption -50% -PCH size -31%
Reduced SLocEntries also benefit the hot function SourceManager::getFileID, evident by the reduced "FileID scans".
llvm-svn: 138380
show more ...
|
#
296374b5 |
| 23-Aug-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Move a couple of SourceManager functions out-of-line; no functionality change.
llvm-svn: 138375
|
#
61ef3db2 |
| 21-Aug-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Boost the efficiency of SourceManager::getMacroArgExpandedLocation.
Currently getMacroArgExpandedLocation is very inefficient and for the case of a location pointing at the main file it will end up
Boost the efficiency of SourceManager::getMacroArgExpandedLocation.
Currently getMacroArgExpandedLocation is very inefficient and for the case of a location pointing at the main file it will end up checking almost all of the SLocEntries. Make it faster:
-Use a map of macro argument chunks to their expanded source location. The map is for a single source file, it's stored in the file's ContentCache and lazily computed, like the source lines cache. -In SLocEntry's FileInfo add an 'unsigned NumCreatedFIDs' field that keeps track of the number of FileIDs (files and macros) that were created during preprocessing of that particular file SLocEntry. This is useful when computing the macro argument map in skipping included files while scanning for macro arg FileIDs that lexed from a specific source file. Due to padding, the new field does not increase the size of SLocEntry.
llvm-svn: 138225
show more ...
|
#
34d729d4 |
| 19-Aug-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Refactor common functionality into SourceManager::getFileIDSize, no functionality change.
llvm-svn: 138127
|
#
92a47bd9 |
| 17-Aug-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Introduce SourceManager::getMacroArgExpandedLocation function.
If we pass it a source location that points inside a function macro argument, the returned location will be the macro location in which
Introduce SourceManager::getMacroArgExpandedLocation function.
If we pass it a source location that points inside a function macro argument, the returned location will be the macro location in which the argument was expanded. If a macro argument is used multiple times, the expanded location will be at the first expansion of the argument. e.g. MY_MACRO(foo); ^ Passing a file location pointing at 'foo', will yield a macro location where 'foo' was expanded into.
Make SourceManager::getLocation call getMacroArgExpandedLocation as well.
llvm-svn: 137794
show more ...
|
#
ac199bff |
| 17-Aug-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Make SourceManager::isBeforeInTranslationUnit handle macro locations correctly.
llvm-svn: 137793
|
#
43e0c4a8 |
| 27-Jul-2011 |
Ted Kremenek <kremenek@apple.com> |
Change SourceManager::getDataStructureSizes() to use llvm::capacity_in_bytes().
llvm-svn: 136236
|
#
120992ad |
| 26-Jul-2011 |
Ted Kremenek <kremenek@apple.com> |
clang_getCXTUResourceUsage: Report memory used by data structures in SourceManager.
llvm-svn: 136189
|
#
64ee782e |
| 26-Jul-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Clean up as many of the comments in Basic I can find to talk in terms of 'expansion' rather than 'instantiation' for macro source locations.
llvm-svn: 136058
|
#
ee4c1d12 |
| 26-Jul-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Migrate 'Instantiation' data and API bits of SLocEntry to 'Expansion' etc. With this I think essentially all of the SourceManager APIs are converted. Comments and random other bits of cleanup should
Migrate 'Instantiation' data and API bits of SLocEntry to 'Expansion' etc. With this I think essentially all of the SourceManager APIs are converted. Comments and random other bits of cleanup should be all thats left.
llvm-svn: 136057
show more ...
|
#
73ee5d7f |
| 26-Jul-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Convert InstantiationInfo and much of the related code to ExpansionInfo and various other 'expansion' based terms. I've tried to reformat where appropriate and catch as many references in comments bu
Convert InstantiationInfo and much of the related code to ExpansionInfo and various other 'expansion' based terms. I've tried to reformat where appropriate and catch as many references in comments but I'm going to do several more passes. Also I've tried to expand parameter names to be more clear where appropriate.
llvm-svn: 136056
show more ...
|
#
115b077f |
| 26-Jul-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Rename create(MacroArg)InstantiationLoc to create(MacroArg)ExpansionLoc.
llvm-svn: 136054
|
#
aa63153f |
| 26-Jul-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Rename SourceManager (and InstantiationInfo) isMacroArgInstantiation API to isMacroArgExpansion.
llvm-svn: 136053
|
#
d48db211 |
| 25-Jul-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Rename getInstantiationLineNumber to getExpansionLineNumber in both SourceManager and FullSourceLoc.
llvm-svn: 135969
|
#
42f35f9c |
| 25-Jul-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Rename getInstantiationColumnNumber to getExpansionColumnNumber in both SourceManager and FullSourceLoc.
llvm-svn: 135965
|