#
606c4ac3 |
| 05-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Improve our uniquing of file entries when files are re-saved or are overridden via remapping. Thus, when we create a "virtual" file in the file manager, we still stat() the real file that lives behin
Improve our uniquing of file entries when files are re-saved or are overridden via remapping. Thus, when we create a "virtual" file in the file manager, we still stat() the real file that lives behind it so that we can provide proper uniquing based on inodes. This helps keep the file manager much more consistent.
To take advantage of this when reparsing files in libclang, we disable the use of the stat() cache when reparsing or performing code completion, since the stat() cache is very likely to be out of date in this use case.
llvm-svn: 124971
show more ...
|
#
bcbf46c7 |
| 01-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Create a special allocator class for code completion, so that all of the string copying goes through a single place that can have associated state.
llvm-svn: 124698
|
#
b278aafb |
| 01-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Allocate CodeCompletionString and all of its components in a BumpPtrAllocator, rather than manually new/delete'ing them. This optimization also allows us to avoid allocating memory for and copying co
Allocate CodeCompletionString and all of its components in a BumpPtrAllocator, rather than manually new/delete'ing them. This optimization also allows us to avoid allocating memory for and copying constant strings (e.g., "return", "class").
This also required embedding the priority and availability of results within the code completion string, to avoid extra memory allocation within libclang.
llvm-svn: 124673
show more ...
|
#
ffd6dc43 |
| 27-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Teach ASTUnit to save the specified target features, since TargetInfo::CreateTargetInfo() mangles the target options in a way that is not idempotent. Fixes <rdar://problem/8807535>.
llvm-svn: 124382
|
#
345c1bcb |
| 19-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Don't silently drop warning flags passed in to clang_createTranslationUnitFromSourceFile().
llvm-svn: 123793
|
#
aca48a5a |
| 09-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Gather cached code completions after the first reparse, not after the second reparse.
llvm-svn: 121413
|
#
9aeaa4d6 |
| 07-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Use atomic operations for libclang's object count tracking.
llvm-svn: 121073
|
#
f88e35ba |
| 30-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
When using a precompiled preamble with detailed preprocessing records, trap the serialized preprocessing records (macro definitions, macro instantiations, macro definitions) from the generation of th
When using a precompiled preamble with detailed preprocessing records, trap the serialized preprocessing records (macro definitions, macro instantiations, macro definitions) from the generation of the precompiled preamble, then replay those when walking the list of preprocessed entities. This eliminates a bug where clang_getCursor() wasn't able to find preprocessed-entity cursors in the preamble.
llvm-svn: 120396
show more ...
|
#
8aaf4995 |
| 29-Nov-2010 |
Michael J. Spencer <bigcheesegs@gmail.com> |
Merge System into Support.
llvm-svn: 120297
|
#
e9186e6d |
| 29-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
When performing code completion within ASTUnit, allocate the AugmentedCodeCompleteConsumer on the heap, so it's always cleaned up properly
llvm-svn: 120290
|
#
26b5c190 |
| 23-Nov-2010 |
Chris Lattner <sabre@nondot.org> |
tidy up. Split FileManager::getBufferForFile into two copies, since they are fundamentally different operations and the StringRef one should go away (it shouldn't be part of FileManager at least).
tidy up. Split FileManager::getBufferForFile into two copies, since they are fundamentally different operations and the StringRef one should go away (it shouldn't be part of FileManager at least).
Remove some dead arguments.
llvm-svn: 120013
show more ...
|
#
5159f616 |
| 23-Nov-2010 |
Chris Lattner <sabre@nondot.org> |
now the FileManager has a FileSystemOpts ivar, stop threading FileSystemOpts through a ton of apis, simplifying a lot of code. This also fixes a latent bug in ASTUnit where it would invoke methods on
now the FileManager has a FileSystemOpts ivar, stop threading FileSystemOpts through a ton of apis, simplifying a lot of code. This also fixes a latent bug in ASTUnit where it would invoke methods on FileManager without creating one in some code paths in cindextext.
llvm-svn: 120010
show more ...
|
#
3f5a9efb |
| 23-Nov-2010 |
Chris Lattner <sabre@nondot.org> |
give FileManager a 'FileSystemOptions' ivar, which will be used to simplify a bunch of code in it. It should ultimately get inlined into FileManager.
llvm-svn: 120007
|
#
4ac569b2 |
| 23-Nov-2010 |
Chris Lattner <sabre@nondot.org> |
Partially revert Doug's PCH validation patch (r98585).
This patch completely defeated the "passing in a prestat'd size to MemoryBuffer" optimization, leading to an extra fstat call for every buffer
Partially revert Doug's PCH validation patch (r98585).
This patch completely defeated the "passing in a prestat'd size to MemoryBuffer" optimization, leading to an extra fstat call for every buffer opened, in order to find out if the datestamp and size of the file on disk matches what is in the stat cache.
I fully admit that I don't completely understand what is going on here: why punish code when a stat cache isn't in use? what is the point of a stat cache if you have to turn around and stat stuff to validate it?
To resolve both these issues, just drop the modtime check and check the file size, which is the important thing anyway. This should also resolve PR6812, because presumably windows is stable when it comes to file sizes. If the modtime is actually important, we should get it and keep it on the first stat.
This eliminates 833 fstat syscalls when processing Cocoa.h, speeding up system time on -Eonly Cocoa.h from 0.041 to 0.038s.
llvm-svn: 120001
show more ...
|
#
c79346a5 |
| 18-Nov-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Since multiple diagnostics can share one diagnostic client, have the client keeping track of the total number of warnings/errors reported.
llvm-svn: 119731
|
#
68dbaead |
| 17-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix source-range information for Objective-C properties. Previously, we were just getting a range covering only the property name, which is certainly not correct (and broke token annotation, among ot
Fix source-range information for Objective-C properties. Previously, we were just getting a range covering only the property name, which is certainly not correct (and broke token annotation, among other things).
Also, teach libclang about the relationship between @synthesize/@dynamic and @property, so we get property name and cursor-reference information for @synthesize and @dynamic.
llvm-svn: 119409
show more ...
|
#
3edb1676 |
| 16-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
Use an OwningPtr for the preamble buffer in ASTUnit. This plugs a leak where we failed to free this buffer along one of the paths, and detangles the code a little.
llvm-svn: 119379
|
#
c6592929 |
| 15-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
Tweak libclang's heuristics for building precompiled preambles and caching global code-completion results. In particular, don't perform either operation the first time we parse, but do both after the
Tweak libclang's heuristics for building precompiled preambles and caching global code-completion results. In particular, don't perform either operation the first time we parse, but do both after the first reparse.
llvm-svn: 119285
show more ...
|
#
44c6ee77 |
| 11-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve ASTUnit's capture of diagnostics so that the diagnostic-capturing client lives as long as the ASTUnit itself does. Otherwise, we can end up with crashes when we get a diagnostic outside of pa
Improve ASTUnit's capture of diagnostics so that the diagnostic-capturing client lives as long as the ASTUnit itself does. Otherwise, we can end up with crashes when we get a diagnostic outside of parsing/code completion. The circumstances under which this happen are really hard to reproduce, because a file needs to change from under us.
llvm-svn: 118751
show more ...
|
#
f2e5a91f |
| 09-Nov-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Simplify code.
llvm-svn: 118619
|
#
6a15337d |
| 07-Nov-2010 |
Ted Kremenek <kremenek@apple.com> |
Change the StringSet used by CalculateHiddenNames() to use a BumpPtrAllocator.
llvm-svn: 118372
|
#
71731d6b |
| 03-Nov-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Implement -working-directory.
When -working-directory is passed in command line, file paths are resolved relative to the specified directory. This helps both when using libclang (where we can't requ
Implement -working-directory.
When -working-directory is passed in command line, file paths are resolved relative to the specified directory. This helps both when using libclang (where we can't require the user to actually change the working directory) and to help reproduce test cases when the reproduction work comes along.
--FileSystemOptions is introduced which controls how file system operations are performed (currently it just contains the working directory value if set). --FileSystemOptions are passed around to various interfaces that perform file operations. --Opening & reading the content of files should be done only through FileManager. This is useful in general since file operations will be abstracted in the future for the reproduction mechanism.
FileSystemOptions is independent of FileManager so that we can have multiple translation units sharing the same FileManager but with different FileSystemOptions.
Addresses rdar://8583824.
llvm-svn: 118203
show more ...
|
#
1cbdd951 |
| 01-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
Disable some timing code
llvm-svn: 117910
|
#
16896c45 |
| 28-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Simplify ASTUnit's internal timers, by not trying to keep a pile of timers to be dumped whenever the ASTUnit is destroyed. Instead, just print the time elapsed for each operation after we perform the
Simplify ASTUnit's internal timers, by not trying to keep a pile of timers to be dumped whenever the ASTUnit is destroyed. Instead, just print the time elapsed for each operation after we perform the operation.
llvm-svn: 117550
show more ...
|
#
f5a18546 |
| 27-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce libclang-level options for C++ precompiled preambles, separating out chaining precompiled preambles from non-chaining ones.
llvm-svn: 117457
|