History log of /llvm-project/clang/lib/Frontend/ASTUnit.cpp (Results 426 – 450 of 656)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 3a039e33 27-Aug-2011 Fariborz Jahanian <fjahanian@apple.com>

objective-c: Treat top-level objective-c declarations
, such as list of forward @class decls, in a DeclGroup
node. Deal with its consequence throught clang. This
is in preparation for more Sema work

objective-c: Treat top-level objective-c declarations
, such as list of forward @class decls, in a DeclGroup
node. Deal with its consequence throught clang. This
is in preparation for more Sema work ahead. // rdar://8843851.
Feel free to reverse if it breaks something important
and I am unavailable.

llvm-svn: 138709

show more ...


# 08142534 26-Aug-2011 Douglas Gregor <dgregor@apple.com>

Introduce support for a simple module import declaration, which
loads the named module. The syntax itself is intentionally hideous and
will be replaced at some later point with something more
palatab

Introduce support for a simple module import declaration, which
loads the named module. The syntax itself is intentionally hideous and
will be replaced at some later point with something more
palatable. For now, we're focusing on the semantics:
- Module imports are handled first by the preprocessor (to get macro
definitions) and then the same tokens are also handled by the parser
(to get declarations). If both happen (as in normal compilation),
the second one is redundant, because we currently have no way to
hide macros or declarations when loading a module. Chris gets credit
for this mad-but-workable scheme.
- The Preprocessor now holds on to a reference to a module loader,
which is responsible for loading named modules. CompilerInstance is
the only important module loader: it now knows how to create and
wire up an AST reader on demand to actually perform the module load.
- We search for modules in the include path, using the module name
with the suffix ".pcm" (precompiled module) for the file name. This
is a temporary hack; we hope to improve the situation in the
future.

llvm-svn: 138679

show more ...


# 2ed0ee1a 25-Aug-2011 Douglas Gregor <dgregor@apple.com>

Eliminate the -chained-pch flag and all of the frontend and libclang options associated with it. Chained PCH is the only way to build a PCH file that includes another PCH file

llvm-svn: 138597


# 36db4f96 25-Aug-2011 Douglas Gregor <dgregor@apple.com>

Remove the Chaining argument from the PCH/module generator. It's no longer used

llvm-svn: 138596


# 69f74f80 25-Aug-2011 Douglas Gregor <dgregor@apple.com>

Introduce a -cc1 option "-emit-module", that creates a binary module
from the given source. -emit-module behaves similarly to -emit-pch,
except that Sema is somewhat more strict about the contents of

Introduce a -cc1 option "-emit-module", that creates a binary module
from the given source. -emit-module behaves similarly to -emit-pch,
except that Sema is somewhat more strict about the contents of
-emit-module. In the future, there are likely to be more interesting
differences.

llvm-svn: 138595

show more ...


# 7aecbc76 25-Aug-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com>

Make Lexer::ComputePreamble accept a LangOptions parameter, otherwise it may be
out-of-sync how a file is compiled. Patch by Matthias Kleine!

llvm-svn: 138580


# 29cc642f 17-Aug-2011 Douglas Gregor <dgregor@apple.com>

In the AST file format, eliminate the CHAINED_METADATA record. Instead,
all AST files have a normal METADATA record that has the same form
regardless of whether we refer to a chained PCH or any other

In the AST file format, eliminate the CHAINED_METADATA record. Instead,
all AST files have a normal METADATA record that has the same form
regardless of whether we refer to a chained PCH or any other kind of
AST file.

Introduce the IMPORTS record, which describes all of the AST files
that are imported by this AST file, and how (as a module, a PCH file,
etc.). Currently, we emit at most one entry to this record, to support
chained PCH.

llvm-svn: 137869

show more ...


# 203f87cc 17-Aug-2011 NAKAMURA Takumi <geek4civic@gmail.com>

[MSVC] Fix a warning C4334 "'operator' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)".

llvm-svn: 137803


# 3f35bb2d 04-Aug-2011 Douglas Gregor <dgregor@apple.com>

Add a new libclang API to return a CXCompletionString for an arbitrary
cursor, from Connor Wakamo! Addresses <rdar://problem/9087798>.

llvm-svn: 136911


# 2c595adf 30-Jul-2011 Douglas Gregor <dgregor@apple.com>

When performing code completion after at @interface, allow both
already-defined and forward-declared results. Already-defined results
are fine because they could be the start of a category. Fixes
<rd

When performing code completion after at @interface, allow both
already-defined and forward-declared results. Already-defined results
are fine because they could be the start of a category. Fixes
<rdar://problem/9811691>.

llvm-svn: 136559

show more ...


# 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 ...


# b2b0823d 26-Jul-2011 Jonathan D. Turner <jonathan.d.turner@gmail.com>

This patch extends the previous patch by starting to incorporate more functionality, like lookup-by-name and exporting lookup tables, into the module manager. Methods now have documentation. A few

This patch extends the previous patch by starting to incorporate more functionality, like lookup-by-name and exporting lookup tables, into the module manager. Methods now have documentation. A few more functions have been switched over to the new iterator style and away from manual/explicit iteration. Ultimately we want to move away from name lookup here, as symlinks make filenames not a safe unique value, but we use it here as a stopgap before better measures are in place (namely instead using FileEntry* from a global FileManager).

llvm-svn: 136107

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


# 2214acd8 22-Jul-2011 Jonathan D. Turner <jonathan.d.turner@gmail.com>

Remove prepending of '$' to module names.

llvm-svn: 135775


# 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


# 55e75574 21-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com>

For ASTUnit::Save, write the AST to a temporary and then rename it to the actual filename.
Should avoid race conditions. Addresses rdar://9788943.

llvm-svn: 135691


# 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


# 4a9c39a2 21-Jul-2011 Douglas Gregor <dgregor@apple.com>

Rework the detailed preprocessing record to separate preprocessing
entities generated directly by the preprocessor from those loaded from
the external source (e.g., the ASTReader). By separating thes

Rework the detailed preprocessing record to separate preprocessing
entities generated directly by the preprocessor from those loaded from
the external source (e.g., the ASTReader). By separating these two
sets of entities into different vectors, we allow both to grow
independently, and eliminate the need for preallocating all of the
loaded preprocessing entities. This is similar to the way the recent
SourceManager refactoring treats FileIDs and the source location
address space.

As part of this, switch over to building a continuous range map to
track preprocessing entities.

llvm-svn: 135646

show more ...


# 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 ...


# 717d7edd 18-Jul-2011 Frits van Bommel <fvbommel@gmail.com>

Migrate LLVM and Clang to use the new makeArrayRef(...) functions where previously explicit non-default constructors were used.
Mostly mechanical with some manual reformatting.

llvm-svn: 135390


# 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 ...


# 2132584d 07-Jul-2011 Douglas Gregor <dgregor@apple.com>

Introduce a new libclang aPI function,
clang_codeCompleteGetContexts(), that provides the client with
information about the context in which code completion has occurred
and what kinds of entities ma

Introduce a new libclang aPI function,
clang_codeCompleteGetContexts(), that provides the client with
information about the context in which code completion has occurred
and what kinds of entities make sense as completions at that
point. Patch by Connor Wakamo!

llvm-svn: 134615

show more ...


# 8a60bbe1 06-Jul-2011 Douglas Gregor <dgregor@apple.com>

Keep track of when "unrecoverable" errors occur, then allow
clang_saveTranslationUnit() to save a PCH file if the only errors it
contains are recoverable errors. Fixes <rdar://problem/9727804>.

llvm

Keep track of when "unrecoverable" errors occur, then allow
clang_saveTranslationUnit() to save a PCH file if the only errors it
contains are recoverable errors. Fixes <rdar://problem/9727804>.

llvm-svn: 134503

show more ...


# 30c80fa3 06-Jul-2011 Douglas Gregor <dgregor@apple.com>

libclang: Allow callers of clang_saveTranslationUnit() to distinguish
between different classes of errors. Addresses most of
<rdar://problem/9660328>.

llvm-svn: 134495


1...<<11121314151617181920>>...27