aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
AgeCommit message (Collapse)AuthorFilesLines
2012-11-23PR14306: Move -fbounds-checking to -fsanitize=bounds.Joey Gouly1-2/+0
llvm-svn: 168510
2012-11-15block extended signatur option. Change previous optionFariborz Jahanian1-2/+2
to a cc1 -fencode-extended-block-signature and pass it to cc1 and recognize this option to produce extended block type signature. // rdar://12109031 llvm-svn: 168063
2012-11-15Make -ffp-contract a codegen option, rather than a laguage option. This makesLang Hames1-12/+12
more sense anyway - it determines how expressions are codegen'd. It also ensures that -ffp-contract=fast has the intended effect when compiling LLVM IR. llvm-svn: 168027
2012-11-14Add -cc1 option -fno-diagnostics-use-presumed-location, a handy mode forRichard Smith1-0/+1
working with preprocessed testcases. This causes source locations in diagnostics to point at the spelling location instead of the presumed location, while still keeping the semantic effects of the line directives (entering and leaving system-header mode, primarily). llvm-svn: 168004
2012-11-14objective-C blocks: under cc1 flag -encode-extended-block-signature,Fariborz Jahanian1-0/+2
generate expanded signature encoding to include types as we already do this for protocol method lists. // rdar://12109031 llvm-svn: 167997
2012-11-11s/BCPLComment/LineComment/Nico Weber1-1/+1
llvm-svn: 167690
2012-11-09Implement -mstrict-align using '-backend-option -arm-strict-align' as this savesChad Rosier1-1/+0
us from having to make any backend changes. llvm-svn: 167623
2012-11-09[driver] Add a -mstrict-align compiler option for ARM targets.Chad Rosier1-0/+1
rdar://12340498 llvm-svn: 167619
2012-11-05Split the instrinsic header wmmintrin.h into AES and PCLMUL parts, soDouglas Gregor1-1/+1
that we can model them as separate submodules. llvm-svn: 167420
2012-11-05Use the individual -fsanitize=<...> arguments to control which of the UBSanRichard Smith1-3/+0
checks to enable. Remove frontend support for -fcatch-undefined-behavior, -faddress-sanitizer and -fthread-sanitizer now that they don't do anything. llvm-svn: 167413
2012-11-05Add -fsanitize=<sanitizers> argument to driver and frontend, and addRichard Smith1-0/+31
-fno-sanitize=<sanitizers> argument to driver. These allow ASan, TSan, and the various UBSan checks to be enabled and disabled separately. Right now, the different modes can't be combined, but the intention is that combining UBSan and the other sanitizers will be permitted in the near future. Currently, the UBSan checks will all be enabled if any of them is; that will be fixed by the next patch. llvm-svn: 167411
2012-11-05Rename LangOptions members for address sanitizer and thread sanitizer fromRichard Smith1-2/+2
*Sanitizer to Sanitize* in preparation for later patches. llvm-svn: 167405
2012-11-05Hash the various compiler version, target, preprocessor, andDouglas Gregor1-34/+31
header-search options into the module hash. We're just using ADT/Hashing.hpp for this, which isn't as cryptographically strong as I'd like, but it'll do. If someone contributes (say) and MD4 implementation, we'd happily switch to that. llvm-svn: 167397
2012-11-01Remove first argument from Arg::getValue; it's been unused since r105760.Richard Smith1-55/+55
llvm-svn: 167211
2012-11-01Remove CompilerInvocation::toArgs and clang -cc1test mode. These were untestedRichard Smith1-908/+1
and apparently unused (and since they are untested, they're presumably also broken). llvm-svn: 167210
2012-10-27Reverted back the changes made in 166868 and in 166869Mahesha S1-3/+0
llvm-svn: 166871
2012-10-27-------------------------------------------------Mahesha S1-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
2012-10-24Move PreprocessorOptions into the Lex library, and make it intrusivelyDouglas Gregor1-2/+4
reference-counted. llvm-svn: 166587
2012-10-24Move HeaderSearchOptions into the Lex library, make it intrusivelyDouglas Gregor1-2/+4
reference-counted, and hold a reference to it in HeaderSearch. llvm-svn: 166583
2012-10-23[analyzer] Replace -analyzer-no-eagerly-trim-egraph with graph-trim-interval.Jordan Rose1-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
2012-10-23Use a .def file for most of the diagnostic options.Douglas Gregor1-6/+6
llvm-svn: 166520
2012-10-23Make DiagnosticOptions intrusively reference-counted, and make sureDouglas Gregor1-2/+4
the various stakeholders bump up the reference count. In particular, the diagnostics engine now keeps the DiagnosticOptions object alive. llvm-svn: 166508
2012-10-23Switch CodeGenOptions over to a .def file, like we do with LangOptions.Douglas Gregor1-12/+16
llvm-svn: 166497
2012-10-22Handle implicitly-included PCH files the same way asDouglas Gregor1-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
2012-10-22[Options] Add prefixes to options.Michael J. Spencer1-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
2012-10-19[Options] Make Option non clang specific.Michael J. Spencer1-1/+1
llvm-svn: 166348
2012-10-18Revert r166223 and the subsequent commits that depend on it, r166230 & r166235.Argyrios Kyrtzidis1-1/+1
This seems to have introduced assertion hit when building compiler-rt. llvm-svn: 166245
2012-10-18Add a new option for and disable column number information as thereEric Christopher1-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
2012-10-18[Options] Make Option non clang specific.Michael J. Spencer1-1/+1
llvm-svn: 166230
2012-10-17Add -std=c++1y argument, for *highly* experimental C++14 support.Richard Smith1-0/+1
llvm-svn: 166139
2012-10-16Serialize TargetOptions into an AST file, and make sure that we keepDouglas Gregor1-6/+8
target options around so they can be accessed at any point (rather than keeping them transient). llvm-svn: 166072
2012-09-13Conditionally parse documentation comments in system headers byTed Kremenek1-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
2012-09-05[analyzer] Always include destructors in the analysis CFG.Jordan Rose1-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
2012-09-05Allow disabling of wchar_t type.Abramo Bagnara1-0/+6
llvm-svn: 163221
2012-08-31Make AnalyzerOptions a shared object between CompilerInvocation andTed Kremenek1-2/+2
AnalysisManager, allowing the StringMap of configuration values to be propagated. llvm-svn: 162978
2012-08-31Move AnalyzerOptions.h into 'Core' StaticAnalyzer sub-library.Ted Kremenek1-12/+12
llvm-svn: 162977
2012-08-30[analyzer] Make analyzer-ipa=dynamic-bifurcate the default.Anna Zaks1-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
2012-08-30Rename 'MaxLoop' to 'maxBlockVisitOnPath' to reflect reality. WeTed Kremenek1-1/+1
should consider renaming the command line option as well. llvm-svn: 162932
2012-08-30Rename 'VisualizeEGUbi' and 'VisualizeEGDot' to ↵Ted Kremenek1-4/+6
'visualizeExplodedGraphWithUbigGraph' and 'visualizeExplodedGraphWithGraphViz' respectively. llvm-svn: 162931
2012-08-30Rename AnalyzerOptions 'EagerlyAssume' to 'eagerlyAssumeBinOpBifurcation'.Ted Kremenek1-2/+2
llvm-svn: 162930
2012-08-30Store const& to AnalyzerOptions in AnalysisManager instead of copyingTed Kremenek1-1/+1
individual flags. llvm-svn: 162929
2012-08-30Move Analyses.def to include/clang/StaticAnalyzer.Ted Kremenek1-12/+12
llvm-svn: 162927
2012-08-30Change -analyzer-config to use '=' as the key-value separator, and onlyTed Kremenek1-3/+3
support the '-analyzer-config key=val' variant. llvm-svn: 162891
2012-08-29Add new -cc1 driver option -analyzer-config, which allows one to specifyTed Kremenek1-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
2012-08-24[ms-inline asm] Change the -fenable-experimental-ms-inline-asm option from a Chad Rosier1-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
2012-08-21[analyzer] Set the default IPA mode to 'basic-inlining', which excludes C++.Jordan Rose1-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
2012-08-21[driver] Add support for the --param ssp-buffer-size= driver option.Chad Rosier1-0/+2
PR9673 llvm-svn: 162285
2012-08-21Screw around with ObjCRuntime some more, changing theJohn McCall1-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
2012-08-08Preprocessor: fix __OPTIMIZE_SIZE__ and -OzDylan Noblesmith1-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
2012-07-31[analyzer] Turn -cfg-add-initializers on by default, and remove the flag.Jordan Rose1-1/+0
llvm-svn: 161060