Nick Lewycky
784fad7a41
Teach clang -fixit to modify files in-place, or -fixit=suffix to create new
...
files with the additional suffix in the middle.
llvm-svn: 102230
2010-04-24 01:30:46 +00:00
Chris Lattner
fb24a3a4ec
push some source location information down through the compiler,
...
into ContentCache::getBuffer. This allows it to produce
diagnostics on the broken #include line instead of without a
location.
llvm-svn: 101939
2010-04-20 20:35:58 +00:00
Nick Lewycky
a1e20de908
Teach -fixit to modify all of its inputs instead of just the main file, unless
...
-fixit-at specified a particular fixit to fix, or the -o flag was used.
llvm-svn: 101359
2010-04-15 06:46:58 +00:00
Daniel Dunbar
8ee6760971
Fronted: Kill overly specialized RecordLayoutDumper, just make -dump-record-layouts a bit that Sema honors.
...
llvm-svn: 100747
2010-04-08 02:59:56 +00:00
Chris Lattner
4b73cfabac
rename llvm::llvm_report_error -> llvm::report_fatal_error
...
llvm-svn: 100708
2010-04-07 22:58:06 +00:00
Daniel Dunbar
1c201fbf73
clang -cc1: Kill off -empty-input only, and replace with -init-only which is an
...
actual action.
- This is easier to use, and more reliable for timing the thing this was
actually meant to be useful for.
llvm-svn: 98978
2010-03-19 19:44:04 +00:00
Douglas Gregor
4ad3da2843
Entering the main source file in the preprocessor can fail if the
...
source file has been changed. Handle that failure more gracefully.
llvm-svn: 98727
2010-03-17 15:44:30 +00:00
Daniel Dunbar
cea0c70f12
Frontend: Pull CodeGenAction out more, and eliminate CreateBackendConsumer.
...
This is the way I would like to move the frontend function towards -- distinct
pieces of functionality should be exposed only via FrontendAction
implementations which have clean and relatively-stable APIs.
This also isolates the surface area in clang which depends on LLVM CodeGen.
llvm-svn: 97110
2010-02-25 04:37:45 +00:00
Daniel Dunbar
92db0fbe5a
clang -cc1: Wire up -emit-obj, for emitting object files.
...
llvm-svn: 95182
2010-02-03 01:18:43 +00:00
Steve Naroff
3d38a68b06
Fix <rdar://problem/7490212> clang rewriter: return of the mixed line endings, which is
...
related to <rdar://problem/6596843> clang ObjC rewriter: Line endings still mixed in rewrite output
This fix was dropped when I integrated the 'objective-rewrite' branch.
llvm-svn: 92737
2010-01-05 17:33:23 +00:00
Kovarththanan Rajaratnam
55e74a1a6a
Remove RewriteBlocks. It has been superseded by RewriteObjC
...
llvm-svn: 92014
2009-12-23 18:03:34 +00:00
Daniel Dunbar
7554699afa
Fix CompilerInstance::createOutputFile to use proper diagnostics, and (try to) update all clients to be able to handle failure.
...
llvm-svn: 90437
2009-12-03 09:13:30 +00:00
Daniel Dunbar
8e70505692
Eliminate CodeGenOptions::TimePasses.
...
llvm-svn: 90118
2009-11-30 08:39:52 +00:00
Chris Lattner
710bb87147
Fix PR5633 by making the preprocessor handle the case where we can
...
stat a file but where mmaping it fails. In this case, we emit an
error like:
t.c:1:10: fatal error: error opening file '../../foo.h'
instead of "cannot find file".
llvm-svn: 90110
2009-11-30 04:18:44 +00:00
Kovarththanan Rajaratnam
b1034f7a24
Don't call exit(). llvm::llvm_report_error() will do just that
...
llvm-svn: 90031
2009-11-28 09:11:46 +00:00
Gabor Greif
d2add35d9d
typo
...
llvm-svn: 89949
2009-11-26 15:18:50 +00:00
Gabor Greif
40762fec73
issue a friendlier error if someone tries to send precompiled header to '-' (stdout)
...
this brings the error on
clang -c foo.h -o -
closer to
clang -c foo.h -o /dev/null
llvm-svn: 89948
2009-11-26 14:35:28 +00:00
Daniel Dunbar
750246255d
Fix some uses of fprintf/stderr without a prototype.
...
llvm-svn: 89858
2009-11-25 10:27:48 +00:00
Daniel Dunbar
b9bbd54fdb
Add TargetOptions and use it when constructing targets.
...
- This ended up being hard to factor, sorry for the large diff.
- Some post-commit cleanup to come.
llvm-svn: 88833
2009-11-15 06:48:46 +00:00
Daniel Dunbar
883578060f
Add FrontendActions for all preprocessor based clang-cc actions.
...
llvm-svn: 88774
2009-11-14 10:42:57 +00:00
Daniel Dunbar
02bd2d7281
Add FrontendActions, which provides a FrontendAction interface to all the existing AST consumer based clang-cc actions.
...
llvm-svn: 88773
2009-11-14 10:42:46 +00:00