summaryrefslogtreecommitdiff
path: root/lib/Frontend/CompilerInvocation.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* [Frontend] Remove another IsUserSpecified member variable that is now unused.Daniel Dunbar2013-01-251-14/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173412 91177308-0d34-0410-b5e6-96231b3b80d8
* [Frontend] The -iwithprefix option belongs in the After category, according toDaniel Dunbar2013-01-251-2/+2
| | | | | | | GCC docs. - Found by inspection. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173410 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename the -cc1 option "-generate-module-index" toDouglas Gregor2013-01-251-1/+2
| | | | | | | | "-fmodules-global-index" and expand its behavior to include both the use and generation of the global module index. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173404 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer] Replace "-analyzer-ipa" with "-analyzer-config ipa".Anna Zaks2013-01-241-16/+0
| | | | | | | | | The idea is to eventually place all analyzer options under "analyzer-config". In addition, this lays the ground for introduction of a high-level analyzer mode option, which will influence the default setting for IPAMode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173385 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement the writer side of the global module index. Douglas Gregor2013-01-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | The global module index is a "global" index for all of the module files within a particular subdirectory in the module cache, which keeps track of all of the "interesting" identifiers and selectors known in each of the module files. One can perform a fast lookup in the index to determine which module files will have more information about entities with a particular name/selector. This information can help eliminate redundant lookups into module files (a serious performance problem) and help with creating auto-import/auto-include Fix-Its. The global module index is created or updated at the end of a translation unit that has triggered a (re)build of a module by scraping all of the .pcm files out of the module cache subdirectory, so it catches everything. As with module rebuilds, we use the file system's atomicity to synchronize. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173301 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new LangOpt NativeHalfType. This option allows for native half/fp16Joey Gouly2013-01-231-0/+1
| | | | | | | | | | operations (as opposed to storage only half/fp16). Also add some semantic checks for OpenCL half types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173254 91177308-0d34-0410-b5e6-96231b3b80d8
* [ms-inline asm] Remove the -fenable-experimental-ms-inline-asm flag. MS-styleChad Rosier2013-01-221-2/+0
| | | | | | inline assembly can be enable with -fasm-blocks or -fms-extensions alone. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173186 91177308-0d34-0410-b5e6-96231b3b80d8
* Add top-level Clang flag -f(no-)sanitize-address-zero-base-shadow that makes ↵Alexey Samsonov2013-01-201-1/+3
| | | | | | AddressSanitizer use bottom of the address space for the shadow memory. On Linux it can be used with -fPIE/-pie to improve performance. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172974 91177308-0d34-0410-b5e6-96231b3b80d8
* Nuke SetUpBuildDumpLog.Sean Silva2013-01-201-1/+0
| | | | | | | Also, it was the only reason that `argc` and `argv` were being passed into createDiagnostics, so remove those parameters and clean up callers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172945 91177308-0d34-0410-b5e6-96231b3b80d8
* [ubsan] Add support for -fsanitize-blacklistWill Dietz2013-01-181-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172808 91177308-0d34-0410-b5e6-96231b3b80d8
* Add -fmodules-autolink/-fno-modules-autolink (defaults to on) so thatDouglas Gregor2013-01-161-0/+1
| | | | | | | users can explicitly enable/disable modules autolinking. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172592 91177308-0d34-0410-b5e6-96231b3b80d8
* Add -fopenmp -cc1 option and wire it up to define _OPENMP, from Alexey Bataev!Douglas Gregor2013-01-151-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172509 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove useless 'llvm::' qualifier from names like StringRef and others that areDmitri Gribenko2013-01-121-2/+2
| | | | | | | brought into 'clang' namespace by clang/Basic/LLVM.h git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172323 91177308-0d34-0410-b5e6-96231b3b80d8
* s/CPlusPlus0x/CPlusPlus11/gRichard Smith2013-01-021-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171367 91177308-0d34-0410-b5e6-96231b3b80d8
* [ubsan] Recover by default, use -fno-sanitize-recover to disable.Will Dietz2012-12-301-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171264 91177308-0d34-0410-b5e6-96231b3b80d8
* Support -fsanitize-memory-track-origins.Evgeniy Stepanov2012-12-241-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171020 91177308-0d34-0410-b5e6-96231b3b80d8
* Sort the includes according to the coding standard.Roman Divacky2012-12-211-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170905 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove duplicate includes.Roman Divacky2012-12-211-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170903 91177308-0d34-0410-b5e6-96231b3b80d8
* [driver, ms-inline asm] -fms-compatibility enables -fms-extensions, so this ↵Chad Rosier2012-12-051-1/+1
| | | | | | | | | should enable the AsmBlocks language extension as well. rdar://12808010 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169448 91177308-0d34-0410-b5e6-96231b3b80d8
* [driver, ms-inline asm] Have -fms-extensions enable the AsmBlocks languageChad Rosier2012-12-051-1/+1
| | | | | | | | option. MS-style inline asm can now be enabled by either -fasm-blocks or -fms-extensions. rdar://12808010 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169445 91177308-0d34-0410-b5e6-96231b3b80d8
* [driver, ms-inline asm] MS-Style inline assembly is controlled by theChad Rosier2012-12-051-0/+1
| | | | | | | -fasm-blocks flag, not the -fms-extensions flag. rdar://12808010 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169422 91177308-0d34-0410-b5e6-96231b3b80d8
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-041-3/+3
| | | | | | | | | | | | | uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169237 91177308-0d34-0410-b5e6-96231b3b80d8
* Add Clang flags -fsanitize-blacklist and -fno-sanitize-blacklist. Make this ↵Alexey Samsonov2012-12-031-0/+1
| | | | | | flag usable for ASan. Blacklisting can be used to disable sanitizer checks for particular file/function/object. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169144 91177308-0d34-0410-b5e6-96231b3b80d8
* [ubsan] Add flag to enable recovery from checks when possible.Will Dietz2012-12-021-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169114 91177308-0d34-0410-b5e6-96231b3b80d8
* PR14306: Move -fbounds-checking to -fsanitize=bounds.Joey Gouly2012-11-231-2/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168510 91177308-0d34-0410-b5e6-96231b3b80d8
* block extended signatur option. Change previous optionFariborz Jahanian2012-11-151-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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168063 91177308-0d34-0410-b5e6-96231b3b80d8
* Make -ffp-contract a codegen option, rather than a laguage option. This makesLang Hames2012-11-151-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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168027 91177308-0d34-0410-b5e6-96231b3b80d8
* Add -cc1 option -fno-diagnostics-use-presumed-location, a handy mode forRichard Smith2012-11-141-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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168004 91177308-0d34-0410-b5e6-96231b3b80d8
* objective-C blocks: under cc1 flag -encode-extended-block-signature,Fariborz Jahanian2012-11-141-0/+2
| | | | | | | | | generate expanded signature encoding to include types as we already do this for protocol method lists. // rdar://12109031 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167997 91177308-0d34-0410-b5e6-96231b3b80d8
* s/BCPLComment/LineComment/Nico Weber2012-11-111-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167690 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement -mstrict-align using '-backend-option -arm-strict-align' as this savesChad Rosier2012-11-091-1/+0
| | | | | | | us from having to make any backend changes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167623 91177308-0d34-0410-b5e6-96231b3b80d8
* [driver] Add a -mstrict-align compiler option for ARM targets.Chad Rosier2012-11-091-0/+1
| | | | | | rdar://12340498 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167619 91177308-0d34-0410-b5e6-96231b3b80d8
* Split the instrinsic header wmmintrin.h into AES and PCLMUL parts, soDouglas Gregor2012-11-051-1/+1
| | | | | | | that we can model them as separate submodules. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167420 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the individual -fsanitize=<...> arguments to control which of the UBSanRichard Smith2012-11-051-3/+0
| | | | | | | | checks to enable. Remove frontend support for -fcatch-undefined-behavior, -faddress-sanitizer and -fthread-sanitizer now that they don't do anything. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167413 91177308-0d34-0410-b5e6-96231b3b80d8
* Add -fsanitize=<sanitizers> argument to driver and frontend, and addRichard Smith2012-11-051-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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167411 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename LangOptions members for address sanitizer and thread sanitizer fromRichard Smith2012-11-051-2/+2
| | | | | | | *Sanitizer to Sanitize* in preparation for later patches. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167405 91177308-0d34-0410-b5e6-96231b3b80d8
* Hash the various compiler version, target, preprocessor, andDouglas Gregor2012-11-051-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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167397 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove first argument from Arg::getValue; it's been unused since r105760.Richard Smith2012-11-011-55/+55
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167211 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove CompilerInvocation::toArgs and clang -cc1test mode. These were untestedRichard Smith2012-11-011-908/+1
| | | | | | | | and apparently unused (and since they are untested, they're presumably also broken). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167210 91177308-0d34-0410-b5e6-96231b3b80d8
* Reverted back the changes made in 166868 and in 166869Mahesha S2012-10-271-3/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166871 91177308-0d34-0410-b5e6-96231b3b80d8
* -------------------------------------------------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) ------------------------------------------------- git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166868 91177308-0d34-0410-b5e6-96231b3b80d8
* Move PreprocessorOptions into the Lex library, and make it intrusivelyDouglas Gregor2012-10-241-2/+4
| | | | | | | reference-counted. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166587 91177308-0d34-0410-b5e6-96231b3b80d8
* Move HeaderSearchOptions into the Lex library, make it intrusivelyDouglas Gregor2012-10-241-2/+4
| | | | | | | reference-counted, and hold a reference to it in HeaderSearch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166583 91177308-0d34-0410-b5e6-96231b3b80d8
* [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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166528 91177308-0d34-0410-b5e6-96231b3b80d8
* Use a .def file for most of the diagnostic options.Douglas Gregor2012-10-231-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166520 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166508 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch CodeGenOptions over to a .def file, like we do with LangOptions.Douglas Gregor2012-10-231-12/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166497 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166452 91177308-0d34-0410-b5e6-96231b3b80d8
* [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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166444 91177308-0d34-0410-b5e6-96231b3b80d8
* [Options] Make Option non clang specific.Michael J. Spencer2012-10-191-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166348 91177308-0d34-0410-b5e6-96231b3b80d8