summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Reverted back the changes made in 166868 and in 166869Mahesha S2012-10-271-3/+0
| | | | llvm-svn: 166871
* -------------------------------------------------Mahesha S2012-10-271-0/+3
| | | | | | | | | | | | | | | | | | | | Feature: OpenMP support in CLANG: Sub-Feature: Support for option -fopenmp Files Changed/Added: * include/clang/Driver/Options.td (C) * include/clang/Basic/LangOptions.def (C) * lib/Driver/Tools.cpp (C) * lib/Frontend/CompilerInvocation.cpp (C) Test Cases Changed/Added: * test/Driver/clang_fopenmp_opt.c (A) ------------------------------------------------- llvm-svn: 166868
* Move PreprocessorOptions into the Lex library, and make it intrusivelyDouglas Gregor2012-10-241-2/+4
| | | | | | reference-counted. llvm-svn: 166587
* Move HeaderSearchOptions into the Lex library, make it intrusivelyDouglas Gregor2012-10-241-2/+4
| | | | | | reference-counted, and hold a reference to it in HeaderSearch. llvm-svn: 166583
* [analyzer] Replace -analyzer-no-eagerly-trim-egraph with graph-trim-interval.Jordan Rose2012-10-231-1/+0
| | | | | | | | | | | | | After every 1000 CFGElements processed, the ExplodedGraph trims out nodes that satisfy a number of criteria for being "boring" (single predecessor, single successor, and more). Rather than controlling this with a cc1 option, which can only disable this behavior, we now have an analyzer-config option, 'graph-trim-interval', which can change this interval from 1000 to something else. Setting the value to 0 disables reclamation. The next commit relies on this behavior to actually test anything. llvm-svn: 166528
* Use a .def file for most of the diagnostic options.Douglas Gregor2012-10-231-6/+6
| | | | llvm-svn: 166520
* Make DiagnosticOptions intrusively reference-counted, and make sureDouglas Gregor2012-10-231-2/+4
| | | | | | | the various stakeholders bump up the reference count. In particular, the diagnostics engine now keeps the DiagnosticOptions object alive. llvm-svn: 166508
* Switch CodeGenOptions over to a .def file, like we do with LangOptions.Douglas Gregor2012-10-231-12/+16
| | | | llvm-svn: 166497
* Handle implicitly-included PCH files the same way asDouglas Gregor2012-10-221-10/+1
| | | | | | | | implicitly-included PTH files during initialization, delaying the mapping down to the "original source file" until after later in the initialization process. llvm-svn: 166452
* [Options] Add prefixes to options.Michael J. Spencer2012-10-221-2/+2
| | | | | | | | | | | | | | Each option has a set of prefixes. When matching an argument such as -funroll-loops. First the leading - is removed as it is a prefix. Then a lower_bound search for "funroll-loops" is done against the option table by option name. From there each option prefix + option name combination is tested against the argument. This allows us to support Microsoft style options where both / and - are valid prefixes. It also simplifies the cases we already have where options come in both - and -- forms. Almost every option for gnu-ld happens to have this form. llvm-svn: 166444
* [Options] Make Option non clang specific.Michael J. Spencer2012-10-191-1/+1
| | | | llvm-svn: 166348
* Revert r166223 and the subsequent commits that depend on it, r166230 & r166235.Argyrios Kyrtzidis2012-10-181-1/+1
| | | | | | This seems to have introduced assertion hit when building compiler-rt. llvm-svn: 166245
* Add a new option for and disable column number information as thereEric Christopher2012-10-181-0/+3
| | | | | | | | | | are no known current users of column info. Robustify and fix up a few tests in the process. Reduces the size of debug information by a small amount. Part of PR14106 llvm-svn: 166236
* [Options] Make Option non clang specific.Michael J. Spencer2012-10-181-1/+1
| | | | llvm-svn: 166230
* Add -std=c++1y argument, for *highly* experimental C++14 support.Richard Smith2012-10-171-0/+1
| | | | llvm-svn: 166139
* Serialize TargetOptions into an AST file, and make sure that we keepDouglas Gregor2012-10-161-6/+8
| | | | | | | target options around so they can be accessed at any point (rather than keeping them transient). llvm-svn: 166072
* Conditionally parse documentation comments in system headers byTed Kremenek2012-09-131-0/+3
| | | | | | | | | | passing -fretain-comments-from-system-headers. By default, the compiler no longer parses such documentation comments, as they can result in a noticeable compile time/PCH slowdown. Fixes <rdar://problem/11860820>. llvm-svn: 163778
* [analyzer] Always include destructors in the analysis CFG.Jordan Rose2012-09-051-1/+0
| | | | | | | | | | | | | | | | | | | | | While destructors will continue to not be inlined (unless the analyzer config option 'c++-inlining' is set to 'destructors'), leaving them out of the CFG is an incomplete model of the behavior of an object, and can cause false positive warnings (like PR13751, now working). Destructors for temporaries are still not on by default, since (a) we haven't actually checked this code to be sure it's fully correct (in particular, we probably need to be very careful with regard to lifetime-extension when a temporary is bound to a reference, C++11 [class.temporary]p5), and (b) ExprEngine doesn't actually do anything when it sees a temporary destructor in the CFG -- not even invalidate the object region. To enable temporary destructors, set the 'cfg-temporary-dtors' analyzer config option to '1'. The old -cfg-add-implicit-dtors cc1 option, which controlled all implicit destructors, has been removed. llvm-svn: 163264
* Allow disabling of wchar_t type.Abramo Bagnara2012-09-051-0/+6
| | | | llvm-svn: 163221
* Make AnalyzerOptions a shared object between CompilerInvocation andTed Kremenek2012-08-311-2/+2
| | | | | | | AnalysisManager, allowing the StringMap of configuration values to be propagated. llvm-svn: 162978
* Move AnalyzerOptions.h into 'Core' StaticAnalyzer sub-library.Ted Kremenek2012-08-311-12/+12
| | | | llvm-svn: 162977
* [analyzer] Make analyzer-ipa=dynamic-bifurcate the default.Anna Zaks2012-08-301-1/+1
| | | | | | | There are two tests regressions that come from the fact that the Retain Count checker does not cancel out inlining of ObjC methods. llvm-svn: 162950
* Rename 'MaxLoop' to 'maxBlockVisitOnPath' to reflect reality. WeTed Kremenek2012-08-301-1/+1
| | | | | | should consider renaming the command line option as well. llvm-svn: 162932
* Rename 'VisualizeEGUbi' and 'VisualizeEGDot' to ↵Ted Kremenek2012-08-301-4/+6
| | | | | | | | 'visualizeExplodedGraphWithUbigGraph' and 'visualizeExplodedGraphWithGraphViz' respectively. llvm-svn: 162931
* Rename AnalyzerOptions 'EagerlyAssume' to 'eagerlyAssumeBinOpBifurcation'.Ted Kremenek2012-08-301-2/+2
| | | | llvm-svn: 162930
* Store const& to AnalyzerOptions in AnalysisManager instead of copyingTed Kremenek2012-08-301-1/+1
| | | | | | individual flags. llvm-svn: 162929
* Move Analyses.def to include/clang/StaticAnalyzer.Ted Kremenek2012-08-301-12/+12
| | | | llvm-svn: 162927
* Change -analyzer-config to use '=' as the key-value separator, and onlyTed Kremenek2012-08-301-3/+3
| | | | | | support the '-analyzer-config key=val' variant. llvm-svn: 162891
* Add new -cc1 driver option -analyzer-config, which allows one to specifyTed Kremenek2012-08-291-0/+30
| | | | | | | | | a comma separated collection of key:value pairs (which are strings). This allows a general way to provide analyzer configuration data from the command line. No clients yet. llvm-svn: 162827
* [ms-inline asm] Change the -fenable-experimental-ms-inline-asm option from a Chad Rosier2012-08-241-1/+2
| | | | | | | | | CodeGen option to a LangOpt option. In turn, hoist the guard into the parser so that we avoid the new (and fairly unstable) Sema/AST/CodeGen logic. This should restore the behavior of clang to that prior to r158325. <rdar://problem/12163681> llvm-svn: 162602
* [analyzer] Set the default IPA mode to 'basic-inlining', which excludes C++.Jordan Rose2012-08-211-1/+1
| | | | | | | | | | | | | | | | | | | Under -analyzer-ipa=basic-inlining, only C functions, blocks, and C++ static member functions are inlined -- essentially, the calls that behave like simple C function calls. This is essentially the behavior in Xcode 4.4. C++ support still has some rough edges, and we don't want users to be worried about them if they download and run their own checker. (In particular, the massive number of false positives for analyzing LLVM comes from inlining defensively-written code in contexts where more aggressive assumptions are implicitly made. This problem is not unique to C++, but it is exacerbated by the higher proportion of code that lives in header files in C++.) The eventual goal is to be comfortable enough with C++ support (and simple Objective-C support) to advance to -analyzer-ipa=inlining as the default behavior. See the IPA design notes for more details. llvm-svn: 162318
* [driver] Add support for the --param ssp-buffer-size= driver option.Chad Rosier2012-08-211-0/+2
| | | | | | PR9673 llvm-svn: 162285
* Screw around with ObjCRuntime some more, changing theJohn McCall2012-08-211-7/+9
| | | | | | | | diagnostics for bad deployment targets and adding a few more predicates. Includes a patch by Jonathan Schleifer to enable ARC for ObjFW. llvm-svn: 162252
* Preprocessor: fix __OPTIMIZE_SIZE__ and -OzDylan Noblesmith2012-08-081-2/+3
| | | | | | | | | | | | Add some tests for __OPTIMIZE_SIZE__ and __NO_INLINE__, removing the superfluous copies in the target-specific tests, since it's target-independent. This uncovered a bug in the handling of -Oz: it would attempt to store the value 2 in the 1-bit bitfield OptimizeSize, leaving a value of 0 and never defining __OPTIMIZE_SIZE__. llvm-svn: 161495
* [analyzer] Turn -cfg-add-initializers on by default, and remove the flag.Jordan Rose2012-07-311-1/+0
| | | | llvm-svn: 161060
* Added -ast-list option to dump filterable AST decl node names.Alexander Kornienko2012-07-311-0/+3
| | | | llvm-svn: 161040
* Added -ast-dump-filter option to clang -cc1.Alexander Kornienko2012-07-261-0/+3
| | | | llvm-svn: 160784
* Rename -fms-inline-asm to -fenable-experimental-ms-inline-asm.Chad Rosier2012-07-201-1/+1
| | | | llvm-svn: 160590
* Add the mechanics for -fms-inline-asm. No easy way to test at this time.Chad Rosier2012-07-201-0/+1
| | | | llvm-svn: 160580
* Define __FINITE_MATH_ONLY__ based on -ffast-math and -ffinite-math-only.Bob Wilson2012-07-191-0/+1
| | | | | | | This macro was being unconditionally set to zero, preceded by a FIXME comment. This fixes <rdar://problem/11845441>. Patch by Michael Gottesman! llvm-svn: 160491
* Add OpenCL metadata for kernel arg names. This output is controlled via a ↵Tanya Lattner2012-07-111-0/+3
| | | | | | | | flag as noted in the OpenCL Spec. Includes a test case. llvm-svn: 160092
* Add -ffp-contract = { fast | on | off } command line option support.Lang Hames2012-07-061-0/+17
| | | | | | | | | | | | | | | | | This flag sets the 'fp-contract' mode, which controls the formation of fused floating point operations. Available modes are: - Fast: Form fused operations anywhere. - On: Form fused operations where allowed by FP_CONTRACT. This is the default mode. - Off: Don't form fused operations (in future this may be relaxed to forming fused operations where it can be proved that the result won't be affected). Currently clang doesn't support the FP_CONTRACT pragma, so the 'On' and 'Off' modes are equivalent. llvm-svn: 159794
* Reduce default template instantiation depth to 512; we're blowing outDouglas Gregor2012-07-021-1/+1
| | | | | | the stack too often with 1024. Fixes <rdar://problem/11678534>. llvm-svn: 159573
* Add a new libclang completion API to get brief documentation comment that isDmitri Gribenko2012-07-021-11/+23
| | | | | | | | | | | | | | | | attached to a declaration in the completion string. Since extracting comments isn't free, a new code completion option is introduced. A new code completion option that enables including brief comments into CodeCompletionString should be a, err, code completion option. But because ASTUnit caches global declarations during parsing before even completion consumer is created, the option is duplicated as a translation unit option (in both libclang and ASTUnit, like the option to cache code completion results). llvm-svn: 159539
* Add -ftls-model command-line flag.Hans Wennborg2012-06-281-1/+31
| | | | | | This allows for setting the default TLS model. (PR9788) llvm-svn: 159336
* Add template type diffing to Clang. This feature will provide a betterRichard Trieu2012-06-261-0/+2
| | | | | | | | | | | | comparison between two templated types when they both appear in a diagnostic. Type elision will remove indentical template arguments, which can be disabled with -fno-elide-type. Cyan highlighting is applied to the differing types. For more formatting, -fdiagnostic-show-template-tree will output the template type as an indented text tree, with differences appearing inline. Template tree works with or without type elision. llvm-svn: 159216
* Restructure how the driver communicates information about theJohn McCall2012-06-201-15/+9
| | | | | | | | | | | | | | | | | | | | | | | | target Objective-C runtime down to the frontend: break this down into a single target runtime kind and version, and compute all the relevant information from that. This makes it relatively painless to add support for new runtimes to the compiler. Make the new -cc1 flag, -fobjc-runtime=blah-x.y.z, available at the driver level as a better and more general alternative to -fgnu-runtime and -fnext-runtime. This new concept of an Objective-C runtime also encompasses what we were previously separating out as the "Objective-C ABI", so fragile vs. non-fragile runtimes are now really modelled as different kinds of runtime, paving the way for better overall differentiation. As a sort of special case, continue to accept the -cc1 flag -fobjc-runtime-has-weak, as a sop to PLCompatibilityWeak. I won't go so far as to say "no functionality change", even ignoring the new driver flag, but subtle changes in driver semantics are almost certainly not intended. llvm-svn: 158793
* Extend the support for cl-std to include 1.2.Tanya Lattner2012-06-191-3/+14
| | | | | | | Add error checking for the static qualifier which is now allowed in certain situations for OpenCL 1.2. Use the CL version to turn on this feature. Added test case for 1.2 static storage class feature. llvm-svn: 158759
* Add a -fuse-init-array option to cc1 and map to the UseInitArray targetRafael Espindola2012-06-191-0/+1
| | | | | | | | | option. On the driver, check if we are using libraries from gcc 4.7 or newer and if so pass -fuse-init-array to the frontend. The crtbegin*.o files in gcc 4.7 no longer call the constructors listed in .ctors, so we have to use .init_array. llvm-svn: 158694
* Add language std for OpenCL 1.1 and 1.2.Tanya Lattner2012-06-181-1/+14
| | | | llvm-svn: 158686
OpenPOWER on IntegriCloud