summaryrefslogtreecommitdiff
path: root/lib/Frontend/CompilerInvocation.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Add support for threadsafe statics, and make them the default (matching gcc).Anders Carlsson2010-02-061-3/+5
| | | | | | | Daniel, I'd appreciate a review of the driver/cc1 parts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95508 91177308-0d34-0410-b5e6-96231b3b80d8
* clang -cc1: Wire up -emit-obj, for emitting object files.Daniel Dunbar2010-02-031-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95182 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver/Frontend: Add support for -fobjc-legacy-dispatch, not yet used.Daniel Dunbar2010-02-011-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95004 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce serialization and deserialization of diagnostic informationDouglas Gregor2010-01-281-0/+3
| | | | | | | | | | | | | | | | | | | so that CIndex can report diagnostics through the normal mechanisms even when executing Clang in a separate process. This applies both when performing code completion and when using ASTs as an intermediary for clang_createTranslationUnitFromSourceFile(). The serialized format is not perfect at the moment, because it does not encapsulate macro-instantiation information. Instead, it maps all source locations back to the instantiation location. However, it does maintain source-range and fix-it information. To get perfect fidelity from the serialized format would require serializing a large chunk of the source manager; at present, it isn't clear if this code will live long enough for that to matter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94740 91177308-0d34-0410-b5e6-96231b3b80d8
* diagnose invalid values of -ftabstop, patch by Christian Adaker!Chris Lattner2010-01-131-2/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93288 91177308-0d34-0410-b5e6-96231b3b80d8
* implement -ftabstop=width, patch by Christian AdåkerChris Lattner2010-01-091-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93078 91177308-0d34-0410-b5e6-96231b3b80d8
* Use -fno-math-errno by default, and remove the IsMathErrnoDefaultDan Gohman2010-01-081-3/+3
| | | | | | | targethook, which is no longer being used. This fixes PR5971. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92987 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove RewriteBlocks. It has been superseded by RewriteObjCKovarththanan Rajaratnam2009-12-231-3/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92014 91177308-0d34-0410-b5e6-96231b3b80d8
* clang -cc1: Rename -mcpu to -target-cpu to match other target options and ↵Daniel Dunbar2009-12-181-2/+2
| | | | | | not alias driver/backend option. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91671 91177308-0d34-0410-b5e6-96231b3b80d8
* Add -dwarf-debug-flags, which provides a way to embed the cc1 level options usedDaniel Dunbar2009-12-181-0/+5
| | | | | | | | to compile a translation unit into the debug info for that file. - Used by parts of Darwin build process to check compiler flags, etc. - <rdar://problem/7256886> clang does not emit AT_APPLE_flags git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91661 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix -fdollars-in-identifiers Clang translation.Daniel Dunbar2009-12-161-5/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91562 91177308-0d34-0410-b5e6-96231b3b80d8
* implement PR5654: add -fassume-sane-operator-new, which is enabled by ↵Nuno Lopes2009-12-161-0/+3
| | | | | | | | default, and adds the malloc attribute to the global function new() and to the overloaded new operators. feel free to chage the name to this lengthy argument git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91543 91177308-0d34-0410-b5e6-96231b3b80d8
* Add -resource-dir to clang -cc1, this allows the base directory for compilerDaniel Dunbar2009-12-151-9/+6
| | | | | | | resources (e.g., /usr/lib/clang/1.1) to be passed on the command line instead of computed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91370 91177308-0d34-0410-b5e6-96231b3b80d8
* CompilerInvocation: Move builtin-include-path logic out of ↵Daniel Dunbar2009-12-131-11/+8
| | | | | | CompilerInvocation::CreateFromArgs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91237 91177308-0d34-0410-b5e6-96231b3b80d8
* Un-namespace-qualify llvm_unreachable. It's a macro, so the qualification gaveJeffrey Yasskin2009-12-121-7/+7
| | | | | | | no extra safety anyway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91207 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement runtime checks for undefined behavior. WIP.Mike Stump2009-12-121-0/+3
| | | | | | | | | | | | | | This implements a new flag -fcatch-undefined-behavior. The flag turns on additional runtime checks for: T a[I]; a[i] abort when i < 0 or i >= I. Future stuff includes shifts by >= bitwidth amounts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91198 91177308-0d34-0410-b5e6-96231b3b80d8
* Add clang-cc option '-analyzer-opt-analyze-nested-blocks' to treat block ↵Ted Kremenek2009-12-071-1/+5
| | | | | | literals as an entry point for analyzer checks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90810 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch PCHReader::getOriginalSourceFile to use proper diagnostics.Daniel Dunbar2009-12-031-4/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90434 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-cc: Honor -help and -version when using new style option parsing.Daniel Dunbar2009-12-031-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90422 91177308-0d34-0410-b5e6-96231b3b80d8
* Add clang -cc1 support for -remap-file.Daniel Dunbar2009-12-031-2/+21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90414 91177308-0d34-0410-b5e6-96231b3b80d8
* Add clang -cc1 -load option.Daniel Dunbar2009-12-031-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90413 91177308-0d34-0410-b5e6-96231b3b80d8
* Change rtti/Rtti to RTTI, as it is an acronym.Mike Stump2009-12-021-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90334 91177308-0d34-0410-b5e6-96231b3b80d8
* clang -cc1: Move CompilerInvocation deserialization into CompilerInvocation.cpp,Daniel Dunbar2009-12-011-0/+680
| | | | | | where it belongs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90198 91177308-0d34-0410-b5e6-96231b3b80d8
* Add CodeGenOptions::{SoftFloat,FloatABI}, and update the all the (far too ↵Daniel Dunbar2009-11-301-0/+6
| | | | | | many) places to use this instead of using the backend -soft-float and -float-abi= options. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90127 91177308-0d34-0410-b5e6-96231b3b80d8
* Move LLVM backend options to explicit clang-cc / clang -cc1 options, which ↵Daniel Dunbar2009-11-291-0/+25
| | | | | | we then manually pass to the command line library; eventually the latter grossness should be fixed by a real API when creating the target machine. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90063 91177308-0d34-0410-b5e6-96231b3b80d8
* Add clang -cc1 parsing for LangOptions.Daniel Dunbar2009-11-291-2/+2
| | | | | | - This is the last major parsing piece, main FIXMEs remain. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90059 91177308-0d34-0410-b5e6-96231b3b80d8
* Change LangOptions::ObjCConstantStringClass to an std::string to avoid ↵Daniel Dunbar2009-11-291-13/+13
| | | | | | worrying about the lifetime. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90052 91177308-0d34-0410-b5e6-96231b3b80d8
* Move MainFileName option variable into CodeGenOptions instead of LangOptions.Daniel Dunbar2009-11-291-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90051 91177308-0d34-0410-b5e6-96231b3b80d8
* Add clang -cc1 parsing for preprocessor options.Daniel Dunbar2009-11-261-6/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89917 91177308-0d34-0410-b5e6-96231b3b80d8
* Add clang -cc1 parsing for header search options.Daniel Dunbar2009-11-261-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89916 91177308-0d34-0410-b5e6-96231b3b80d8
* Add clang -cc1 parsing for frontend options.Daniel Dunbar2009-11-251-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89856 91177308-0d34-0410-b5e6-96231b3b80d8
* Add clang -cc1 parsing of diagnostic options.Daniel Dunbar2009-11-231-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89716 91177308-0d34-0410-b5e6-96231b3b80d8
* Add clang -cc1 parsing of analyzer options.Daniel Dunbar2009-11-221-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89629 91177308-0d34-0410-b5e6-96231b3b80d8
* Add clang -cc1 parsing of CodeGenOptions.Daniel Dunbar2009-11-201-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89464 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix some default in the option classes, and some CompilerInvocation argificationDaniel Dunbar2009-11-191-15/+12
| | | | | | errors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89388 91177308-0d34-0410-b5e6-96231b3b80d8
* Sketch some 'clang -cc1' support, for testing parts of CompilerInvocation.Daniel Dunbar2009-11-191-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89333 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-cc: Remove some more llvm::cl::init arguments, by only setting values whenDaniel Dunbar2009-11-191-1/+1
| | | | | | | | the argument is given. Also, tweak Opt.Sysroot defaulting. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89318 91177308-0d34-0410-b5e6-96231b3b80d8
* Change -code-completion-debug-printer to -no-code-completion-debug-printer.Daniel Dunbar2009-11-191-6/+6
| | | | | | Also, tweak a few help strings and update CompilerInvocation serialization for prev change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89317 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify CompilerInvocation::toArgs, now that LangOptions handling is more ↵Daniel Dunbar2009-11-171-6/+6
| | | | | | predictable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89074 91177308-0d34-0410-b5e6-96231b3b80d8
* Move -fnext-runtime defaulting to driver (and change clang-cc default toDaniel Dunbar2009-11-171-1/+2
| | | | | | -fnext-runtime), instead of using getDefaultLangOptions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89058 91177308-0d34-0410-b5e6-96231b3b80d8
* Add initial cut at CompilerInvocation::toArgs, which "serializes" the ↵Daniel Dunbar2009-11-171-0/+547
CompilerInvocation into a list of arguments which can be passed to clang-cc (eventually, clang -cc1). - Unfortunately, this is currently a tedious and manual translation. Eventually it would be nice to automatically generate this code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89049 91177308-0d34-0410-b5e6-96231b3b80d8