aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/InitHeaderSearch.cpp
AgeCommit message (Collapse)AuthorFilesLines
2017-06-03Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.Galina Kistanova1-0/+2
llvm-svn: 304645
2016-12-02[Frontend] Fix an issue where a quoted search path is incorrectlyAlex Lorenz1-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
2016-10-01Use StringRef for MemoryBuffer identifier API (NFC)Mehdi Amini1-1/+1
llvm-svn: 283043
2016-07-18[NFC] Header cleanupMehdi Amini1-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
2016-05-16[PS4] Change the names of some "environmental" things to what ourPaul Robinson1-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
2016-05-11Update clang support on recent HaikuReid Kleckner1-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
2015-12-30[ptr-traits] Add #includes of headers rather than forward declarationsChandler Carruth1-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
2015-12-27Fix C++ support on recent DragonFly BSD releasesDimitry Andric1-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
2015-12-16[x86] Exclusion of incorrect include headers paths for MCU targetAndrey Bokhanko1-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
2015-10-14Bring back r250262: PS4 toolchainFilipe Cabecinhas1-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
2015-10-14Revert-to-green r250262 (PS4 toolchain patch)Sean Silva1-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
2015-10-14I took care of the build problem in the commit 250252.Ekaterina Romanova1-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
2015-10-14reverting my patch, cause build problemsEkaterina Romanova1-23/+0
llvm-svn: 250257
2015-10-13This patch adds missing pieces to clang, including the PS4 toolchainEkaterina Romanova1-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
2015-10-01C++11 rangify for loops, NFC.Yaron Keren1-29/+21
llvm-svn: 249001
2015-09-25Revert "This patch adds missing pieces to clang, including the PS4 toolchain ↵Greg Bedwell1-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
2015-09-24This patch adds missing pieces to clang, including the PS4 toolchainEkaterina Romanova1-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
2015-09-09[Solaris] Use the GCC Installation detector to add the C++ include paths.Rafael Espindola1-9/+0
Patch by Xan López! llvm-svn: 247144
2015-07-02Support mingw-w64 and mingw.org toolchains at any install location.Yaron Keren1-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
2015-05-29Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial typesBenjamin Kramer1-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
2015-03-30Add driver support for Native Client SDKDerek Schuff1-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
2015-03-18Remove many superfluous SmallString::str() calls.Yaron Keren1-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
2015-03-11Fix up default header paths for CloudABI.Ed Schouten1-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
2014-12-05Use isOSBinFormatMachO() instead of comparing the object formatEric Christopher1-1/+1
against an enum. llvm-svn: 223422
2014-11-19Update for LLVM API change to make Small(Ptr)Set::insert return ↵David Blaikie1-3/+3
pair<iterator, bool> as per the C++ standard's associative container concept. llvm-svn: 222335
2014-08-18Add the break in the switch case (even if there is llvm_unreachable. It will ↵Sylvestre Ledru1-1/+1
silent coverity warning CID 1231654 llvm-svn: 215897
2014-08-14Delete support for AuroraUX.Rafael Espindola1-5/+0
auroraux.org is not resolving. llvm-svn: 215644
2014-07-23AArch64: update Clang for merged arm64/aarch64 triples.Tim Northover1-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
2014-06-10Fix crash with x86_64-pc-win32-macho target. <rdar://problem/17235840>Bob Wilson1-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
2014-05-24AArch64/ARM64: rename ARM64 components to AArch64Tim Northover1-0/+1
This keeps Clang consistent with backend naming conventions. llvm-svn: 209579
2014-03-29ARM64: initial clang support commit.Tim Northover1-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
2014-03-27Use the new Windows environment for target detectionSaleem Abdulrasool1-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
2014-03-12Dont unconditionally add gcc4.2 include paths on FreeBSD.Roman Divacky1-5/+0
Newer FreeBSD doesnt ship with gcc and defaults to using libc++. llvm-svn: 203700
2014-03-12Check for LLVM_ON_WIN32 instead of _WIN32.Hans Wennborg1-3/+3
This is a follow-up to r203624 to address Anton's comment. llvm-svn: 203668
2013-12-12With the new update to the ABI, we should not look for installationsYaron Keren1-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
2013-11-15Darwin: Look for libc++ headers in include/, rather than lib/Justin Bogner1-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
2013-10-18Add another MinGW header include pathHans Wennborg1-0/+1
llvm-svn: 192982
2013-08-18InitHeaderSearch.cpp: [Cygwin] Add 4.7.3.NAKAMURA Takumi1-0/+1
llvm-svn: 188638
2013-06-13Modernize some low-hanging PathV1 uses.Benjamin Kramer1-17/+21
llvm-svn: 183903
2013-06-11Include PathV1.h in files that use it.Rafael Espindola1-0/+1
This is preparation for replacing Path.h with PathV2.h. llvm-svn: 183781
2013-04-30Add support for -stdlib=libc++ in the NetBSD toolchain.Joerg Sonnenberger1-3/+0
llvm-svn: 180766
2013-04-11Fix the driver logic for recent versions of DragonFly.John McCall1-1/+5
Patch by John Marino. llvm-svn: 179334
2013-01-30[Frontend] Factor AddUnmappedPath() out of AddPath() and simplify.Daniel Dunbar1-15/+33
llvm-svn: 173871
2013-01-30[Frontend] Add an ExternCSystem include entry group.Daniel Dunbar1-74/+69
- The only group where it makes sense for the "ExternC" bit is System, so this simplifies having to have the extra isCXXAware (or ImplicitExternC, depending on what code you talk to) bit caried around. llvm-svn: 173859
2013-01-29[Frontend] Make the include dir group independent from the "use sysroot" bit.Daniel Dunbar1-3/+1
- This slightly decouples the path handling, since before the group sometimes dominated the "use sysroot" bit, but it was still passed in via the API. - No functionality change. llvm-svn: 173855
2013-01-29[Frontend] Rename a member variable to clarify its intent.Daniel Dunbar1-5/+6
llvm-svn: 173854
2013-01-29[Frontend] Factor out helper function, for clarity.Daniel Dunbar1-9/+10
llvm-svn: 173853
2013-01-25[Frontend] Drop the isUserSupplied argument to InitHeaderSearch, it is unused.Daniel Dunbar1-72/+63
llvm-svn: 173411
2013-01-25[Lex] Remove DirectoryLookup.UserSpecified, which is unused.Daniel Dunbar1-4/+5
llvm-svn: 173409
2012-12-04Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth1-5/+4
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. llvm-svn: 169237