summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/InitHeaderSearch.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [frontend] Don't include the C++ stdlib for -x assembler-with-cppAlex Lorenz2018-06-281-2/+2
| | | | | | | | | | | | | | The new C++ stdlib warning added in r335081 gets triggered when compiling an assembly file with -x assembler-with-cpp. This commit ensures that the C++ stdlib is not included when compiling assembly. In general, it's not really useful to include the C++ stdlib search path when compiling assembly source. rdar://41359632 Differential Revision: https://reviews.llvm.org/D48736 llvm-svn: 335940
* Recommit r335063: [Darwin] Add a warning for missing include path for libstdc++Alex Lorenz2018-06-191-35/+48
| | | | | | | | | | | | | | | | The recommit ensures that the tests that failed on bots don't trigger the warning. Xcode 10 removes support for libstdc++, but the users just get a confusing include not file warning when including an STL header (when building for iOS6 which uses libstdc++ by default for example). This patch adds a new warning that lets the user know that the libstdc++ include path was not found to ensure that the user is more aware of why the error occurs. rdar://40830462 Differential Revision: https://reviews.llvm.org/D48297 llvm-svn: 335081
* Revert r335063 as it causes bot failuresAlex Lorenz2018-06-191-48/+35
| | | | llvm-svn: 335073
* [Darwin] Add a warning for missing include path for libstdc++Alex Lorenz2018-06-191-35/+48
| | | | | | | | | | | | | | Xcode 10 removes support for libstdc++, but the users just get a confusing include not file warning when including an STL header (when building for iOS6 which uses libstdc++ by default for example). This patch adds a new warning that lets the user know that the libstdc++ include path was not found to ensure that the user is more aware of why the error occurs. rdar://40830462 Differential Revision: https://reviews.llvm.org/D48297 llvm-svn: 335063
* s/LLVM_ON_WIN32/_WIN32/, clangNico Weber2018-04-271-1/+1
| | | | | | | | | | | LLVM_ON_WIN32 is set exactly with MSVC and MinGW (but not Cygwin) in HandleLLVMOptions.cmake, which is where _WIN32 defined too. Just use the default macro instead of a reinvented one. See thread "Replacing LLVM_ON_WIN32 with just _WIN32" on llvm-dev and cfe-dev. No intended behavior change. llvm-svn: 331069
* [Frontend] Avoid including default system header paths on FuchsiaPetr Hosek2018-03-021-0/+2
| | | | | | | | These paths aren't used and don't make sense on Fuchsia. Differential Revision: https://reviews.llvm.org/D43992 llvm-svn: 326542
* [Solaris] gcc toolchain handling revampFedor Sergeev2018-01-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: General idea is to utilize generic (mostly Generic_GCC) code and get rid of Solaris-specific handling as much as possible. In particular: - scanLibDirForGCCTripleSolaris was removed, relying on generic CollectLibDirsAndTriples - findBiarchMultilibs is now properly utilized to switch between m32 and m64 include & lib paths on Solaris - C system include handling copied from Linux (bar multilib hacks) Fixes PR24606. Reviewers: dlj, rafael, jyknight, theraven, tstellar Reviewed By: jyknight Subscribers: aaron.ballman, mgorny, krytarowski, ro, joerg, cfe-commits Differential Revision: https://reviews.llvm.org/D35755 llvm-svn: 323193
* Revert "Add /System/Library/PrivateFrameworks as a header search path."Douglas Gregor2017-10-021-1/+0
| | | | | | This reverts commit f7a95215a435aa8d5f64f43a8bb23ba077270755. llvm-svn: 314697
* Add /System/Library/PrivateFrameworks as a header search path.Douglas Gregor2017-09-141-0/+1
| | | | | | Addresses rdar://problem/34438708. llvm-svn: 313317
* Remove Bitrig: Clang ChangesErich Keane2017-07-211-1/+0
| | | | | | | | Bitrig code has been merged back to OpenBSD, thus the OS has been abandoned. Differential Revision: https://reviews.llvm.org/D35708 llvm-svn: 308797
* Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.Galina Kistanova2017-06-031-0/+2
| | | | llvm-svn: 304645
* [Frontend] Fix an issue where a quoted search path is incorrectlyAlex Lorenz2016-12-021-1/+1
| | | | | | | | | | | | | | | removed as a duplicate header search path The commit r126167 started passing the First index into RemoveDuplicates, but forgot to update 0 to First in the loop that looks for the duplicate. This resulted in a bug where an -iquoted search path was incorrectly removed if you passed in the same path into -iquote and more than one time into -isystem. rdar://23991350 Differential Revision: https://reviews.llvm.org/D27298 llvm-svn: 288491
* Use StringRef for MemoryBuffer identifier API (NFC)Mehdi Amini2016-10-011-1/+1
| | | | llvm-svn: 283043
* [NFC] Header cleanupMehdi Amini2016-07-181-2/+1
| | | | | | | | | | Summary: Removed unused headers, replaced some headers with forward class declarations Patch by: Eugene <claprix@yandex.ru> Differential Revision: https://reviews.llvm.org/D20100 llvm-svn: 275882
* [PS4] Change the names of some "environmental" things to what ourPaul Robinson2016-05-161-1/+1
| | | | | | | | licensees actually see in the toolchain we deliver to them. This will reduce the set of local patches we have to maintain. The triple is not changing. (The term ORBIS is an internal code name for PS4.) llvm-svn: 269671
* Update clang support on recent HaikuReid Kleckner2016-05-111-32/+33
| | | | | | | | | | | | | | | | | | [ Copied from https://llvm.org/bugs/show_bug.cgi?id=26404 ] clang support on Haiku is lagging a bit, and missing on x86_64. This patch updates support for x86 and add support for x86_64. It should apply directly to trunk and it's harmless in the sense that it only affects Haiku. Reviewers: rnk, rsmith Patch by Jérôme Duval Differential Revision: http://reviews.llvm.org/D16797 llvm-svn: 269201
* [ptr-traits] Add #includes of headers rather than forward declarationsChandler Carruth2015-12-301-0/+1
| | | | | | | | | | | | | | for types which are used as pointees in PointerUnions, PointerIntPairs, and DenseMap pointer keys. This is part of a series of patches to allow LLVM to check for complete pointee types when computing its pointer traits. This is absolutely necessary to get correct (or reproducible) results for things like how many low bits are guaranteed to be zero. I think this is the last patch for getting Clang clean here!!! llvm-svn: 256615
* Fix C++ support on recent DragonFly BSD releasesDimitry Andric2015-12-271-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: [ Copied from https://llvm.org/bugs/show_bug.cgi?id=25597 ] Clang support for DragonFly BSD is lagging a bit, resulting in poor support for c++. DragonFlyBSD is unique in that it has two base compilers. At the time of the last Clang update for DragonFly, these compilers were GCC 4.4 and GCC 4.7 (default). With DragonFly Release 4.2, GCC 4.4 was replaced with GCC 5.0, partially because the C++11 support of GCC 4.7 was incomplete. The DragonFly project will Release version 4.4 soon. This patch updates the Clang driver to use libstdc++ from GCC 5.2 The support for falling back to the alternate compiler was removed for two reasons: 1) The last release to use GCC 4.7 is DF 4.0 which has already reached EOL 2) GCC 4.7 libstdc++ is insufficient for many "ports" Therefore, I think it is reasonable that the development version of clang expects GCC 5.2 to be in place and not try to fall back to another compiler. The attached patch will do this. The Tools.cpp file was signficantly modified to fix the linking which had been changed somewhere along the line. The rest of the changes should be self-explanatory. Reviewers: joerg, rsmith, davide Subscribers: jrmarino, davide, cfe-commits Differential Revision: http://reviews.llvm.org/D15166 llvm-svn: 256467
* [x86] Exclusion of incorrect include headers paths for MCU targetAndrey Bokhanko2015-12-161-0/+2
| | | | | | | | Exclusion of /usr/include and /usr/local/include headers paths for MCU target. Differential Revision: http://reviews.llvm.org/D14954 llvm-svn: 255766
* Bring back r250262: PS4 toolchainFilipe Cabecinhas2015-10-141-0/+23
| | | | | | | | | | | | | | There was a minor problem with a test. Sorry for the noise yesterday. This patch adds missing pieces to clang, including the PS4 toolchain definition, added warnings, PS4 defaults, and Driver changes needed for our compiler. A patch by Filipe Cabecinhas, Pierre Gousseau and Katya Romanova! Differential Revision: http://reviews.llvm.org/D13482 llvm-svn: 250293
* Revert-to-green r250262 (PS4 toolchain patch)Sean Silva2015-10-141-23/+0
| | | | | | | It is breaking llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast e.g. http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/1362 llvm-svn: 250273
* I took care of the build problem in the commit 250252.Ekaterina Romanova2015-10-141-0/+23
| | | | | | | | | | | | | | Resubmitting the patch. This patch adds missing pieces to clang, including the PS4 toolchain definition, added warnings, PS4 defaults, and Driver changes needed for our compiler. A patch by Filipe Cabecinhas, Pierre Gousseau and Katya Romanova! Differential Revision: http://reviews.llvm.org/D13482 llvm-svn: 250262
* reverting my patch, cause build problemsEkaterina Romanova2015-10-141-23/+0
| | | | llvm-svn: 250257
* This patch adds missing pieces to clang, including the PS4 toolchainEkaterina Romanova2015-10-131-0/+23
| | | | | | | | | | | definition, added warnings, PS4 defaults, and Driver changes needed for our compiler. A patch by Filipe Cabecinhas, Pierre Gousseau and Katya Romanova! Differential Revision: http://reviews.llvm.org/D13482 llvm-svn: 250252
* C++11 rangify for loops, NFC.Yaron Keren2015-10-011-29/+21
| | | | llvm-svn: 249001
* Revert "This patch adds missing pieces to clang, including the PS4 toolchain ↵Greg Bedwell2015-09-251-23/+0
| | | | | | | | definition, added warnings, PS4 defaults, and Driver changes needed for our compiler." This reverts commit r248546 to get our bot green again while we discuss the best way forward. llvm-svn: 248578
* This patch adds missing pieces to clang, including the PS4 toolchainEkaterina Romanova2015-09-241-0/+23
| | | | | | | | | | | definition, added warnings, PS4 defaults, and Driver changes needed for our compiler. A patch by Filipe Cabecinhas, Pierre Gousseau and Katya Romanova! Differential Revision: http://reviews.llvm.org/D11279 llvm-svn: 248546
* [Solaris] Use the GCC Installation detector to add the C++ include paths.Rafael Espindola2015-09-091-9/+0
| | | | | | Patch by Xan López! llvm-svn: 247144
* Support mingw-w64 and mingw.org toolchains at any install location.Yaron Keren2015-07-021-60/+5
| | | | | | | | | | | | | No more hardcoded paths: clang will use -sysroot as gcc root location if provided. Otherwise, it will search for gcc on the path. If not found it will use the driver installed location. http://reviews.llvm.org/D5268 Patch by Ruben Van Boxem, Martell Malone, Yaron Keren. Reviewed by Reid Kleckner. llvm-svn: 241241
* Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial typesBenjamin Kramer2015-05-291-1/+1
| | | | | | | | | | | | | | | | | | | | If the type isn't trivially moveable emplace can skip a potentially expensive move. It also saves a couple of characters. Call sites were found with the ASTMatcher + some semi-automated cleanup. memberCallExpr( argumentCountIs(1), callee(methodDecl(hasName("push_back"))), on(hasType(recordDecl(has(namedDecl(hasName("emplace_back")))))), hasArgument(0, bindTemporaryExpr( hasType(recordDecl(hasNonTrivialDestructor())), has(constructExpr()))), unless(isInTemplateInstantiation())) No functional change intended. llvm-svn: 238601
* Add driver support for Native Client SDKDerek Schuff2015-03-301-0/+2
| | | | | | | | | | | | | | Add Tool and ToolChain support for clang to target the NaCl OS using the NaCl SDK for x86-32, x86-64 and ARM. Includes nacltools::Assemble and Link which are derived from gnutools. They are similar to Linux but different enought that they warrant their own class. Also includes a NaCl_TC in ToolChains derived from Generic_ELF with library and include paths suitable for an SDK and independent of the system tools. Differential Revision: http://reviews.llvm.org/D8590 llvm-svn: 233594
* Remove many superfluous SmallString::str() calls.Yaron Keren2015-03-181-7/+7
| | | | | | | | | | | | | | | Now that SmallString is a first-class citizen, most SmallString::str() calls are not required. This patch removes a whole bunch of them, yet there are lots more. There are two use cases where str() is really needed: 1) To use one of StringRef member functions which is not available in SmallString. 2) To convert to std::string, as StringRef implicitly converts while SmallString do not. We may wish to change this, but it may introduce ambiguity. llvm-svn: 232622
* Fix up default header paths for CloudABI.Ed Schouten2015-03-111-1/+16
| | | | | | | | | | | CloudABI is a pure cross compilation target. This means that we should not add /usr/include and /usr/local/include. Instead, headers are stored in $sysroot/$triple/include. The method of going back to the sysroot (by using "../../..") is also used in this function for some of the other environments (e.g., MinGW). llvm-svn: 231913
* Use isOSBinFormatMachO() instead of comparing the object formatEric Christopher2014-12-051-1/+1
| | | | | | against an enum. llvm-svn: 223422
* Update for LLVM API change to make Small(Ptr)Set::insert return ↵David Blaikie2014-11-191-3/+3
| | | | | | pair<iterator, bool> as per the C++ standard's associative container concept. llvm-svn: 222335
* Add the break in the switch case (even if there is llvm_unreachable. It will ↵Sylvestre Ledru2014-08-181-1/+1
| | | | | | silent coverity warning CID 1231654 llvm-svn: 215897
* Delete support for AuroraUX.Rafael Espindola2014-08-141-5/+0
| | | | | | auroraux.org is not resolving. llvm-svn: 215644
* AArch64: update Clang for merged arm64/aarch64 triples.Tim Northover2014-07-231-1/+0
| | | | | | | | | | | | | | The main subtlety here is that the Darwin tools still need to be given "-arch arm64" rather than "-arch aarch64". Fortunately this already goes via a custom function to handle weird edge-cases in other architectures, and it tested. I removed a few arm64_be tests because that really isn't an interesting thing to worry about. No-one using big-endian is also referring to the target as arm64 (at least as far as toolchains go). Mostly they date from when arm64 was a separate target and we *did* need a parallel name simply to test it at all. Now aarch64_be is sufficient. llvm-svn: 213744
* Fix crash with x86_64-pc-win32-macho target. <rdar://problem/17235840>Bob Wilson2014-06-101-1/+2
| | | | | | | | The changes in r204978 broke win32-macho targets. There were checks added for MSVC and Itanium environments as special cases, and win32-macho needs to be treated the same way. llvm-svn: 210584
* AArch64/ARM64: rename ARM64 components to AArch64Tim Northover2014-05-241-0/+1
| | | | | | This keeps Clang consistent with backend naming conventions. llvm-svn: 209579
* ARM64: initial clang support commit.Tim Northover2014-03-291-0/+5
| | | | | | | | | | | This adds Clang support for the ARM64 backend. There are definitely still some rough edges, so please bring up any issues you see with this patch. As with the LLVM commit though, we think it'll be more useful for merging with AArch64 from within the tree. llvm-svn: 205100
* Use the new Windows environment for target detectionSaleem Abdulrasool2014-03-271-34/+44
| | | | | | | | | This follows the LLVM change to canonicalise the Windows target triple spellings. Rather than treating each Windows environment as a single entity, the environments are now modelled properly as an environment. This is a mechanical change to convert the triple use to reflect that change. llvm-svn: 204978
* Dont unconditionally add gcc4.2 include paths on FreeBSD.Roman Divacky2014-03-121-5/+0
| | | | | | Newer FreeBSD doesnt ship with gcc and defaults to using libc++. llvm-svn: 203700
* Check for LLVM_ON_WIN32 instead of _WIN32.Hans Wennborg2014-03-121-3/+3
| | | | | | This is a follow-up to r203624 to address Anton's comment. llvm-svn: 203668
* With the new update to the ABI, we should not look for installationsYaron Keren2013-12-121-16/+12
| | | | | | | | | | | of MinGW older than 4.7 with incompatible C++ libraries. This patch makes clang look for all MinGW versions from 4.7: 4.7.0, 4.7.1, 4.7.2, 4.7.3 4.8.0, 4.8.1, 4.8.2. llvm-svn: 197176
* Darwin: Look for libc++ headers in include/, rather than lib/Justin Bogner2013-11-151-5/+7
| | | | | | | | | | | | Up until now we were expecting that when libc++ is installed alongside clang the headers would be in lib/, which was true if the configure build was used and false if the cmake build was. We've now corrected the configure build to install in include/, and with this change we'll be able to find the correct headers with both build systems. llvm-svn: 194834
* Add another MinGW header include pathHans Wennborg2013-10-181-0/+1
| | | | llvm-svn: 192982
* InitHeaderSearch.cpp: [Cygwin] Add 4.7.3.NAKAMURA Takumi2013-08-181-0/+1
| | | | llvm-svn: 188638
* Modernize some low-hanging PathV1 uses.Benjamin Kramer2013-06-131-17/+21
| | | | llvm-svn: 183903
* Include PathV1.h in files that use it.Rafael Espindola2013-06-111-0/+1
| | | | | | This is preparation for replacing Path.h with PathV2.h. llvm-svn: 183781
OpenPOWER on IntegriCloud