Douglas Gregor
0e93f017e5
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.
llvm-svn: 110978
2010-08-12 23:31:19 +00:00
Sebastian Redl
07a89a83d4
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.
...
llvm-svn: 109823
2010-07-30 00:29:29 +00:00
Douglas Gregor
ce3a8293a0
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>).
llvm-svn: 109475
2010-07-27 00:27:13 +00:00
Sebastian Redl
4d3af3e192
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.
...
llvm-svn: 108014
2010-07-09 21:00:24 +00:00
Daniel Dunbar
9507f9cc05
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.
llvm-svn: 105582
2010-06-07 23:26:47 +00:00
Daniel Dunbar
fcb2e6ddea
FrontendAction: Track active file kind.
...
llvm-svn: 105581
2010-06-07 23:25:49 +00:00
Daniel Dunbar
fa6214c952
Frontend: Rename hasASTSupport to hasASTFileSupport, which is more accurate.
...
llvm-svn: 105580
2010-06-07 23:24:43 +00:00
Daniel Dunbar
aed46fcbe9
Frontend: Move some initialization from CompilerInstance to FrontendAction, to parallel what is done for AST inputs.
...
llvm-svn: 105579
2010-06-07 23:23:50 +00:00
Daniel Dunbar
8654638b23
Frontend: Change FrontendAction::BeginSourceFile to take the input kind instead of an IsAST bool.
...
llvm-svn: 105578
2010-06-07 23:23:06 +00:00
Douglas Gregor
7f95d26e53
Make Diagnostic reference-counted, which is simpler than juggling
...
maybe-ownership vs. ownership.
llvm-svn: 100498
2010-04-05 23:52:57 +00:00
Chris Lattner
58c79341ab
Match MemoryBuffer API changes.
...
llvm-svn: 100484
2010-04-05 22:42:27 +00:00
Douglas Gregor
d03e823fb4
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>.
llvm-svn: 100464
2010-04-05 21:10:19 +00:00
Daniel Dunbar
cb9eaf59fb
PPCallbacks: Add hook for reaching the end of the main file, and fix DependencyFile to not do work in its destructor.
...
llvm-svn: 99257
2010-03-23 05:09:10 +00:00
Kovarththanan Rajaratnam
1c558cd773
Lowercase for consistency
...
llvm-svn: 97878
2010-03-06 12:07:48 +00:00
Jeffrey Yasskin
1615d45daa
Un-namespace-qualify llvm_unreachable. It's a macro, so the qualification gave
...
no extra safety anyway.
llvm-svn: 91207
2009-12-12 05:05:38 +00:00
Daniel Dunbar
59203007ac
Fix ASTUnit to allows require a (persistent) Diagnostic object be provided; propogate and simplify.
...
llvm-svn: 90379
2009-12-03 01:45:44 +00:00
Kovarththanan Rajaratnam
5505dff8af
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
llvm-svn: 90073
2009-11-29 09:57:35 +00:00
Daniel Dunbar
d6ea9028e7
Simplify PreprocessorOptions, it doesn't need abstracted field access.
...
llvm-svn: 89047
2009-11-17 05:52:41 +00:00
Daniel Dunbar
a0ff58dadf
Add FrontendAction interface, for encapsulating a "clang-cc" style action.
...
llvm-svn: 88772
2009-11-14 10:42:35 +00:00