Граф коммитов

7517 Коммитов

Автор SHA1 Сообщение Дата
Peter Collingbourne 1b7255de78 Move ExecuteCompilerInvocation to a new library FrontendTool
r110903 introduced a dependency from Frontend to every library that
declared an Action by introducing Action references that previously
resided in the driver in the file ExecuteCompilerInvocation.cpp.
This patch moves ExecuteCompilerInvocation to a new library named
FrontendTool which is intended to bear these dependencies.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111873 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 00:31:22 +00:00
John McCall b556db435f Don't call this field 'Expr', it changes lookup in illegal ways that
GCC diagnoses.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111865 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-23 23:46:51 +00:00
John McCall 9ae2f076ca Kill off ExprArg (now just Expr*) and StmtArg (now just Stmt*).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111863 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-23 23:25:46 +00:00
Douglas Gregor 58ddb60f40 Introduce new libclang API functions that determine the availability
of a cursor or code-completion result, e.g., whether that result
refers to an unavailable, deleted, or deprecated declaration.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111858 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-23 23:00:57 +00:00
Fariborz Jahanian d097be8f81 Handling remaining rule for synthesize bitfields in
class extensions (nonfragile-abi2).For every class @interface and class
extension @interface, if the last ivar is a bitfield of any type,
then add an implicit `char :0` ivar to the end of that interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111857 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-23 22:46:52 +00:00
Daniel Dunbar 00577ada44 Driver: Move Clang "triple" computation routines to method on the
ToolChain. This fixes a potenial bad cast when running Clang on PPC code, since
the tool chain in effect is not a subclass of the Darwin one, but we were
treating it like it was.
 - This introduces some gross code duplication, but the right fix for it is to
   just move the Driver to start depending on the targets in libBasic, so I am
   not planning on fixing it immediately.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111856 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-23 22:35:37 +00:00
Douglas Gregor fb6294123b Introduce a code-completion hook for the Objective-C collection
argument in a for-each statement (e.g., "for (id x in <blah>)"), which
restricts the expression completions provided to Objective-C types (or
class types in C++).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111843 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-23 21:17:50 +00:00
Tom Care db34ab7096 Several small changes to PseudoConstantAnalysis and the way IdempotentOperationChecker uses it.
- Psuedo -> Pseudo (doh...)
- C++ reference support
- Added pseudoconstant test case for __block vars
- Separated out static local checking from pseudoconstant analysis and generalized to non-local checking
- Added missing test cases for storage false positives

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111832 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-23 19:51:57 +00:00
Fariborz Jahanian 000835d0b0 Support for IRGen of synthesize bitfield ivars in
objc-nonfragile-abi2 (radar 7824380).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111823 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-23 18:51:39 +00:00
Douglas Gregor 2ccccb3ff4 Introduce a new code-completion point when we're parsing a
declarator. Here, we can only see a few things (e.g., cvr-qualifiers,
nested name specifiers) and we do not want to provide other non-macro
completions. Previously, we would end up in recovery mode and would
provide a large number of non-relevant completions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111818 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-23 18:23:48 +00:00
Douglas Gregor 11add9b2e9 Add XML for CXXConstructExpr, from Benoit Belley!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111808 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-23 14:44:46 +00:00
John McCall 2b5289b6fd Push DeclGroupRefs and TemplateNames in an opaque but type-safe way
through the parser.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111800 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-23 07:28:44 +00:00
John McCall 1f58816e65 Kill off Parser::TemplateParameterList to avoid misparses.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111796 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-23 06:53:58 +00:00
John McCall ca0408fb49 Sundry incremental steps towards killing off Action.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111795 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-23 06:44:23 +00:00
John McCall 0bab0cdab7 Abstract out everything having to do with member pointers into the ABI
class;  they should just be completely opaque throughout IR gen now,
although I haven't really audited that.

Fix a bug apparently inherited from gcc-4.2 where we failed to null-check
member data pointers when performing derived-to-base or base-to-derived
conversions on them.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111789 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-23 01:21:21 +00:00
Douglas Gregor db68e28c05 Eliminate a stale assertion. Fixes Clang self-host.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111782 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-22 18:26:35 +00:00
John McCall ee79a4c30e The ARM C++ ABI is sufficiently different from the Itanium C++ ABI that
it deserves its own enumerator.  Obviously the implementations should
closely follow the Itanium ABI except in cases of divergence.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111749 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-21 22:46:04 +00:00
Michael J. Spencer ff58e3610f Visual Studio tools used on win32 hosts when targeting win32.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111748 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-21 21:55:07 +00:00
John McCall d226f65006 DeclPtrTy -> Decl *
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111733 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-21 09:40:31 +00:00
Argyrios Kyrtzidis a60786b46e Fix an issue with writing to PCH another included PCH, introduced by the "using an AST on-disk hash table for name lookup" commit.
When including a PCH and later re-emitting to another PCH, the name lookup tables of DeclContexts
may be incomplete, since we now lazily deserialize the visible decls of a particular name.
Fix the issue by iterating over the un-deserialized visible decls and completing the lookup tables
of DeclContexts before writing them out.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111698 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-20 23:35:55 +00:00
Argyrios Kyrtzidis f08b1bb341 Add an iterator to OnDiskChainedHashTable to allow iterating over all the key/data pairs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111697 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-20 23:31:11 +00:00
Fariborz Jahanian 2c18bb7c9f objective-c ivar refactoring patch. Iterations
over ivars for a varienty of puposes is now
consolidated into two small routines; DeepCollectObjCIvars
and ShallowCollectObjCIvars. 


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111679 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-20 21:21:08 +00:00
Dan Gohman fa78c91c54 Add a comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111674 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-20 20:37:16 +00:00
John McCall 1951085672 Another step in the process of making the parser depend on Sema:
- move DeclSpec &c into the Sema library
  - move ParseAST into the Parse library
Reflect this change in a thousand different includes.
Reflect this change in the link orders.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111667 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-20 18:27:03 +00:00
Argyrios Kyrtzidis 074dcc8ef8 Use the AST on-disk hash table for name lookup inside a DeclContext.
*Huge* improvement over the amount of deserializing that we do for C++ lookup.
e.g, if he have the Carbon header precompiled and include it on a file containing this:

int x;

these are the before/after stats:

BEFORE:

*** AST File Statistics:
  578 stat cache hits
  4 stat cache misses
  548/30654 source location entries read (1.787695%)
  15907/16501 types read (96.400223%)
  53525/59955 declarations read (89.275291%)
  33993/43525 identifiers read (78.099945%)
  41516/51891 statements read (80.006165%)
  77/5317 macros read (1.448185%)
  0/6335 lexical declcontexts read (0.000000%)
  1/5424 visible declcontexts read (0.018437%)

AFTER using the on-disk table:

*** AST File Statistics:
  578 stat cache hits
  4 stat cache misses
  548/30654 source location entries read (1.787695%)
  10/16501 types read (0.060602%)
  9/59955 declarations read (0.015011%)
  161/43525 identifiers read (0.369902%)
  20/51891 statements read (0.038542%)
  6/5317 macros read (0.112846%)
  0/6335 lexical declcontexts read (0.000000%)
  2/5424 visible declcontexts read (0.036873%)

There's only one issue affecting mostly the precompiled preambles which I will address soon.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111636 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-20 16:04:35 +00:00
Argyrios Kyrtzidis 5d26768e26 Introduce the mechanism for building an AST on-disk hash table for name lookup inside a DeclContext but don't use it yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111635 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-20 16:04:27 +00:00
Argyrios Kyrtzidis eb3f04e60f Refactoring; move the functionality of ASTWriter::GetOrCreateTypeID to the more generic
MakeTypeID template function which accepts a type and a function object that returns a TypeIdx.

MakeTypeID is in PCHCommon.h so that it can be used by ASTReader too.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111634 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-20 16:04:20 +00:00
Argyrios Kyrtzidis 7fb35182f4 Introduce ASTWriter::GetOrCreateTypeID and move most of the functionality of AddTypeRef there.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111633 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-20 16:04:14 +00:00
Argyrios Kyrtzidis 26fca90786 A bit of refactoring; Introduce ASTWriter::GetOrCreateTypeIdx and move the emission of types there.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111632 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-20 16:04:09 +00:00
Argyrios Kyrtzidis 01b81c4d07 Rename TypeIDs -> TypeIdxs. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111631 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-20 16:04:04 +00:00
Argyrios Kyrtzidis c8e5d51f51 serialization::TypeID is used with or without qualifiers, both as index and as index + qualifiers.
Disambiguate and provide some type safety by using a new class TypeIdx for the "TypeID as index" semantics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111630 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-20 16:03:59 +00:00
Ted Kremenek c9c6b904f3 Update help text for -cc1 -unoptimized-cfg.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111615 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-20 05:53:47 +00:00
Douglas Gregor 2283d79155 When performing code-completion in the presence of a preamble, make
sure to (1) actually use the remapped files we were given rather
than old data, and (2) keep the remapped files alive until the
code-completion results are destroyed. Big thanks to Daniel for the
test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111597 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-20 00:59:43 +00:00
John McCall 096832c5ed Regularize the API for accessing explicit template arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111584 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-19 23:49:38 +00:00
Douglas Gregor 41a621d00e Intialize all of the code-generation options
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111560 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-19 20:50:45 +00:00
Douglas Gregor 4786c15f49 Add machine-parseable Fix-It output as part of diagnostics, under the
flag -fdiagnostics-parseable-fixits, from Eelis van der Weegen!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111557 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-19 20:24:43 +00:00
Eli Friedman a87cdc03f4 Remove default argument from operator delete; per report on cfe-dev, fixes
compilation with MSVC.  Note that on other platforms, the operator delete in
question is never used because we compile with -fno-exceptions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111514 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-19 06:13:01 +00:00
Sean Hunt 1bf8d6f3a9 Add a missing initializer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111510 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-19 03:06:50 +00:00
Charles Davis 20cf717034 Add some enum goodness as requested by Chris. Now instead of storing the
active C++ ABI as a raw string, we store it as an enum. This should improve
performance somewhat.

And yes, this time, I started from a clean build directory, and
all the tests passed. :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111507 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-19 02:18:14 +00:00
Douglas Gregor 671947b18d Plug a leak when precompiling the preamble in ASTUnit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111504 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-19 01:33:06 +00:00
Ted Kremenek 58f281f7d5 Add warning for functions/blocks that have attribute 'noreturn' but return a non-void result. (<rdar://problem/7562925>)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111492 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-19 00:52:13 +00:00
Douglas Gregor 501c103656 Make sure to deallocate the identifier lookup tables and selector tables
when destroying an ASTReader. Plugs a leak that shows up in libclang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111488 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-19 00:28:17 +00:00
Sebastian Redl 8538e8d43a Rename pch namespace to serialization.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111478 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 23:57:32 +00:00
Sebastian Redl 05a0760532 Rename PCHBitCodes.h -> ASTBitCodes.h
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111476 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 23:57:26 +00:00
Sebastian Redl f29f0a28c4 Rename stuff in PCHBitCodes.h
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111475 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 23:57:22 +00:00
Sebastian Redl 6ab7cd853e Rename the ASTReader header files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111474 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 23:57:17 +00:00
Sebastian Redl 3c7f413460 More PCH -> AST renaming.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111472 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 23:57:06 +00:00
Sebastian Redl 571db7f0cb Rename various classes from PCH to AST.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111471 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 23:56:56 +00:00
Sebastian Redl 60adf4acf4 Rename PCHStmtReader -> ASTStmtReader.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111470 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 23:56:52 +00:00
Sebastian Redl d527cc06d7 Rename PCHDeclReader -> ASTDeclReader.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111469 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 23:56:48 +00:00