summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Convert a few ownership comments with std::unique_ptr.Rafael Espindola2014-08-171-1/+1
| | | | llvm-svn: 215853
* Modify behavior of -ast-dump-lookups: if -ast-dump is not also provided, dumpRichard Smith2014-08-111-0/+2
| | | | | | | | anyway. If -ast-dump *is* also provided, then dump the AST declarations as well as the lookup results. This is invaluable for cross-correlating the lookup information with the declarations actually found. llvm-svn: 215393
* Add a cc1 "dump-coverage-mapping" for testing coverage mapping.Alex Lorenz2014-08-081-0/+1
| | | | | | Differential Revision: http://reviews.llvm.org/D4799 llvm-svn: 215258
* Use -Rblah, not -Wblah, to control remark diagnostics. This was always theRichard Smith2014-08-071-18/+15
| | | | | | | | | | | | | | | | | | | | | | intent when we added remark support, but was never implemented in the general case, because the first -R flags didn't need it. (-Rpass= had special handling to accomodate its argument.) -Rno-foo, -Reverything, and -Rno-everything can be used to turn off a remark, or to turn on or off all remarks. Per discussion on cfe-commits, -Weverything does not affect remarks, and -Reverything does not affect warnings or errors. The only "real" -R flag we have right now is -Rmodule-build; that flag is effectively renamed from -Wmodule-build to -Rmodule-build by this change. -Wpass and -Wno-pass (and their friends) are also renamed to -Rpass and -Rno-pass by this change; it's not completely clear whether we intended to have a -Rpass (with no =pattern), but that is unchanged by this commit, other than the flag name. The default pattern is effectively one which matches no passes. In future, we may want to make the default pattern be .*, so that -Reverything works for -Rpass properly. llvm-svn: 215046
* Introduce f[no-]max-unknown-pointer-align=[number] optionFariborz Jahanian2014-08-051-0/+1
| | | | | | | | | to instruct the code generator to not enforce a higher alignment than the given number (of bytes) when accessing memory via an opaque pointer or reference. Patch reviewed by John McCall (with post-commit review pending). rdar://16254558 llvm-svn: 214911
* Add coverage mapping generation.Alex Lorenz2014-08-041-0/+1
| | | | | | | | | | This patch adds the '-fcoverage-mapping' option which allows clang to generate the coverage mapping information that can be used to provide code coverage analysis using the execution counts obtained from the instrumentation based profiling (-fprofile-instr-generate). llvm-svn: 214752
* Add stopgap option -fmodule-implementation-of <name>Ben Langmuir2014-07-231-0/+8
| | | | | | | | | | | | | | | | | | This flag specifies that we are building an implementation file of the module <name>, preventing importing <name> as a module. This does not consider this to be the 'current module' for the purposes of doing modular checks like decluse or non-modular-include warnings, unlike -fmodule-name. This is needed as a stopgap until: 1) we can resolve relative includes to a VFS-mapped module (or can safely import a header textually and as part of a module) and ideally 2) we can safely do incremental rebuilding when implementation files import submodules. llvm-svn: 213767
* Driver: bifurcate extended and basic MSC versioningSaleem Abdulrasool2014-07-161-20/+3
| | | | | | | | | | | | | | | | | | | | | | | This restores the original behaviour of -fmsc-version. The older option remains as a mechanism for specifying the basic version information. A secondary option, -fms-compatibility-version permits the user to specify an extended version to the driver. The new version takes the value as a dot-separated value rather than the major * 100 + minor format that -fmsc-version format. This makes it easier to specify the value as well as a more flexible manner for specifying the value. Specifying both values is considered an error. The older parameter is left solely as a driver option, which is normalised into the newer parameter. This allows us to retain a single code path in the compiler itself whilst preserving the semantics of the old parameter as well as avoid having to determine which of two formats are being used by the invocation. The test changes are due to the fact that the compiler no longer supports the old option, and is a direct conversion to the new option. llvm-svn: 213119
* Update for llvm api change.Rafael Espindola2014-07-061-5/+8
| | | | llvm-svn: 212408
* Track IntrusiveRefCntPtr::get() changes from LLVM r212366Alp Toker2014-07-051-1/+1
| | | | llvm-svn: 212369
* Driver: Handle /GR- in a compatible way with MSVCDavid Majnemer2014-07-011-0/+1
| | | | | | | | | | | | | | | | | There are slight differences between /GR- and -fno-rtti which made mapping one to the other inappropriate. -fno-rtti disables dynamic_cast, typeid, and does not emit RTTI related information for the v-table. /GR- does not generate complete object locators and thus will not reference them in vftables. However, constructs like dynamic_cast and typeid are permitted. This should bring our implementation of RTTI up to semantic parity with MSVC modulo bugs. llvm-svn: 212138
* Add new debug kind LocTrackingOnly.Diego Novillo2014-06-241-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This new debug emission kind supports emitting line location information in all instructions, but stops code generation from emitting debug info to the final output. This mode is useful when the backend wants to track source locations during code generation, but it does not want to produce debug info. This is currently used by optimization remarks (-Rpass, -Rpass-missed and -Rpass-analysis). When one of the -Rpass flags is used, the front end will enable location tracking, only if no other debug option is enabled. To prevent debug information from being generated, a new debug info kind LocTrackingOnly causes DIBuilder::createCompileUnit() to not emit the llvm.dbg.cu annotation. This blocks final code generation from generating debug info in the back end. Depends on D4234. Reviewers: echristo, dblaikie Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4235 llvm-svn: 211610
* Driver: correct behaviour of -fmsc-version=MAJORSaleem Abdulrasool2014-06-231-1/+5
| | | | | | | | | Ensure that we properly handle the case where just the major version component is provided by the user. Thanks to Alp Toker for pointing out that this was not handled correctly! llvm-svn: 211506
* Driver: enhance MSC version compatibilitySaleem Abdulrasool2014-06-201-1/+52
| | | | | | | | | | | | | | | | | | | | | | | | | The version information for Visual Studio is spread over multiple variables. The newer Windows SDK has started making use of some of the extended versioning variables that were previously undefined. Enhance our compatibility definitions for these cases. _MSC_VER is defined to be the Major * 100 + Minor. _MSC_FULL_VER is defined to be Major * 10000000 + Minor * 100000 + Build. And _MSC_BUILD is the build revision of the compiler. Extend the -fmsc-version option in a compatible manner. If the value is the previous form of MMmm, then we assume that the build number is 0. Otherwise, a specific build number may be passed by using the form MMmmbbbbb. Due to bitwidth limitations of the option, it is currently not possible to define a revision value. The version information can be passed as either the decimal encoded value (_MSC_FULL_VER or _MSC_VER) or as a dot-delimited value. The change to the TextDiagnostic is to deal with the updated encoding of the version information. llvm-svn: 211420
* [C++1z] Implement N3981: Disable trigraphs by default in C++1z mode.Richard Smith2014-06-201-1/+2
| | | | llvm-svn: 211392
* Frontend: Add a CC1 flag to dump module dependencies to a directoryJustin Bogner2014-06-191-0/+2
| | | | | | | | | | | | | | | | | | This adds the -module-dependency-dir to clang -cc1, which specifies a directory to copy all of a module's dependencies into in a form suitable to be used as a VFS using -ivfsoverlay with the generated vfs.yaml. This is useful for crashdumps that involve modules, so that the module dependencies will be intact when a crash report script is used to reproduce a problem on another machine. We currently encode the absolute path to the dump directory, due to limitations in the VFS system. Until we can handle relative paths in the VFS, users of the VFS map may need to run a simple search and replace in the file. llvm-svn: 211303
* 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
OpenPOWER on IntegriCloud