aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/FrontendOptions.cpp
AgeCommit message (Collapse)AuthorFilesLines
2022-08-23[HLSL] Infer language from file extensionChris Bieneman1-0/+1
This allows the language mode for HLSL to be inferred from the file extension.
2022-04-22[C++20][Modules][Driver][HU 1/N] Initial handling for ↵Iain Sandoe1-1/+1
-xc++-{system,user}-header. This adds file types and handling for three input types, representing a C++20 header unit source: 1. When provided with a complete pathname for the header. 2. For a header to be looked up (by the frontend) in the user search paths 3. For a header to be looked up in the system search paths. We also add a pre-processed file type (although that is a single type, regardless of the original input type). These types may be specified with -xc++-{user,system,header-unit}-header xxxx. These types allow us to disambiguate header unit jobs from PCH ones, and thus we handle these differently from other header jobs in two ways: 1. The job construction is altered to build a C++20 header unit (rather than a PCH file, as would be the case for other headers). 2. When the type is "user" or "system" we defer checking for the file until the front end is run, since we need to look up the header in the relevant paths which are not known at this point. Differential Revision: https://reviews.llvm.org/D121588
2021-03-24[OpenCL] Added distinct file extension for C++ for OpenCL.Anastasia Stulova1-0/+1
Files compiled with C++ for OpenCL mode can now have a distinct file extension - clcpp, then clang driver picks the compilation mode automatically (-x clcpp) without the use of -cl-std=clc++. Differential Revision: https://reviews.llvm.org/D96771
2020-11-12[Frontend] Treat .cuh files as CUDA source filesAnatoliy Tomilov1-1/+1
to synchronize with tools/clang-format/git-clang-format tra: Keeping them in sync does have a minor benefit of not raising a question why the two maps are different. Differential Revision: https://reviews.llvm.org/D91034
2020-06-08Recognize *.hxx as a C++ header extension, like *.hpp.Sam McCall1-1/+1
Reviewers: kadircet Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D81366
2020-03-17[HIP] Let clang recognize .hip extensionYaxun (Sam) Liu1-0/+1
Differential Revision: https://reviews.llvm.org/D76039
2019-08-05Move LangStandard*, InputKind::Language to BasicRainer Orth1-18/+19
This patch is a prerequisite for using LangStandard from Driver in https://reviews.llvm.org/D64793. It moves LangStandard* and InputKind::Language to Basic. It is mostly mechanical, with only a few changes of note: - enum Language has been changed into enum class Language : uint8_t to avoid a clash between OpenCL in enum Language and OpenCL in enum LangFeatures and not to increase the size of class InputKind. - Now that getLangStandardForName, which is currently unused, also checks both canonical and alias names, I've introduced a helper getLangKind which factors out a code pattern already used 3 times. The patch has been tested on x86_64-pc-solaris2.11, sparcv9-sun-solaris2.11, and x86_64-pc-linux-gnu. There's a companion patch for lldb which uses LangStandard.h (https://reviews.llvm.org/D65717). While polly includes isl which in turn uses InputKind::C, that part of the code isn't even built inside the llvm tree. I've posted a patch to allow for both InputKind::C and Language::C upstream (https://groups.google.com/forum/#!topic/isl-development/6oEvNWOSQFE). Differential Revision: https://reviews.llvm.org/D65562 llvm-svn: 367864
2019-01-19Update the file headers across all of the LLVM projects in the monorepoChandler Carruth1-4/+3
to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
2018-03-26[Frontend] Fix some Clang-tidy modernize and Include What You Use warnings; ↵Eugene Zelenko1-1/+2
other minor fixes (NFC). llvm-svn: 328584
2017-04-28Move functionality for handling module maps as inputs from the -emit-moduleRichard Smith1-6/+6
action to the general FrontendAction infrastructure. This permits applying -E, -ast-dump, -fsyntax-only, and so on to a module map compilation. (The -E form is not currently especially useful yet as there's no good way to take the output and use it to actually build a module.) In order to support this, -cc1 now accepts -x <lang>-module-map in all cases where it accepts -x <lang> for a language we can parse (not ir/ast). And for uniformity, we also accept -x <lang>-header for all such languages (we used to reject for cuda and renderscript), and -x <lang>-cpp-output for all such languages (we used to reject for c, cl, and renderscript). (None of these new alternatives are accepted by the driver yet, so no user-visible changes.) llvm-svn: 301610
2017-04-26Refactor frontend InputKind to prepare for treating module maps as a ↵Richard Smith1-18/+18
distinct kind of input. No functionality change intended. llvm-svn: 301442
2016-08-26C++ Modules TS: add frontend support for building pcm files from moduleRichard Smith1-0/+2
interface files. At the moment, all declarations (and no macros) are exported, and 'export' declarations are not supported yet. llvm-svn: 279794
2015-03-19Ensure that we still parse preprocessed CUDA files as CUDA when we useArtem Belevich1-0/+1
-save-temps option. Summary: Fixes PR22926. Review: http://reviews.llvm.org/D8383 llvm-svn: 232737
2013-06-22Remove duplicated case.Benjamin Kramer1-1/+0
llvm-svn: 184640
2013-03-27<rdar://problem/13509689> Introduce -module-file-info option that provides ↵Douglas Gregor1-1/+1
information about a particular module file. This option can be useful for end users who want to know why they ended up with a ton of different variants of the "std" module in their module cache. This problem should go away over time, as we reduce the need for module variants, but it will never go away entirely. llvm-svn: 178148
2011-07-23remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner1-1/+1
LLVM.h imports them into the clang namespace. llvm-svn: 135852
2010-12-01Driver, Frontend: add CUDA language supportPeter Collingbourne1-0/+1
llvm-svn: 120544
2010-06-07Frontend: Add FrontendAction support for handling LLVM IR inputs.Daniel Dunbar1-0/+1
- These inputs follow an abbreviated execution path, but are still worth handling by FrontendAction so they reuse all the other clang -cc1 features. llvm-svn: 105582
2010-06-07Frontend: Lift InputKind enumeration to top level.Daniel Dunbar1-2/+1
llvm-svn: 105577
2009-11-17recognize .hpp as c++ (needed for ./configure'ing boost)Nuno Lopes1-1/+1
llvm-svn: 89100
2009-11-13Move input kind identification (-x) into FrontendOptions.Daniel Dunbar1-0/+31
llvm-svn: 87066