Age | Commit message (Collapse) | Author |
|
We can pass such an input-file-visiting ASTReaderListener to ASTReader::readASTFileControlBlock.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181238 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181113 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
- Sema tests added and CodeGen tests are pending
Differential Revision: http://llvm-reviews.chandlerc.com/D728
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181101 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
consistency with ObjCInterfaceDecl::getSuperClassLoc()
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181064 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Add serialization for captured statements and captured decls. Also add
a const_capture_iterator to CapturedStmt.
Test contributed by Wei Pan
Differential Revision: http://llvm-reviews.chandlerc.com/D727
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181048 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
provided.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181039 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
the actual parser and support arbitrary id-expressions.
We're actually basically set up to do arbitrary expressions here
if we wanted to.
Assembly operands permit things like A::x to be written regardless
of language mode, which forces us to embellish the evaluation
context logic somewhat. The logic here under template instantiation
is incorrect; we need to preserve the fact that an expression was
unevaluated. Of course, template instantiation in general is fishy
here because we have no way of delaying semantic analysis in the
MC parser. It's all just fishy.
I've also fixed the serialization of MS asm statements.
This commit depends on an LLVM commit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180976 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
are now two distinct canonical 'AutoType's: one is the undeduced 'auto'
placeholder type, and the other is a deduced-but-dependent type. All
deduced-to-a-non-dependent-type cases are still non-canonical.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180789 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
if modules are enabled.
The preprocessing record becomes important when modules are enabled, since it is used to calculate the
module cache hash.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180635 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
incomplete, missing the definition from a module.
-Make sure that a deserialized external decl gets added to the TU scope.
-When associating an identifier with a set of decls, use the most recent local ones,
if they exist, otherwise associating decls from modules (that came after a local one)
will lead to an incomplete reconstructed re-declaration chain.
rdar://13712705
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180634 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180610 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Add a CXXDefaultInitExpr, analogous to CXXDefaultArgExpr, and use it both in
CXXCtorInitializers and in InitListExprs to represent a default initializer.
There's an additional complication here: because the default initializer can
refer to the initialized object via its 'this' pointer, we need to make sure
that 'this' points to the right thing within the evaluation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179958 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Typo correction for an unqualified name needs to walk through all of the identifier tables of all modules.
When we have a global index, just walk its identifier table only.
rdar://13425732
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179730 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
2 methods (with a particular selector) inside categories.
This is done by extending ObjCMethodList (which is only used by the global method pool) to have 2 extra bits of information.
We will later take advantage of this info in global method pool for the overridden methods calculation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179652 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Add CapturedDecl to be the DeclContext for CapturedStmt, and perform semantic
analysis. Currently captures all variables by reference.
TODO: templates
Author: Ben Langmuir <ben.langmuir@intel.com>
Differential Revision: http://llvm-reviews.chandlerc.com/D433
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179618 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
CapturedStmt can be used to implement generic function outlining as described in
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-January/027540.html.
CapturedStmt is not exposed to the C api.
Serialization and template support are pending.
Author: Wei Pan <wei.pan@intel.com>
Differential Revision: http://llvm-reviews.chandlerc.com/D370
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179615 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
references thereto.
Patch by Tong Shen!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179585 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
the AST.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179447 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
least one of the macro definitions comes from a non-system header.
This slightly weakens the heuristic introduced in r178109.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179411 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Patch by Amin Shali.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179180 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
don't serialize a lookup map for the translation unit outside C++ mode, so we
can't tell when lookup within the TU needs to look within modules. Only apply
the fix outside C++ mode, and only to the translation unit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178706 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
http://lab.llvm.org:8011/builders/clang-x86_64-darwin10-gdb went back green
before it processed the reverted 178663, so it could not have been the culprit.
Revert "Revert 178663."
This reverts commit 4f8a3eb2ce5d4ba422483439e20c8cbb4d953a41.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178682 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Looks like it broke http://lab.llvm.org:8011/builders/clang-x86_64-darwin10-gdb
Revert "Don't compute a patched/semantic storage class."
This reverts commit 8f187f62cb0487d31bc4afdfcd47e11fe9a51d05.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178681 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
of only lexically.
Syntactically means the function macro parameter names do not need to use the same
identifiers in order for the definitions to be considered identical.
Syntactic equivalence is a microsoft extension for macro redefinitions and we'll also
use this kind of comparison to check for ambiguous macros coming from modules.
rdar://13562254
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178671 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
For variables and functions clang used to store two storage classes. The one
"as written" in the code and a patched one, which, for example, propagates
static to the following decls.
This apparently is from the days clang lacked linkage computation. It is now
redundant and this patch removes it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178663 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
definition will be used as the "exported" one.
Fixes rdar://13562262
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178622 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
about 'isa' ivar being explicitely accessed
when base is a user class object reference.
// rdar://13503456
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178562 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
is accessed via accessing 'isa' ivar to use
object_getClass/object_setClass apis.
// rdar://13503456
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178282 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
affect the translation unit that
imports the module.
Getting diagnostic sections from modules properly working is a fixme.
rdar://13516663
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178151 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
information about a particular module file.
This option can be useful for end users who want to know why they
ended up with a ton of different variants of the "std" module in their
module cache. This problem should go away over time, as we reduce the
need for module variants, but it will never go away entirely.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178148 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
this is a case where
the system macro uses a not identical definition compared to a macro from the clang headers.
For example (these come from different modules):
\#define LONG_MAX __LONG_MAX__ (clang's limits.h)
\#define LONG_MAX 0x7fffffffffffffffL (system's limits.h)
in which case don't mark them ambiguous to avoid the "ambiguous macro expansion" warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178109 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178107 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
It's not used anymore.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178106 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
MacroDirective's subclasses.
For each macro directive (define, undefine, visibility) have a separate object that gets chained
to the macro directive history. This has several benefits:
-No need to mutate a MacroDirective when there is a undefine/visibility directive. Stuff like
PPMutationListener become unnecessary.
-No need to keep extra source locations for the undef/visibility locations for the define directive object
(which is the majority of the directives)
-Much easier to hide/unhide a section in the macro directive history.
-Easier to track the effects of the directives across different submodules.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178037 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
-Serialize the macro directives history into its own section
-Get rid of the macro updates section
-When de/serializing an identifier from a module, associate only one macro per
submodule that defined+exported it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177761 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
submodule ID.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177760 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
interaction to eliminate a pile of extraneous stats().
The refactoring in r177367 introduced a serious performance bug where
the "lazy" resolution of module file names in the global module index
to actual module file entries in the module manager would perform
repeated negative stats(). The new interaction requires the module
manager to inform the global module index when a module file has been
loaded, eliminating the extraneous stat()s and a bunch of bookkeeping
on both sides.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177750 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177705 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177657 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
and warn when a newly-imported module conflicts with an already-imported module.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177577 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
don't depend on any other modules or PCH files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177542 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
deserialized correctly.
This fixes regressions introduced in r177466 that caused several
module tests to fail sporadically.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177481 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Configuration macros are macros that are intended to alter how a
module works, such that we need to build different module variants
for different values of these macros. A module can declare its
configuration macros, in which case we will complain if the definition
of a configation macro on the command line (or lack thereof) differs
from the current preprocessor state at the point where the module is
imported. This should eliminate some surprises when enabling modules,
because "#define CONFIG_MACRO ..." followed by "#include
<module/header.h>" would silently ignore the CONFIG_MACRO setting. At
least it will no longer be silent about it.
Configuration macros are eventually intended to help reduce the number
of module variants that need to be built. When the list of
configuration macros for a module is exhaustive, we only need to
consider the settings for those macros when building/finding the
module, which can help isolate modules for various project-specific -D
flags that should never affect how modules are build (but currently do).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177466 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
out-of-date rather than missing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177369 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
and the global module index.
The global module index was querying the file manager for each of the
module files it knows about at load time, to prune out any out-of-date
information. The file manager would then cache the results of the
stat() falls used to find that module file.
Later, the same translation unit could end up trying to import one of the
module files that had previously been ignored by the module cache, but
after some other Clang instance rebuilt the module file to bring it
up-to-date. The stale stat() results in the file manager would
trigger a second rebuild of the already-up-to-date module, causing
failures down the line.
The global module index now lazily resolves its module file references
to actual AST reader module files only after the module file has been
loaded, eliminating the stat-caching race. Moreover, the AST reader
can communicate to its caller that a module file is missing (rather
than simply being out-of-date), allowing us to simplify the
module-loading logic and allowing the compiler to recover if a
dependent module file ends up getting deleted.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177367 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Report and suggested fix by Tom Honermann!
http://llvm.org/bugs/show_bug.cgi?id=13020
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177330 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
These will be available in the current translation unit anyway, for
modules they only waste space and deserialization time.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177197 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
dependency for PCH/modules.
When we're building a precompiled header or module against an SDK on
Darwin, there will be a file SDKSettings.plist in the sysroot. Since
stat()'ing every system header on which a module or PCH file depends
is performance suicide, we instead stat() just SDKSettings.plist. This
hack works well on Darwin; it's unclear how we want to handle this on
other platforms. If there is a canonical file, we should use it; if
not, we either have to take the performance hit of stat()'ing system
headers repeatedly or roll the dice by not checking anything.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177194 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177001 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
don't write them out to the module file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177000 91177308-0d34-0410-b5e6-96231b3b80d8
|