aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/InitHeaderSearch.cpp
AgeCommit message (Collapse)AuthorFilesLines
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
2012-10-24Move HeaderSearchOptions into the Lex library, make it intrusivelyDouglas Gregor1-1/+1
reference-counted, and hold a reference to it in HeaderSearch. llvm-svn: 166583
2012-09-13InitHeaderSearch.cpp: [mingw] Handle DOSish paths only on Win32 hosts.NAKAMURA Takumi1-0/+4
llvm-svn: 163776
2012-08-08clang support for Bitrig (an OpenBSD fork); patch by David Hill.Eli Friedman1-0/+1
llvm-svn: 161546
2012-08-02Correct AddDefaultCIncludePaths for OpenBSD to not include /usr/local/includeHans Wennborg1-0/+1
in the default search path. Compilers on *BSD OS's only include /usr/include by default. Contributed by Brad Smith <brad@comstyle.com> llvm-svn: 161173
2012-06-13Add -isystem-prefix and -ino-system-prefix arguments, which can be used toRichard Smith1-0/+13
override whether headers are system headers by checking for prefixes of the header name specified in the #include directive. This allows warnings to be disabled for third-party code which is found in specific subdirectories of include paths. llvm-svn: 158418
2012-03-25Since this change is generating a considerable amount of discussion (and ↵Aaron Ballman1-56/+46
possibly even a regression for known bad versions), I'm reverting it. llvm-svn: 153420
2012-03-25No longer hard coding paths to the MinGW include directories; using a ↵Aaron Ballman1-46/+56
regular expression instead. Patch thanks to Nikola Smiljanic llvm-svn: 153413
2012-03-15Adding in newer MinGW header paths.Aaron Ballman1-0/+3
Patch thanks to Nikola Smiljanic llvm-svn: 152801
2012-03-02Add the Solaris support directory to the header search when using libc++.David Chisnall1-0/+5
Unconditionally define __C99FEATURES__ when using C++ on Solaris. This is a (hopefully temporary) work around for libc++ exposing C99-but-not-C++98 features in C++98 mode. llvm-svn: 151889
2012-02-28Some more Solaris fixes. Now successfully building libc++ on Solaris with ↵David Chisnall1-7/+0
clang (and linking clang against it). llvm-svn: 151632
2012-02-15Add some Solaris include paths and fix a -lgcc_eh that apparently should be ↵David Chisnall1-0/+9
-lgcc_s. llvm-svn: 150602
2012-02-14include clang's config.h unconditionally (v2)Dylan Noblesmith1-4/+1
And remove HAVE_CLANG_CONFIG_H, now that the header is generated in the autoconf build, too. Reverts r149571/restores r149504, now that config.h is generated correctly by LLVM's configure in all build configurations. llvm-svn: 150487
2012-02-05Basic: import SmallString<> into clang namespaceDylan Noblesmith1-1/+1
(I was going to fix the TODO about DenseMap too, but that would break self-host right now. See PR11922.) llvm-svn: 149799
2012-02-03Replace the old --with-cxx-* configure options with a single ↵Rafael Espindola1-13/+0
--with-gcc-toolchain that just uses the new toolchain probing logic. This fixes linking with -m32 on 64 bit systems (the /32 dir was not being added to the search). llvm-svn: 149652
2012-02-02Back out my heinous hack that tricked the module generation mechanismDouglas Gregor1-0/+8
into using non-absolute system includes (<foo>)... ... and introduce another hack that is simultaneously more heineous and more effective. We whitelist Clang-supplied headers that augment or override system headers (such as float.h, stdarg.h, and tgmath.h). For these headers, Clang does not provide a module mapping. Instead, a system-supplied module map can refer to these headers in a system module, and Clang will look both in its own include directory and wherever the system-supplied module map suggests, then adds either or both headers. The end result is that Clang-supplied headers get merged into the system-supplied module for the C standard library. As a drive-by, fix up a few dependencies in the _Builtin_instrinsics module. llvm-svn: 149611
2012-02-02back out r149504Dylan Noblesmith1-1/+4
Too many weird build failures. llvm-svn: 149571
2012-02-01include clang's config.h unconditionallyDylan Noblesmith1-5/+3
And remove HAVE_CLANG_CONFIG_H, now that the header is generated in the autoconf build, too. (clang r149497 / llvm r149498) Also include the config.h header after all other headers, per the LLVM coding standards. It also turns out WindowsToolChain.cpp wasn't using the config header at all, so that include's just deleted now. llvm-svn: 149504