Argyrios Kyrtzidis
b972858068
Introduce command line option -dump-deserialized-decls which is used to print the PCH decls that got deserialized, for testing purposes.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116503 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-14 20:14:18 +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
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
Douglas Gregor
f18d0d8b39
Teach CompilerInstance to create and hold on to the Sema object used
...
for parsing, so that it can persist beyond the lifetime of the parsing
call.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110978 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-12 23:31:19 +00:00
Sebastian Redl
ffaab3e2bb
Make macro weirdness in chained PCH work. This required changing the way PCHReader and PCHWriter are initialized to correctly pick up all initializer. On the upside, this means that there is far less repetition in the dependent PCH now.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109823 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-30 00:29:29 +00:00
Douglas Gregor
fae3b2f474
Implement -fno-validate-pch at the -cc1 level, which suppresses most
...
of the usual consistency checks used to determine when a precompiled
header is incompatible with the translation unit it's being loaded
into.
Enable this option when loading a precompiled preamble, because the
preamble loader will be performing all of this checking itself. Enable
the preamble-based test now that it's working.
This option is also useful for debugging Clang's PCH
(<rdar://problem/7532213>).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109475 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-27 00:27:13 +00:00
Sebastian Redl
77f4603c8b
When given the -chained-pch option and a previous PCH file, have the PCHWriter emit a CHAINED_METADATA record instead of METADATA, and write a link to the previous file there.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108014 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-09 21:00:24 +00:00
Daniel Dunbar
faddc3e53a
Frontend: Add FrontendAction support for handling LLVM IR inputs.
...
- These inputs follow an abbreviated execution path, but are still worth handling by FrontendAction so they reuse all the other clang -cc1 features.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105582 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-07 23:26:47 +00:00
Daniel Dunbar
685ac6665a
FrontendAction: Track active file kind.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105581 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-07 23:25:49 +00:00
Daniel Dunbar
eb58d831b2
Frontend: Rename hasASTSupport to hasASTFileSupport, which is more accurate.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105580 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-07 23:24:43 +00:00
Daniel Dunbar
2056048f0f
Frontend: Move some initialization from CompilerInstance to FrontendAction, to parallel what is done for AST inputs.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105579 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-07 23:23:50 +00:00
Daniel Dunbar
d3598a6571
Frontend: Change FrontendAction::BeginSourceFile to take the input kind instead of an IsAST bool.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105578 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-07 23:23:06 +00:00
Douglas Gregor
28019772db
Make Diagnostic reference-counted, which is simpler than juggling
...
maybe-ownership vs. ownership.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100498 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 23:52:57 +00:00
Chris Lattner
a0a270c0f1
Match MemoryBuffer API changes.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100484 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 22:42:27 +00:00
Douglas Gregor
3687e9d3a5
Clarify the ownership semantics of the Diagnostic object used by
...
ASTUnit. Previously, we would end up with use-after-free errors
because the Diagnostic object would be creating in one place (say,
CIndex) and its ownership would not be transferred into the
ASTUnit. Fixes <rdar://problem/7818608>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100464 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 21:10:19 +00:00
Daniel Dunbar
dbd8209b33
PPCallbacks: Add hook for reaching the end of the main file, and fix DependencyFile to not do work in its destructor.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99257 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-23 05:09:10 +00:00
Kovarththanan Rajaratnam
e51dd7be67
Lowercase for consistency
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97878 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-06 12:07:48 +00:00
Jeffrey Yasskin
9f61aa9e28
Un-namespace-qualify llvm_unreachable. It's a macro, so the qualification gave
...
no extra safety anyway.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91207 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-12 05:05:38 +00:00
Daniel Dunbar
5262fda30b
Fix ASTUnit to allows require a (persistent) Diagnostic object be provided; propogate and simplify.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90379 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 01:45:44 +00:00
Kovarththanan Rajaratnam
f79bafa608
This patch moves the frontend timer from clang-cc into CompilerInstance.
...
CompilerInstance already contains various objects that are used
throughout the entire run.
Also addresses Daniels review comments in:
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20091123/024508.html
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90073 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 09:57:35 +00:00
Daniel Dunbar
049d3a06ea
Simplify PreprocessorOptions, it doesn't need abstracted field access.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89047 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-17 05:52:41 +00:00
Daniel Dunbar
4ee24097a8
Add FrontendAction interface, for encapsulating a "clang-cc" style action.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88772 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-14 10:42:35 +00:00