aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/InitHeaderSearch.cpp
AgeCommit message (Collapse)Author
2013-04-30Add support for -stdlib=libc++ in the NetBSD toolchain.Joerg Sonnenberger
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180766 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-11Fix the driver logic for recent versions of DragonFly.John McCall
Patch by John Marino. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179334 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-30[Frontend] Factor AddUnmappedPath() out of AddPath() and simplify.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173871 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-30[Frontend] Add an ExternCSystem include entry group.Daniel Dunbar
- 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173859 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-29[Frontend] Make the include dir group independent from the "use sysroot" bit.Daniel Dunbar
- 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173855 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-29[Frontend] Rename a member variable to clarify its intent.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173854 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-29[Frontend] Factor out helper function, for clarity.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173853 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25[Frontend] Drop the isUserSupplied argument to InitHeaderSearch, it is unused.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173411 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25[Lex] Remove DirectoryLookup.UserSpecified, which is unused.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173409 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-04Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169237 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-24Move HeaderSearchOptions into the Lex library, make it intrusivelyDouglas Gregor
reference-counted, and hold a reference to it in HeaderSearch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166583 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-13InitHeaderSearch.cpp: [mingw] Handle DOSish paths only on Win32 hosts.NAKAMURA Takumi
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163776 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-08clang support for Bitrig (an OpenBSD fork); patch by David Hill.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161546 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-02Correct AddDefaultCIncludePaths for OpenBSD to not include /usr/local/includeHans Wennborg
in the default search path. Compilers on *BSD OS's only include /usr/include by default. Contributed by Brad Smith <brad@comstyle.com> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161173 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-13Add -isystem-prefix and -ino-system-prefix arguments, which can be used toRichard Smith
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158418 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-25Since this change is generating a considerable amount of discussion (and ↵Aaron Ballman
possibly even a regression for known bad versions), I'm reverting it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153420 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-25No longer hard coding paths to the MinGW include directories; using a ↵Aaron Ballman
regular expression instead. Patch thanks to Nikola Smiljanic git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153413 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-15Adding in newer MinGW header paths.Aaron Ballman
Patch thanks to Nikola Smiljanic git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152801 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-02Add the Solaris support directory to the header search when using libc++.David Chisnall
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151889 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-28Some more Solaris fixes. Now successfully building libc++ on Solaris with ↵David Chisnall
clang (and linking clang against it). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151632 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-15Add some Solaris include paths and fix a -lgcc_eh that apparently should be ↵David Chisnall
-lgcc_s. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150602 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-14include clang's config.h unconditionally (v2)Dylan Noblesmith
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150487 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-05Basic: import SmallString<> into clang namespaceDylan Noblesmith
(I was going to fix the TODO about DenseMap too, but that would break self-host right now. See PR11922.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149799 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-03Replace the old --with-cxx-* configure options with a single ↵Rafael Espindola
--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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149652 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-02Back out my heinous hack that tricked the module generation mechanismDouglas Gregor
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149611 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-02back out r149504Dylan Noblesmith
Too many weird build failures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149571 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-01include clang's config.h unconditionallyDylan Noblesmith
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149504 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-21lib/Frontend/InitHeaderSearch.cpp: [Cygwin] Add 4.5.3.NAKAMURA Takumi
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148637 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-21[Cygwin] Abandon Cygwin-1.5 and g++-3. Use g++-4.3 and higher on Cygwin-1.7.NAKAMURA Takumi
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148636 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-28Add a couple more GCC versions to C++ search paths for MinGW. Patch by ↵Eli Friedman
Ruben Van Boxem. (We should probably start doing some sort of autodetection like we do on Linux at some point.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145326 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-05Move the Linux header searching from the Frontend to the Driver. This isChandler Carruth
the first (and diff-noisiest) step to making Linux header searching tremendously more principled and less brittle. Note that this step should have essentially no functional impact. We still search the exact same set of paths in the exact same order. The only change here is where the code implementing such a search lives. This has one obvious negative impact -- we now pass a ludicrous number of flags to the CC1 layer. That should go away as I re-base this logic on the logic to detect a GCC installation. I want to do this in two phases so the bots can tell me if this step alone breaks something, and so that the diffs of the refactoring make more sense. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143822 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-05Add two flags to the CC1 layer that I was hoping to avoid. We need toChandler Carruth
encode the *exact* semantics which the header search paths internally built by the Frontend layer have had, which is both non-user-provided, and at times adding the implicit extern "C" bit to the directory entry. There are lots of CC1 options that are very close, but none do quite this, and they are all already overloaded for other purposes. In some senses this makes the command lines more clean as it clearly indicates which flags are exclusively used to implement internal detection of "standard" header search paths. Lots of the implementation of this is really crufty, due to the surrounding cruft. It doesn't seem worth investing lots of time cleaning this up as it isn't new, and hopefully *lots* of this code will melt away as header search inside of the frontend becomes increasingly trivial. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143798 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-04Begin the migration of header search logic to the driver, starting withChandler Carruth
Windows. There are still FIXMEs and lots of problems with this code. Some of them will be addressed shortly by my follow-up patches, but most are going to wait until we isolate this code and can fix it properly. This version should be no worse than what we had before. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143752 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-02Add the newest Gentoo GCC version based on the reported installedChandler Carruth
version in PR11298. I hear-by apologize for adding yet more code to this monstrosity. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143567 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-31Add "just one more" include path to the monstrosity that is our headerChandler Carruth
search logic. The Debian multiarch seems to have completely changed from when these were originally added, and I'd like to remove a bunch of them, but I'll be lazy and delay that until this logic is hoisted into the driver where it belongs. This should resolve PR11223. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143345 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-11Frontend: Replace -nostdinc by -nostdsysteminc (which is just system includeDaniel Dunbar
paths). The -nostdinc behavior is now -nostdsysteminc + -nobuiltininc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141691 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-10When an included non-system directory duplicates a system directory the clang Chad Rosier
frontend removes the non-system directory to maintain gcc compatibility. When this happens NumAngled needs to be updated. PR11097 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141565 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-04Fix include path detection on Fedora 15 with GCC 4.6.1. Patch by Arthur Haas.Justin Holewinski
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141086 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-23Reenable -cxx-isystem for Objective C++, until I come up with a better solutionBenjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140365 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-22Add support for CPATH and friends.Benjamin Kramer
This moves the existing code for CPATH into the driver and adds the environment lookup and path splitting there. The paths are then passed down to cc1 with -I options (CPATH), added after the normal user-specified include dirs. Language specific paths are passed via -LANG-isystem and the actual filtering is performed in the frontend. I tried to match GCC's behavior as close as possible Fixes PR8971. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140341 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-13For modules, use a hash of the compiler version, language options, andDouglas Gregor
target triple to separate modules built under different conditions. The hash is used to create a subdirectory in the module cache path where other invocations of the compiler (with the same version, language options, etc.) can find the precompiled modules. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139662 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-12Introduce a cc1-level option to provide the path to the module cache,Douglas Gregor
where the compiler will look for module files. Eliminates the egregious hack where we looked into the header search paths for modules. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139538 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-29Some minor updates to the Linux search path handling for Slackware. Patch ↵Eli Friedman
by Will Dietz. PR10692. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138753 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-17Add Gentoo gcc 4.3.4 include pathsNico Weber
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137834 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-29On Darwin, libc++ may be installed alongside the compiler inDouglas Gregor
lib/c++/v1. Look there first, before falling back to the normal /usr/include/c++/v1. <rdar://problem/9866149> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136507 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28Introduce the "-index-header-map" option, to give special semanticsDouglas Gregor
for quoted header lookup when dealing with not-yet-installed frameworks. Fixes <rdar://problem/9824020>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136331 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-23remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner
LLVM.h imports them into the clang namespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135852 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-16Do not modify string returned by getenv on Windows. Francois Pichet
Fixes PR9875, patch by Nikola Smiljanic! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135356 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-05Update header-search paths for MinGW, from Ruben Van BoxemDouglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134406 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-02Make the GCC version proliferation worse by N+1 for the sake ofChandler Carruth
ArchLinux. =/ Fixes PR10246. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134299 91177308-0d34-0410-b5e6-96231b3b80d8