Argyrios Kyrtzidis
7f76d11dcc
Store the pending implicit instantiations in the PCH and perform them at the end of the translation unit that
...
included the PCH, as God intended.
llvm-svn: 110324
2010-08-05 09:48:16 +00:00
Argyrios Kyrtzidis
ee1afa3082
Support #pragma weak for PCH.
...
llvm-svn: 110323
2010-08-05 09:48:08 +00:00
Douglas Gregor
b68bc59a2d
Give clang_codeCompleteAt() an "options" parameter, and add a new
...
flags enumeration + default-generating function that allows
code-completion to be customized via the libclang API.
Plus, turn on spell-checking when performing code completion.
llvm-svn: 110319
2010-08-05 09:09:23 +00:00
John McCall
42d7d19710
TDK_InconsistentQuals is really totally different from TDK_Inconsistent.
...
Rename it to TDK_Underqualified to avoid this sort of confusion and give it
its own diagnostic.
llvm-svn: 110318
2010-08-05 09:05:08 +00:00
Eli Friedman
570024a8d9
Implement #pragma GCC visibility.
...
llvm-svn: 110315
2010-08-05 06:57:20 +00:00
Nick Lewycky
ef7c0ffe40
Remove the warning for variables declared in the if-expression being used in
...
the else clause. The problem is that it's overly zealous and will respond to
uses in assignments, or after assignments. We should bring this back once we
can do it right. Fixes PR7100.
llvm-svn: 110314
2010-08-05 06:27:49 +00:00
Eli Friedman
a0fd306a94
Add support for -Woverlength-strings.
...
llvm-svn: 110305
2010-08-05 02:57:44 +00:00
Eli Friedman
a170cd6257
Get rid of isObjectType; when C++ says "object type", it generally
...
just means "not a function type", not "not a function type or void". This
changes behavior slightly, but generally in a way which accepts more code.
llvm-svn: 110303
2010-08-05 02:49:48 +00:00
Bruno Cardoso Lopes
d81ef1c85c
Add -mavx and -mno-avx command line support
...
llvm-svn: 110265
2010-08-04 22:29:13 +00:00
Sebastian Redl
6e1a2a0693
Bring stats for the method pool back.
...
llvm-svn: 110247
2010-08-04 21:22:45 +00:00
Sebastian Redl
ada023c5d6
Implement per-file reading of the selector table. This disables statistics about method pool hits for the moment.
...
llvm-svn: 110245
2010-08-04 20:40:17 +00:00
Ted Kremenek
0950212b50
Add CFGStmtMap, which defines a mapping from Stmt* to CFGBlock*. The immediate intended use is in the unreachable code analysis.
...
llvm-svn: 110230
2010-08-04 18:23:15 +00:00
Sebastian Redl
d95a56e50d
When chaining, only write interesting selectors to the PCH.
...
llvm-svn: 110229
2010-08-04 18:21:41 +00:00
Sebastian Redl
834bb971f6
Store the IDs of selectors in the PCH file explicitly.
...
llvm-svn: 110219
2010-08-04 17:20:04 +00:00
Douglas Gregor
8e984da800
Add code-completion support directly to ASTUnit, which performs code
...
completion within the translation unit using the same command-line
arguments for parsing the translation unit. Eventually, we'll reuse
the precompiled preamble to improve code-completion performance, and
this also gives us a place to cache results.
Expose this function via the new libclang function
clang_codeCompleteAt(), which performs the code completion within a
CXTranslationUnit. The completion occurs in-process
(clang_codeCompletion() runs code completion out-of-process).
llvm-svn: 110210
2010-08-04 16:47:14 +00:00
Jordy Rose
c36df4d0b7
Change the checker callback cache in GRExprEngine to be more compact (and IMHO a little easier to understand), and add the same sort of caching for EvalAssume (tied for least-used callback), mostly as proof-of-concept.
...
Before we go further with these, we should figure out a way to reuse the visit-and-cache code in CheckerVisit.
llvm-svn: 110191
2010-08-04 07:10:57 +00:00
Eric Christopher
1d3dc20aaa
Accept and ignore (for now) -funroll-loops.
...
llvm-svn: 110190
2010-08-04 06:55:48 +00:00
Douglas Gregor
bb420abd0b
When we try (but fail) to build a precompiled preamble, wait for a
...
short "cooling off" period (defaulting to 5 reparses) before trying to
build a precompiled preamble again. Previously, if we failed to build
the precompiled preamble at any time, we just gave up the whole
charade any never tried again.
llvm-svn: 110187
2010-08-04 05:53:38 +00:00
Bruno Cardoso Lopes
6586724f71
Add more AVX 256-bit intrinsics and test cases for them
...
llvm-svn: 110178
2010-08-04 01:11:26 +00:00
John McCall
66a8759400
Look through using declarations when deciding whether to use an operator
...
delete for a virtual destructor. Diagnose ambiguities.
Fixes PR7803.
llvm-svn: 110173
2010-08-04 00:31:26 +00:00
Sebastian Redl
a19a67f899
Incomplete promotion of selector info to per-file data.
...
Store all selectors in the selector hash table instead of only those from the method pool.
llvm-svn: 110158
2010-08-03 21:58:15 +00:00
Nate Begeman
f568b074db
Add support for VFP status & control operations for ARM.
...
llvm-svn: 110153
2010-08-03 21:32:34 +00:00
Jordy Rose
6e6f6e2cc3
Remove DoneEvaluating field (unused since r90296)
...
llvm-svn: 110141
2010-08-03 20:45:31 +00:00
Jordy Rose
ddec092641
Makes GRState::makeWithStore private, to encourage clients to make store changes through GRState instead of directly accessing the StoreManager. Also adds cover methods for InvalidateRegion(s) and EnterStackFrame to GRState.
...
This is in preparation for proposed region change notifications. No functionality change.
llvm-svn: 110137
2010-08-03 20:44:35 +00:00
Douglas Gregor
e9db88f991
When using a precompiled preamble, keep track of the top-level
...
declarations that we saw when creating the precompiled preamble, and
provide those declarations in addition to the declarations parsed in
the main source file when traversing top-level declarations. This
makes the use of precompiled preambles a pure optimization, rather
than changing the semantics of the parsed translation unit.
llvm-svn: 110131
2010-08-03 19:06:41 +00:00
Argyrios Kyrtzidis
839bbacfb2
Apart from storing/retrieving the previous redeclaration from PCH, also store/retrieve the most recent
...
redeclaration. That way we are sure that the full redeclarations chain is loaded.
When using chained PCHs, first declarations point to the most recent redeclarations in the same PCH.
To address this use a REDECLS_UPDATE_LATEST record block to keep track of which first declarations need
to point to a most recent redeclaration in another PCH.
llvm-svn: 110125
2010-08-03 17:30:10 +00:00
Argyrios Kyrtzidis
a6430cfe48
Introduce getMostRecentDeclaration() and getFirstDeclaration() for RedeclarableTemplateDecl.
...
llvm-svn: 110124
2010-08-03 17:30:01 +00:00
Douglas Gregor
48c8cd3fd0
Reshuffle the PCH generator action and consumer, so that we can re-use
...
it while generating precompiled preambles. No functionality change.
llvm-svn: 110108
2010-08-03 08:14:03 +00:00
Zhongxing Xu
42b8c30de6
Allow offsets to be negative. Out-of-bound cases are checked elsewhere. We
...
shouldn't put restrictions in store manager.
llvm-svn: 110106
2010-08-03 06:34:25 +00:00
Zhongxing Xu
83734e46ce
Pull the region offset computation logic into a single method.
...
llvm-svn: 110102
2010-08-03 04:52:05 +00:00
Bruno Cardoso Lopes
1f927ccaa2
Support x86 AVX 256-bit instructions built-ins. Right now support all of them, but
...
as soon as we properly codegen the simple vector operations, remove the
unnecessary built-ins/intrinsics from clang and llvm. Also add tests for the new
built-ins
llvm-svn: 110096
2010-08-03 01:57:18 +00:00
Tom Care
44081fbc6c
Changed GRExprEngine to pass down a reference to itself when checkers are doing postanalysis. This allows the checker to gather information about the state of the engine when it has finished.
...
- Exposed the worklist and BlockAborted flag in GRCoreEngine
- Changed postanalysis checkers to use the new infrastructure
llvm-svn: 110095
2010-08-03 01:55:07 +00:00
Ted Kremenek
4a2b237967
Add -cc1 option '-unoptimized-cfg' to toggle using a CFG (for static analysis) that doesn't prune CFG edges.
...
llvm-svn: 110087
2010-08-03 00:09:51 +00:00
Ted Kremenek
dc03bd0894
Add 'AnalysisContext::getUnoptimizedCFG()' to allow clients to get access to the original
...
CFG without any edges pruned out because of trivially solvable conditions (e.g., 'if (0)').
llvm-svn: 110085
2010-08-02 23:46:59 +00:00
John McCall
4a33fa95c0
Labels (and case statement) don't create independent scope parents for the
...
purposes of the jump checker. Also extend Ted's iteration fix to labels.
Fixes PR7789.
llvm-svn: 110082
2010-08-02 23:33:14 +00:00
John McCall
8b0f4ff317
Further adjustments to -Wglobal-constructors; works for references and direct
...
initializations now.
llvm-svn: 110063
2010-08-02 21:13:48 +00:00
Douglas Gregor
d9a30af25b
When using a precompiled preamble, save the diagnostics produced when
...
creating the preamble and "replay" them when reusing the
preamble. Also, fix a thinko in the copying of the preamble when
building the precompiled preamble.
llvm-svn: 110061
2010-08-02 20:51:39 +00:00
Sebastian Redl
78f5177d37
Query only the latest version of an identifier in the PCH chain. Make sure this version holds the entire declaration chain. This is a much saner solution than trying to merge the info from all elements, and makes redeclarations work properly. Expand the declarations test case to cover more compliated cases.
...
llvm-svn: 110052
2010-08-02 18:30:12 +00:00
Sebastian Redl
9d8854ec60
Remove mutable data on TagType and InjectedClassNameType, by instead walking the declaration chain in search of a definition. This is necessary for a sane chained PCH implementation. No observable performance change on Carbon.h syntax-only, and bootstraps cleanly.
...
llvm-svn: 110051
2010-08-02 18:27:05 +00:00
Daniel Dunbar
2be96746b4
Frontend: Change PluginASTAction::ParseArgs to take a CompilerInstance object
...
for use in reporting diagnostics.
- We don't want to use the Action's own CompilerInstance, because that is only
initialized during file processing and I like that invariant.
Also, if ParseArgs returns false then abandon execution.
Also, remove unused PluginASTAction::PrintHelp virtual method.
llvm-svn: 110039
2010-08-02 15:31:28 +00:00
Argyrios Kyrtzidis
cd948c1df5
You actually have to include a header in order to use a symbol, it's so 90s..
...
llvm-svn: 110034
2010-08-02 07:46:27 +00:00
Argyrios Kyrtzidis
ea247181ab
Use llvm_unreachable.
...
llvm-svn: 110033
2010-08-02 07:31:21 +00:00
Argyrios Kyrtzidis
d46687f200
Shut up warnings in Release build.
...
llvm-svn: 110032
2010-08-02 07:24:29 +00:00
Argyrios Kyrtzidis
2d68810caf
Read/write in PCH Sema's StdNamespace and StdBadAlloc and use a LazyDeclPtr for them that will deserialize them when needed.
...
llvm-svn: 110031
2010-08-02 07:14:54 +00:00
Daniel Dunbar
cc7df6cc7b
Driver: Move HostInfo::lookupTypeForExtension to ToolChain::LookupTypeForExtension.
...
llvm-svn: 110024
2010-08-02 05:43:56 +00:00
Daniel Dunbar
a36c2b3a62
Driver: Give Build{Universal,}Actions access to the default host tool chain. I
...
avoided this originally to enforce that the driver actions aren't toolchain
dependent, but it isn't worth the cumbersone additional hostinfo split.
llvm-svn: 110023
2010-08-02 05:43:51 +00:00
Zhongxing Xu
fd91d27630
Improve flat store: MemRegion::getAsOffset() computes a region's offset within
...
the top-level object. FlatStore now can bind and retrieve element and field
regions.
PR7297 is fixed by flat store.
llvm-svn: 110020
2010-08-02 04:56:14 +00:00
Daniel Dunbar
7fbaf53470
Driver: Add Compilation::addCommand and switch tools to using it, now that we
...
don't have to deal with nested jobs.
llvm-svn: 110015
2010-08-02 02:38:28 +00:00
Daniel Dunbar
b785d74080
Driver: Eliminate PipedJob, which is now unused.
...
llvm-svn: 110014
2010-08-02 02:38:25 +00:00
Daniel Dunbar
bffefc015e
Driver: Eliminate now unnecessary tool hooks for whether they accept piped input/output.
...
llvm-svn: 110012
2010-08-02 02:38:18 +00:00