summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove dead code.Diego Novillo2014-06-171-11/+0
| | | | | | | | The parsing for -Rpass= had been factored into the function GenerateOptimizationRemarkRegex, but at the time I forgot to remove the original code that just handled OPT_Rpass_EQ. llvm-svn: 211122
* Add -std=c++1z flag for C++17 features.Richard Smith2014-06-161-0/+1
| | | | llvm-svn: 211030
* Include system_error directly.Rafael Espindola2014-06-121-1/+1
| | | | llvm-svn: 210802
* There is no std::errc:success, remove the llvm one.Rafael Espindola2014-05-311-1/+1
| | | | llvm-svn: 209959
* Add flags -Rpass-missed and -Rpass-analysis.Diego Novillo2014-05-291-0/+28
| | | | | | | | | | | | | | | | | | | | | | Summary: These two flags are in the same family as -Rpass, but are used in different situations. -Rpass-missed is used by optimizers to inform the user when they tried to apply an optimization but couldn't (or wouldn't). -Rpass-analysis is used by optimizers to report analysis results back to the user (e.g., why the transformation could not be applied). Depends on D3682. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3683 llvm-svn: 209839
* No longer allow the -std options to entirely override the -x language ↵Aaron Ballman2014-05-291-11/+5
| | | | | | option. This allows -x cuda -std=c++11, for instance. llvm-svn: 209824
* [C++11] Use 'nullptr'. Frontend edition.Craig Topper2014-05-221-1/+1
| | | | llvm-svn: 209389
* Make DiagnosticsEngine non-copyableAlp Toker2014-05-111-0/+2
| | | | | | | | Also provide an out-of-line dtor for CompilerInvocation. Cleanup work that may help reduce header inclusion for IntrusiveRefCntPtr. llvm-svn: 208512
* Enable standalone-debug by default on FreeBSDEd Maste2014-05-081-3/+4
| | | | | | | | | | | | It was set by default on Darwin in r198655. The same usability issues with DTrace and LLDB apply to FreeBSD, so set it by default there too. rdar://problem/15758808 http://llvm.org/pr19676 Differential Revision: http://reviews.llvm.org/D3448 llvm-svn: 208310
* Driver: parse -mcmodel earlierSaleem Abdulrasool2014-05-081-1/+13
| | | | | | | | | | | This addresses an existing FIXME item in the driver. The code model flag was parsed in the actual tool rather than in the driver. This was problematic since the value may be invalid. In that case, we would silently treat it as a default value in non-assert builds, and abort in assert builds. Add a check in the driver to validate that the value being passed is valid, and if not provide a proper error message. llvm-svn: 208275
* If an instantiation of a template is required to be a complete type, checkRichard Smith2014-05-071-0/+1
| | | | | | | whether the definition of the template is visible rather than checking whether the instantiated definition happens to be in an imported module. llvm-svn: 208150
* Speculative fix to unbreak the buildbots that fail with compiler errors.Argyrios Kyrtzidis2014-05-041-2/+2
| | | | llvm-svn: 207933
* [Modules] Add the resource-dir to the module hash.Argyrios Kyrtzidis2014-05-041-1/+2
| | | | llvm-svn: 207931
* Drop non-cfi assembly support from clang.Rafael Espindola2014-04-301-1/+0
| | | | | | | | | | | | | | After this patch clang will ignore -fdwarf2-cfi-asm and -ffno-dwarf2-cfi-asm and always print assembly that uses cfi directives. In llvm, MC itself supports cfi since the end of 2010 (support started in r119972, is reported in the 2.9 release notes). In binutils the support has been around for much longer. It looks like support started to be added in May 2003. It is available in 2.15 (31-Aug-2011, 2.14 is from 12-Jun-2003). llvm-svn: 207602
* [PCH/Modules] Don't tie TargetOptions::LinkerVersion to a module/PCH, it's a ↵Argyrios Kyrtzidis2014-04-291-1/+1
| | | | | | | | driver only thing and doesn't affect any language/preprocessor/etc. semantics. rdar://16714526 llvm-svn: 207570
* Initial implementation of -modules-earch-all option, for searching for ↵John Thompson2014-04-231-0/+3
| | | | | | symbols in non-imported modules. llvm-svn: 206977
* Add support for optimization reports.Diego Novillo2014-04-161-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds a new flag -Rpass=. The flag indicates the name of the optimization pass that should emit remarks stating when it made a transformation to the code. This implements the design I proposed in: https://docs.google.com/document/d/1FYUatSjZZO-zmFBxjOiuOzAy9mhHA8hqdvklZv68WuQ/edit?usp=sharing Other changes: - Add DiagnosticIDs::isRemark(). Use it in printDiagnosticOptions to print "-R" instead of "-W" in the diagnostic message. - In BackendConsumer::OptimizationRemarkHandler, get a SourceLocation object out of the file name, line and column number. Use that location in the call to Diags.Report(). - When -Rpass is used without debug info a note is emitted alerting the user that they need to use -gline-tables-only -gcolumn-info to get this information. CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D3226 llvm-svn: 206401
* Honour -ivfsoverlay in ASTUnit to match clangBen Langmuir2014-04-151-1/+28
| | | | | | | This allows code indexing, etc. to use the VFS in the same way as the compiler. llvm-svn: 206309
* Add -fmodules-strict-decluse to check that all headers are in modulesDaniel Jasper2014-04-111-1/+3
| | | | | Review: http://reviews.llvm.org/D3335 llvm-svn: 206027
* Support for -Wa,-compress-debug-sections.David Blaikie2014-03-271-0/+1
| | | | | | Also, while I'm here, support -nocompress-debug-sections too. llvm-svn: 204959
* Move the -i[no-]system-prefix options from CC1Options.td to Options.td.Alexander Kornienko2014-03-261-4/+4
| | | | | | | | | | | | | | | | Summary: This allows them to be used without -cc1 the same way as -I and -isystem. Renamed the options to --system-header-prefix=/--no-system-header-prefix to avoid interference with -isystem and make the intent of the option cleaner. Reviewers: rsmith Reviewed By: rsmith CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D3185 llvm-svn: 204775
* [msan] -fsanitize-memory-track-origins=[level] flag and docs.Evgeniy Stepanov2014-03-201-2/+2
| | | | | | | | | This change turns -fsanitize-memory-track-origins into -fsanitize-memory-track-origins=[level] flag (keeping the old one for compatibility). Possible levels are 0 (off), 1 (default) and 2 (incredibly detailed). See docs (part of this patch) for more info. llvm-svn: 204346
* Creating a printing policy for "half":Yunzhong Gao2014-03-181-0/+3
| | | | | | | | | | | | Since "half" is an OpenCL keyword and clang accepts __fp16 as an extension for other languages, error messages and metadata (and hence debug info) should refer to the half-precision floating point as "__fp16" instead of "half" when compiling for non-OpenCL languages. This patch creates a new printing policy for half in a similar manner to what is done for bool and wchar_t. Differential Revision: http://llvm-reviews.chandlerc.com/D2952 llvm-svn: 204164
* [Modules] Emit the module file paths as dependencies of the PCH when we are ↵Argyrios Kyrtzidis2014-03-141-0/+1
| | | | | | | | | | | building one. This is because the PCH is tied to the module files, if one of the module files changes or gets removed the build system should re-build the PCH file. rdar://16321245 llvm-svn: 203885
* Add an option -fmodules-validate-system-headersBen Langmuir2014-03-121-0/+3
| | | | | | | | When enabled, always validate the system headers when loading a module. The end result of this is that when these headers change, we will notice and rebuild the module. llvm-svn: 203630
* [C++11] Replace OwningPtr include with <memory>.Ahmed Charles2014-03-091-1/+1
| | | | llvm-svn: 203389
* Replace OwningPtr with std::unique_ptr.Ahmed Charles2014-03-071-5/+5
| | | | | | This compiles cleanly with lldb/lld/clang-tools-extra/llvm. llvm-svn: 203279
* [OPENMP] Added option -fopenmp=libiomp5|libgompAlexey Bataev2014-03-061-2/+6
| | | | llvm-svn: 203081
* Introduce '-fmodules-user-build-path' which accepts the "canonical" path to ↵Argyrios Kyrtzidis2014-03-031-0/+4
| | | | | | | | | | a user workspace build. This is used to avoid conflicts with user modules with the same name from different workspaces. rdar://16042513 llvm-svn: 202683
* [C++11] Use std::atomic instead of LLVM's.Benjamin Kramer2014-03-021-3/+3
| | | | | | No intended functionality change. llvm-svn: 202652
* [C++11] Replace llvm::tie with std::tie.Benjamin Kramer2014-03-021-1/+1
| | | | llvm-svn: 202639
* Add a driver option -ivfsoverlayBen Langmuir2014-02-251-0/+4
| | | | | | | Reads the description of a virtual filesystem from a file and overlays it over the real file system. llvm-svn: 202176
* Implement -fno-short-wcharRichard Barton2014-02-241-1/+1
| | | | llvm-svn: 202058
* clang: add -f{no-,}integrate-as as consistent parametersSaleem Abdulrasool2014-02-231-1/+1
| | | | | | | | The integrated assembler is a feature. This makes the new flags the default option, and the previous versions aliases. Ideally, at some point the aliases would be entirely removed. llvm-svn: 201963
* Accept -no-integrated-as in -cc1 and forward it to llvm.Rafael Espindola2014-02-211-0/+1
| | | | llvm-svn: 201837
* MS ABI: Implement #pragma vtordisp() and clang-cl /vdNReid Kleckner2014-02-121-0/+1
| | | | | | | | | | | | | | | | | These features are new in VS 2013 and are necessary in order to layout std::ostream correctly. Currently we have an ABI incompatibility when self-hosting with the 2013 stdlib in our convertible_fwd_ostream wrapper in gtest. This change adds another implicit attribute, MSVtorDispAttr, because implicit attributes are currently the best way to make sure the information stays on class templates through instantiation. Reviewers: majnemer Differential Revision: http://llvm-reviews.chandlerc.com/D2746 llvm-svn: 201274
* Add an option to allow Clang verify source files for a module only once duringDmitri Gribenko2014-02-121-4/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | the build When Clang loads the module, it verifies the user source files that the module was built from. If any file was changed, the module is rebuilt. There are two problems with this: 1. correctness: we don't verify system files (there are too many of them, and stat'ing all of them would take a lot of time); 2. performance: the same module file is verified again and again during a single build. This change allows the build system to optimize source file verification. The idea is based on the fact that while the project is being built, the source files don't change. This allows us to verify the module only once during a single build session. The build system passes a flag, -fbuild-session-timestamp=, to inform Clang of the time when the build started. The build system also requests to enable this feature by passing -fmodules-validate-once-per-build-session. If these flags are not passed, the behavior is not changed. When Clang verifies the module the first time, it writes out a timestamp file. Then, when Clang loads the module the second time, it finds a timestamp file, so it can compare the verification timestamp of the module with the time when the build started. If the verification timestamp is too old, the module is verified again, and the timestamp file is updated. llvm-svn: 201224
* MS ABI: Add support for the -vm{b,g,s,m,v} flagsDavid Majnemer2014-02-111-0/+18
| | | | | | | | | These flags control the inheritance model initially used by the translation unit. Differential Revision: http://llvm-reviews.chandlerc.com/D2741 llvm-svn: 201175
* [stackprotector] Add command line option -fstack-protector-strongJosh Magee2014-02-111-1/+2
| | | | | | | | | | This option has the following effects: * It adds the sspstrong IR attribute to each function within the CU. * It defines the macro __SSP_STRONG__ with the value of 2. Differential Revision: http://llvm-reviews.chandlerc.com/D2717 llvm-svn: 201120
* Remove the -fhidden-weak-vtables -cc1 option. It was dead,John McCall2014-02-081-1/+0
| | | | | | gross, and increasingly replaced through other mechanisms. llvm-svn: 201011
* Add a CC1 option -verify-pchBen Langmuir2014-02-051-0/+3
| | | | | | | | | This option will: - load the given pch file - verify it is not out of date by stat'ing dependencies, and - return 0 on success and non-zero on error llvm-svn: 200884
* [asan] Remove -fsanitize-address-zero-base-shadow command lineEvgeniy Stepanov2014-01-161-2/+0
| | | | | | | | | | | | | | | | flag from clang, and disable zero-base shadow support on all platforms where it is not the default behavior. - It is completely unused, as far as we know. - It is ABI-incompatible with non-zero-base shadow, which means all objects in a process must be built with the same setting. Failing to do so results in a segmentation fault at runtime. - It introduces a backward dependency of compiler-rt on user code, which is uncommon and complicates testing. This is the Clang part of a larger change. llvm-svn: 199372
* Remove the -cxx-abi command-line flag.Hans Wennborg2014-01-141-8/+1
| | | | | | | | | | | | | | | This makes the C++ ABI depend entirely on the target: MS ABI for -win32 triples, Itanium otherwise. It's no longer possible to do weird combinations. To be able to run a test with a specific ABI without constraining it to a specific triple, new substitutions are added to lit: %itanium_abi_triple and %ms_abi_triple can be used to get the current target triple adjusted to the desired ABI. For example, if the test suite is running with the i686-pc-win32 target, %itanium_abi_triple will expand to i686-pc-mingw32. Differential Revision: http://llvm-reviews.chandlerc.com/D2545 llvm-svn: 199250
* Switch around the order of MSVCCompat and MicrosoftExtAlp Toker2014-01-141-2/+1
| | | | | | | | | | | | Full language modes usually get listed before minor language extensions in LangOpts, so that subsequent sub-modes can predicate on the major modes. This also lends to a cleanup in CompilerInvocation to better indicate to the reader that MSVCCompat is a superset of MicrosoftExt. Cleanup only. llvm-svn: 199210
* Rename language option MicrosoftMode to MSVCCompatAlp Toker2014-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | There's been long-standing confusion over the role of these two options. This commit makes the necessary changes to differentiate them clearly, following up from r198936. MicrosoftExt (aka. fms-extensions): Enable largely unobjectionable Microsoft language extensions to ease portability. This mode, also supported by gcc, is used for building software like FreeBSD and Linux kernel extensions that share code with Windows drivers. MSVCCompat (aka. -fms-compatibility, formerly MicrosoftMode): Turn on a special mode supporting 'heinous' extensions for drop-in compatibility with the Microsoft Visual C++ product. Standards-compilant C and C++ code isn't guaranteed to work in this mode. Implies MicrosoftExt. Note that full -fms-compatibility mode is currently enabled by default on the Windows target, which may need tuning to serve as a reasonable default. See cfe-commits for the full discourse, thread 'r198497 - Move MS predefined type_info out of InitializePredefinedMacros' No change in behaviour. llvm-svn: 199209
* Use the MS ABI for Win32 targets by defaultHans Wennborg2014-01-131-2/+5
| | | | | | | | | | In addition to being a sensible default, this is a huge improvement in test coverage for the MS ABI: any bot that targets Win32 will now run the test suite using the MS ABI by default. Differential Revision: http://llvm-reviews.chandlerc.com/D2401 llvm-svn: 199131
* Implement a new -fstandalone-debug option. rdar://problem/15685848Adrian Prantl2014-01-071-8/+14
| | | | | | | | | | | | | | It controls everything that -flimit-debug-info used to, plus the vtable type optimization. The old -fno-limit-debug-info option is now an alias to -fstandalone-debug and vice versa. Standalone is the default on Darwin until dtrace is updated to work with non-standalone debug info (rdar://problem/15758808). Note: I kept the LimitedDebugInfo name in CodeGenOptions::DebugInfoKind because NoStandaloneDebugInfo sounded even more confusing. llvm-svn: 198655
* Driver: Accept -fprofile-instr-use and -fprofile-instr-generateJustin Bogner2014-01-061-0/+2
| | | | | | These flags will be used for instrumentation based PGO. llvm-svn: 198639
* Silence a dubious GCC warning about a set but unused global. Indeed, theChandler Carruth2013-12-281-1/+1
| | | | | | purpose of this global is to be set and not used. =] llvm-svn: 198094
* Bury leaked pointers in a global array to silence a leak detector in ↵Kostya Serebryany2013-12-271-0/+16
| | | | | | | | | | | | | | | | --disable-free mode Summary: This is an alternative to http://llvm-reviews.chandlerc.com/D2475 suggested by Chandler. Reviewers: chandlerc, rnk, dblaikie CC: cfe-commits, earthdok Differential Revision: http://llvm-reviews.chandlerc.com/D2478 llvm-svn: 198073
OpenPOWER on IntegriCloud