#
08a2bfd2 |
| 28-Jul-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Cut down the number of open/close system calls for output files.
For PCH files, have only one open/close for temporary + rename to be safe from race conditions. For all other output files open/close
Cut down the number of open/close system calls for output files.
For PCH files, have only one open/close for temporary + rename to be safe from race conditions. For all other output files open/close the output file directly.
Depends on llvm r136310. rdar://9082880 & http://llvm.org/PR9374.
llvm-svn: 136315
show more ...
|
#
0e62c1cc |
| 23-Jul-2011 |
Chris Lattner <sabre@nondot.org> |
remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports them into the clang namespace.
llvm-svn: 135852
|
#
c567ba26 |
| 22-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Switch all of the "isysroot" const char*'s throughout the AST reader and writer to StringRef or std::string, as appropriate.
llvm-svn: 135769
|
#
a6895d8a |
| 22-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Rename ASTReader::PerFileData to serialization::Module, pulling it out of ASTReader so it can become its own full-fledged class (eventually). No functionality change.
llvm-svn: 135767
|
#
ff9a5506 |
| 21-Jul-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Cut down one open/close pair of system calls by using Path's makeUnique instead of createTemporaryFileOnDisk.
llvm-svn: 135690
|
#
925296b4 |
| 19-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Revamp the SourceManager to separate the representation of parsed source locations from source locations loaded from an AST/PCH file.
Previously, loading an AST/PCH file involved carefully pre-alloc
Revamp the SourceManager to separate the representation of parsed source locations from source locations loaded from an AST/PCH file.
Previously, loading an AST/PCH file involved carefully pre-allocating space at the beginning of the source manager for the source locations and FileIDs that correspond to the prefix, and then appending the source locations/FileIDs used for parsing the remaining translation unit. This design forced us into loading PCH files early, as a prefix, whic has become a rather significant limitation.
This patch splits the SourceManager space into two parts: for source location "addresses", the lower values (growing upward) are used to describe parsed code, while upper values (growing downward) are used for source locations loaded from AST/PCH files. Similarly, positive FileIDs are used to describe parsed code while negative FileIDs are used to file/macro locations loaded from AST/PCH files. As a result, we can load PCH/AST files even during parsing, making various improvemnts in the future possible, e.g., teaching #include <foo.h> to look for and load <foo.h.gch> if it happens to be already available.
This patch was originally written by Sebastian Redl, then brought forward to the modern age by Jonathan Turner, and finally polished/finished by me to be committed.
llvm-svn: 135484
show more ...
|
#
de81fc85 |
| 14-Jul-2011 |
Chandler Carruth <chandlerc@gmail.com> |
NestedMacroInstantiations -> NestedMacroExpansions
This is switches all the interfaces points (and most of the commenst / local variables I saw on my way through) regarding the NestedMacroInstantiat
NestedMacroInstantiations -> NestedMacroExpansions
This is switches all the interfaces points (and most of the commenst / local variables I saw on my way through) regarding the NestedMacroInstantiations bit.
The libclang enums corresponding to this state were renamed, but a legacy enum was added with the old name, and the same value to keep existing clients working. I've added a documentation blurb for it, but let me know if there is a canonical way to document legacy elemenst of the libclang interface.
No functionality changed here, even in tests.
llvm-svn: 135141
show more ...
|
#
321cdb85 |
| 23-Jun-2011 |
Dylan Noblesmith <nobled@dreamwidth.org> |
avoid using config.h in public headers
This is the only usage in clang's headers, and it's for a define that only exists on CMake builds for the sake of the MSVC compiler, so just use an ifdef inste
avoid using config.h in public headers
This is the only usage in clang's headers, and it's for a define that only exists on CMake builds for the sake of the MSVC compiler, so just use an ifdef instead.
Also add an include for config.h in a file that actually needs it, and was picking it up by accident indirectly.
llvm-svn: 133710
show more ...
|
#
b5703510 |
| 16-Jun-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Raise the ARCMT functionality in Clang into proper FrontendActions. These are somewhat special in that they wrap any other FrontendAction, running various ARC transformations or checks prior to the s
Raise the ARCMT functionality in Clang into proper FrontendActions. These are somewhat special in that they wrap any other FrontendAction, running various ARC transformations or checks prior to the standard action's run. To implement them easily, this extends FrontendAction to have a WrapperFrontendAction utility class which forwards all calls by default to an inner action setup at construction time. This is then subclassed to override the specific behavior needed by the different ARCMT tools.
Finally, FrontendTool is taught how to create these wrapper actions from the existing flags and options structures.
The result is that clangFrontend no longer depends on clangARCMigrate. This is very important, as clangARCMigrate *heavily* depends on clangFrontend. Fundamentally ARCMigrate is at the same layer as a library like Rewrite, sitting firmly on top of the Frontend, but tied together with the FrontendTool when building the clang binary itself.
llvm-svn: 133161
show more ...
|
#
d70fb981 |
| 15-Jun-2011 |
John McCall <rjmccall@apple.com> |
The ARC Migration Tool. All the credit goes to Argyrios and Fariborz for this.
llvm-svn: 133104
|
#
998caead |
| 06-May-2011 |
Douglas Gregor <dgregor@apple.com> |
Introduce a new libclang parsing flag, CXTranslationUnit_NestedMacroInstantiations, which indicates whether we want to see "nested" macro instantiations (e.g., those that occur inside other macro ins
Introduce a new libclang parsing flag, CXTranslationUnit_NestedMacroInstantiations, which indicates whether we want to see "nested" macro instantiations (e.g., those that occur inside other macro instantiations) within the detailed preprocessing record. Many clients (e.g., those that only care about visible tokens) don't care about this information, and in code that uses preprocessor metaprogramming, this information can have a very high cost.
Addresses <rdar://problem/9389320>.
llvm-svn: 130990
show more ...
|
#
44d9ef78 |
| 07-Apr-2011 |
Daniel Dunbar <daniel@zuster.org> |
Frontend/CC_LOG_DIAGNOSTICS: Fix thinko and open diag log in append mode.
llvm-svn: 129103
|
#
7b83306d |
| 07-Apr-2011 |
Daniel Dunbar <daniel@zuster.org> |
Fronted/CC_LOG_DIAGNOSTICS: Wire up dwarf-debug-flags support.
llvm-svn: 129095
|
#
2083c32f |
| 07-Apr-2011 |
Daniel Dunbar <daniel@zuster.org> |
Frontend: Sketch a LogDiagnosticPrinter object, and wire CC_LOG_DIAGNOSTICS to it.
llvm-svn: 129089
|
Revision tags: llvmorg-2.9.0, llvmorg-2.9.0-rc3, llvmorg-2.9.0-rc2 |
|
#
fe908a80 |
| 21-Mar-2011 |
Daniel Dunbar <daniel@zuster.org> |
Frontend: Change CC_PRINT_HEADERS to not print header depth markers, these don't really make any sense in this environment.
llvm-svn: 128014
|
#
5e14d39a |
| 21-Mar-2011 |
Ted Kremenek <kremenek@apple.com> |
Improve crash recovery cleanup to recovery CompilerInstances during crash recovery. This was a huge resource "root" during crashes.
This change requires making a bunch of fundamental Clang structur
Improve crash recovery cleanup to recovery CompilerInstances during crash recovery. This was a huge resource "root" during crashes.
This change requires making a bunch of fundamental Clang structures (optionally) reference counted to allow correct ownership semantics of these objects (e.g., ASTContext) to play out between an active ASTUnit and CompilerInstance object.
llvm-svn: 128011
show more ...
|
#
9ba8fb1e |
| 14-Mar-2011 |
Anders Carlsson <andersca@mac.com> |
Get rid of the static FileManager::FixupRelativePath.
llvm-svn: 127573
|
Revision tags: llvmorg-2.9.0-rc1 |
|
#
b5c356a4 |
| 06-Mar-2011 |
Anders Carlsson <andersca@mac.com> |
Convert FileManager::FixupRelativePath over to using PathV2.
llvm-svn: 127133
|
#
8f5cf74c |
| 19-Feb-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Re-instate r125819 and r125820 with no functionality change
llvm-svn: 126060
|
#
a6d2bff0 |
| 19-Feb-2011 |
Rafael Espindola <rafael.espindola@gmail.com> |
Revert 125820 and 125819 to fix PR9266.
llvm-svn: 126050
|
#
14a552b2 |
| 18-Feb-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Move CompilerInstance::LLVMContext and LLVMContext ownership to CodeGenAction
This removes the final dependency edge from any lib outside of CodeGen to core. As a result we can, and do, trim the de
Move CompilerInstance::LLVMContext and LLVMContext ownership to CodeGenAction
This removes the final dependency edge from any lib outside of CodeGen to core. As a result we can, and do, trim the dependency on core from libclang, PrintFunctionNames, the unit tests and c-index-test. While at it, review and trim other unneeded dependencies.
llvm-svn: 125820
show more ...
|
#
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 ...
|
#
1af1d275 |
| 02-Feb-2011 |
Daniel Dunbar <daniel@zuster.org> |
Frontend: Add -header-include-file option, for allowing saving header include information to a file.
llvm-svn: 124750
|
#
27734fdb |
| 02-Feb-2011 |
Daniel Dunbar <daniel@zuster.org> |
Frontend: Factor out header include dumping (-H) into its own preprocessor callbacks class. - Aside from being generally cleaner, this also allows -H to work correctly in modes other than standar
Frontend: Factor out header include dumping (-H) into its own preprocessor callbacks class. - Aside from being generally cleaner, this also allows -H to work correctly in modes other than standard preprocessing (e.g., -c, -MM, etc.)
llvm-svn: 124723
show more ...
|
#
e326f9bb |
| 31-Jan-2011 |
Daniel Dunbar <daniel@zuster.org> |
Frontend: Add an explicit RemoveFileOnSignal flag argument, to control the automatic behavior (which is undesirable in a multithreaded context).
llvm-svn: 124612
|