summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fully merge the Clang ReleaseNotes into the 3.0 branch.upstream/release_30Chandler Carruth2011-12-011-0/+383
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_30@145546 91177308-0d34-0410-b5e6-96231b3b80d8
* Merge r143770 from mainline to fix MSVC build.Tanya Lattner2011-11-172-2/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_30@144894 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r142531:Bill Wendling2011-11-104-9/+11
| | | | | | | | | | | | | ------------------------------------------------------------------------ r142531 | rafael | 2011-10-19 07:50:34 -0700 (Wed, 19 Oct 2011) | 3 lines Fix the signatures of vfork, __sigsetjmp and sigsetjmp. Patch by Dimitry Andric. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_30@144262 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r143917:Chandler Carruth2011-11-074-24/+6
| | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r143917 | chandlerc | 2011-11-07 01:17:31 -0800 (Mon, 07 Nov 2011) | 12 lines Rip out one of the features I added for the driver-include-management. We don't actually need a separate flag for non-sysrooted paths as the driver has to manage the sysroot anyways. The driver is not infrequently adding paths to the header search based on their existence on the filesystem. For that, it has to add the sysroot anyways, we should pass it on down to CC1 already joined. More importantly, the driver cannot in all cases distinguish between sysrooted paths and paths that are relative to the Clang binary's installation directory. Essentially, we always need to ignore the system root for these internal header search options. It turns out in most of the places we were already providing the system root in the driver, and then another one in CC1 so this fixes several bugs. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_30@143956 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r143916:Chandler Carruth2011-11-071-0/+8
| | | | | | | | | | | | | | ------------------------------------------------------------------------ r143916 | chandlerc | 2011-11-07 01:01:17 -0800 (Mon, 07 Nov 2011) | 4 lines Fix Linux libc++ usage. Somehow this slipped through during the port. Test cases for this and all the rest of the port are still in the works, but will wait for a fixed computer and post 3.0 merging... ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_30@143955 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r143897:Chandler Carruth2011-11-071-5/+0
| | | | | | | | | | | | ------------------------------------------------------------------------ r143897 | chandlerc | 2011-11-06 15:10:49 -0800 (Sun, 06 Nov 2011) | 2 lines Remove an old OpenSUSE hack that is no longer needed -- it is exactly the same as a directory added further down in the new logic. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_30@143954 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r143896:Chandler Carruth2011-11-071-43/+25
| | | | | | | | | | | | | ------------------------------------------------------------------------ r143896 | chandlerc | 2011-11-06 15:09:05 -0800 (Sun, 06 Nov 2011) | 3 lines Remove the HasMultilib check. It was essentially useless. The driver now looks for evidence of a multilib installation, and adds the appropriate bits to the search paths. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_30@143953 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r143875:Chandler Carruth2011-11-072-6/+6
| | | | | | | | | | | | ------------------------------------------------------------------------ r143875 | chandlerc | 2011-11-06 02:51:30 -0800 (Sun, 06 Nov 2011) | 2 lines The version objects need to actually store the version strings; they aren't guaranteed to live long enough otherwise. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_30@143952 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r143874:Chandler Carruth2011-11-071-334/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r143874 | chandlerc | 2011-11-06 02:31:01 -0800 (Sun, 06 Nov 2011) | 16 lines Throw the switch and move all Linux header search over to the GCC detection system that is providing the library paths and crt object files. This, modulo any bugs that need to be shaken out, resolves numerous bugs with how we handle header paths. Here are a few that I know of: - We no longer need to enumerate all GCC versions searched. - OpenSUSE searched GCC versions in the wrong order. - There were typos when selecting various patterns, etc. - We aren't stating quite some many directories now. - SysRoot didn't always work in a reasonable way. I'm working on tests for this, but the tests are making me and Lit sad. The real testing for this type of driver change is to try it out on various distributions. I'll hit the common ones right away, and start more thorough testing tomorrow after some sleep. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_30@143951 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r143873:Chandler Carruth2011-11-071-1/+2
| | | | | | | | | | | | ------------------------------------------------------------------------ r143873 | chandlerc | 2011-11-06 02:30:58 -0800 (Sun, 06 Nov 2011) | 2 lines Add a missing triple spotted by inspecting and testing of the include path triples. Also order the 32-bit triples a bit more reasonably. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_30@143949 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r143871:Chandler Carruth2011-11-072-84/+93
| | | | | | | | | | | | | ------------------------------------------------------------------------ r143871 | chandlerc | 2011-11-06 01:39:46 -0800 (Sun, 06 Nov 2011) | 3 lines Lift the GCCVersion type into the header file and start persisting it in the detected GCC installation. This allows us to expose another aspect of what we detected: the GCC version. This will be used shortly. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_30@143948 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r143869:Chandler Carruth2011-11-072-8/+7
| | | | | | | | | | | | ------------------------------------------------------------------------ r143869 | chandlerc | 2011-11-06 01:21:54 -0800 (Sun, 06 Nov 2011) | 2 lines Switch some of these interfaces from std::string to StringRef and Twine. This will facilitate further use and recombinations of them. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_30@143947 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r143866:Chandler Carruth2011-11-071-14/+35
| | | | | | | | | | | | | | ------------------------------------------------------------------------ r143866 | chandlerc | 2011-11-06 01:21:07 -0700 (Sun, 06 Nov 2011) | 4 lines Take a better approach to detecting and selecting multiarch include directories. This way we stop at the first multiarch directory found on the system. This achieves the real intended result of pruning non-existent directories. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_30@143946 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r143863:Chandler Carruth2011-11-071-5/+5
| | | | | | | | | | | | | | ------------------------------------------------------------------------ r143863 | chandlerc | 2011-11-05 23:59:15 -0700 (Sat, 05 Nov 2011) | 4 lines This test was assuming that /usr/include was in the system header search path. That assumption should never have been true, but it was until I fixed it. Now that its fixed, add a triple here to get correct behavior even on Windows. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_30@143945 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r143842:Chandler Carruth2011-11-071-14/+8
| | | | | | | | | | | | | ------------------------------------------------------------------------ r143842 | chandlerc | 2011-11-05 16:29:28 -0700 (Sat, 05 Nov 2011) | 3 lines Switch Lit to directly query the driver for the builtin inclue path. Thanks to Peter for pointing out how easy this is to do. I'm now much happier with this solution. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_30@143944 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r143841:Chandler Carruth2011-11-0715-18/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r143841 | chandlerc | 2011-11-05 16:24:30 -0700 (Sat, 05 Nov 2011) | 22 lines Enhance the GCC version parsing and comparison logic to handle some more edge cases and have better behavior. Specifically, we should actually prefer the general '4.6' version string over the '4.6.1' string, as '4.6.2' should be able to replace it without breaking rpaths or any other place that these paths have been embedded. Debian-based distributions are already using a path structure with symlinks to achieve in-place upgrades for patch versions. Now our parsing reflects this and we select the shorter paths instead of the longer paths. A separate issue was that we would not parse a leading patch version number even in the presence of a suffix. The above change makes this more problematic as it would cause a suffix being added to make us treat the entire thing as patch-version-agnostic, which it isn't. This changes the logic to distinguish between '4.4.x' and 4.4.1-x', and retain that the latter has *some* patch number information. Currently, we always bias toward the shorter and more canonical version strings. If it becomes important we can add more Debian like rules to produce sequences such as '4.4.1b' > '4.4.1' > '4.4.1-rc3' > '4.4.1-rc2' > '4.4.1-pre5', but I'm very doubtful this will ever matter or be desirable. I've made the tests for this logic a bit more interesting, and added some specific tests for logic that is now different. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_30@143943 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r143840:Chandler Carruth2011-11-072-4/+2
| | | | | | | | | | | | | | ------------------------------------------------------------------------ r143840 | chandlerc | 2011-11-05 15:23:14 -0700 (Sat, 05 Nov 2011) | 4 lines Remove a pointless member. I have no idea why I made this not a local variable to begin with... As I'm planning to add include root information to this object, this would have caused confusion. It didn't even *actually* hold the include root by the time we were done with it. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_30@143942 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r143839:Chandler Carruth2011-11-071-12/+4
| | | | | | | | | | | | ------------------------------------------------------------------------ r143839 | chandlerc | 2011-11-05 15:23:11 -0700 (Sat, 05 Nov 2011) | 2 lines Remove a no-longer needed helper function. Thanks for implementing this Michael! ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_30@143941 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r143838:Chandler Carruth2011-11-072-236/+249
| | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r143838 | chandlerc | 2011-11-05 15:07:51 -0700 (Sat, 05 Nov 2011) | 10 lines Move the GCC installation detection helper a member of the Linux toolchain instead of merely using it in the constructor. This will allow us to query it when building include paths as well as the file search paths built in the constructor. I've lifted as little of it as I could into the header file. Eventually this will likely sink down into some of the Generic toolchains and be used on more platforms, but I'm starting on Linux so I can work out all the APIs needed there, where it is easiest to test and we have the most pressing need. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_30@143940 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r143836:Chandler Carruth2011-11-071-9/+0
| | | | | | | | | | | | | | | ------------------------------------------------------------------------ r143836 | chandlerc | 2011-11-05 14:26:18 -0700 (Sat, 05 Nov 2011) | 5 lines Remove support for Gentoo subversion-ebuild installed llvm-gcc libstdc++ headers. As llvm-gcc is dead, and I have no idea if this ever really worked, I think it's time for it to go. More importantly, it makes it harder to generalize the include search logic. If someone really wants these to work, they can set the CPLUS_INCLUDE_PATH environment variable. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_30@143939 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r143823:Chandler Carruth2011-11-071-7/+17
| | | | | | | | | | | | | | ------------------------------------------------------------------------ r143823 | chandlerc | 2011-11-05 13:55:50 -0700 (Sat, 05 Nov 2011) | 4 lines Teach lit to ask the Clang it is running what version string to use rather than presuming that it is 3.0. This is extra important as the version should be 3.1, but CMake hasn't caught up with the times. That'll be fixed in a separate commit. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_30@143938 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r143822:Chandler Carruth2011-11-074-288/+471
| | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r143822 | chandlerc | 2011-11-05 13:17:13 -0700 (Sat, 05 Nov 2011) | 12 lines Move the Linux header searching from the Frontend to the Driver. This is 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/branches/release_30@143937 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r143807:Chandler Carruth2011-11-071-1/+3
| | | | | | | | | | | | | | ------------------------------------------------------------------------ r143807 | chandlerc | 2011-11-05 03:41:42 -0700 (Sat, 05 Nov 2011) | 4 lines Compute the path properly on different platforms. Specifically, compute it the exact same way that the Clang code computes this path. Hopefully with this, the MSVC bots will actually come back to life. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_30@143936 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r143806:Chandler Carruth2011-11-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r143806 | chandlerc | 2011-11-05 03:15:33 -0700 (Sat, 05 Nov 2011) | 15 lines Change this test to reflect the state we are moving in. The Clang builtin headers are no longer going to receive the old 'implicit extern "C" block' semantics. This hint is actually ignored by both Clang and GCC at this point, and Clang's own builtin headers can simply be changed if there is any issue with this. Clang should be free to include these however it wants, and so shorter and simpler is better. Note: *nothing* is changing about the *system* stddef.h include. That should always have the exact same include semantics, whether with Clang or GCC or any other compiler. Only the compiler-builtin header search path is changing. If anyone knows of some risk that this introduces that I've not thought of, please chime in. So far, only Windows has switched to the Brave New World, but others should be switching soon. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_30@143935 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r143805:Chandler Carruth2011-11-072-4/+4
| | | | | | | | | | | | | | ------------------------------------------------------------------------ r143805 | chandlerc | 2011-11-05 03:15:30 -0700 (Sat, 05 Nov 2011) | 4 lines Switch these two tests to use the Clang driver instead of CC1. They want to do "realistic" includes, and so need the header search logic now in the driver. This in turn requires switching the CC1 options to the actual driver options, and passing -Xclang where there is no analogy. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_30@143934 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r143804:Chandler Carruth2011-11-071-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r143804 | chandlerc | 2011-11-05 03:15:27 -0700 (Sat, 05 Nov 2011) | 38 lines Teach Lit to pass the CC1 invocation the builtin include directory. This is a pretty gross hack, but I don't have any significantly cleaner ideas for this. There are several things obviously gross about it: 1) Lit shouldn't know that Clang needs this. This really that bad, as Lit already knows about CC1 and other internal details. 2) This hard codes the '3.0' version number, which is pretty lame. 3) This hard codes every other aspect of the resource dir structure which is less lame than the version number, but still not great. However, it should bring the MSVC tests back to life, and it should unblock the rest of the move from Frontend to Driver, so I think it's worth a bit of grossness that is isolated in our testing infrastructure while we figure out the best long term approach. I have the following ideas, some of which only solve part of the problem (and thus might need to be combined with other ideas): a) Create a symlink or other convenience path instead of a version number. b) Run 'clang' directly in the lit.cfg, look at its resource dir, and use that. c) Switch all the tests to use the driver instead of CC1. d) Hack the frontend to synthesize builtin include directories when none are provided by the driver. I don't like (d) because it feels very hackish and likely to break. We can only solve a small part of the problem with (a). I wanted to vote for (c), but lots of the tests in this bucket are really heavily using internal-only flags like -verify and -triple. I'm loath to complicate them with the full driver layer. Also, switching them to the driver adds more than just builtin headers, but all of the rest of the system headers! This leaves me with (b). If others like (b), I'll switch to it, but it felt a bit icky. Nothing concrete, and the other options look significantly worse, but I felt icky enough that I wanted to start with a more brain-dead patch to stop the bleeding, and gauge others' feelings here. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_30@143933 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r143801:Chandler Carruth2011-11-073-4/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r143801 | chandlerc | 2011-11-05 02:24:44 -0700 (Sat, 05 Nov 2011) | 20 lines Fix a significant oversight in my move of MSVC includes to the driver: actually manage the builtin header file includes as well as the system ones. This one is actually debatable whether it belongs in the driver or not, as the builtin includes are really an internal bit of implementation goop for Clang. However, they must be included at *exactly* the right point in the sequence of header files, which makes it essentially impossible to have this be managed by the Frontend and the rest by the Driver. I have terrible ideas that would "work", but I think they're worse than putting this in the driver and making the Frontend library even more ignorant of the environment and system on which it is being run. Also fix the fact that we weren't properly respecting the flags which suppress standard system include directories. Note that this still leaves all of the Clang tests which run CC1 directly and include builtin header files broken on Windows. I'm working on a followup patch to address that. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_30@143932 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r143798:Chandler Carruth2011-11-075-12/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r143798 | chandlerc | 2011-11-05 01:30:29 -0700 (Sat, 05 Nov 2011) | 16 lines Add two flags to the CC1 layer that I was hoping to avoid. We need to 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/branches/release_30@143931 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r143752:Chandler Carruth2011-11-073-244/+291
| | | | | | | | | | | | | | | ------------------------------------------------------------------------ r143752 | chandlerc | 2011-11-04 16:49:05 -0700 (Fri, 04 Nov 2011) | 5 lines Begin the migration of header search logic to the driver, starting with 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/branches/release_30@143930 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r143751:Chandler Carruth2011-11-072-5/+5
| | | | | | | | | | | | | ------------------------------------------------------------------------ r143751 | chandlerc | 2011-11-04 16:49:01 -0700 (Fri, 04 Nov 2011) | 3 lines Switch the C++ include interface in the ToolChain to use the same naming as the system include interface before I start adding implementations of it to individual ToolChain implementations. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_30@143929 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r143687:Chandler Carruth2011-11-072-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r143687 | chandlerc | 2011-11-04 00:43:33 -0700 (Fri, 04 Nov 2011) | 16 lines Sink the strange '-stdlib=...' flag handling into the C++ include handling logic of the generic ToolChain. This flag, despite its name, has *nothing* to do with the GCC flag '-nostdlib' that relates (exclusively) to the linking behavior. It is a most unfortunate name in that regard... It is used to tell InitHeaderSearch.cpp *which* set of C++ standard library header search paths to use -- those for libstdc++ from GCC's installation, or those from a libc++ installation. As this logic is hoisted out of the Frontend, and into the Driver as part of this ToolChain, the generic method will be overridden for the platform, where it can implement this logic directly. As such, hiding the CC1 option passing in the generic space is a natural fit despite the odd naming. Also, expand on the comments to clarify whats going on, and tidy up the Tools.cpp code now that its simpler. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_30@143928 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r143686:Chandler Carruth2011-11-073-22/+13
| | | | | | | | | | | | | | ------------------------------------------------------------------------ r143686 | chandlerc | 2011-11-04 00:34:47 -0700 (Fri, 04 Nov 2011) | 4 lines Sink the handling of -fobjc-arc-cxxlib to live with the other -fobjc-arc implementation in the driver. This cleans up the signature and semantics of the include flag adding component of the toolchain. Another step to ready it for holding all the InitHeaderSearch logic. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_30@143927 91177308-0d34-0410-b5e6-96231b3b80d8
* ------------------------------------------------------------------------Chandler Carruth2011-11-073-11/+26
| | | | | | | | | | | | | | | | r143684 | chandlerc | 2011-11-04 00:12:53 -0700 (Fri, 04 Nov 2011) | 7 lines Add a system include management interface to the toolchain, and call it and the C++ include management routine from the proper place when forming preprocessor options in the driver. This is the first step to teaching the driver to manage all of the header search paths. Currently, these methods remain just stubs in the abstract toolchain. Subsequent patches will flesh them out with implementations for various toolchains based on the current code in InitHeaderSearch.cpp. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_30@143926 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r143345:Bill Wendling2011-11-011-0/+1
| | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r143345 | chandlerc | 2011-10-31 01:42:27 -0700 (Mon, 31 Oct 2011) | 7 lines Add "just one more" include path to the monstrosity that is our header 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/branches/release_30@143433 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r143344:Bill Wendling2011-11-011-4/+42
| | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r143344 | chandlerc | 2011-10-31 01:42:24 -0700 (Mon, 31 Oct 2011) | 14 lines Fix part of PR11223 and probably a few dups as well. This teaches the library search logic to "properly" handle multiarch installations. I've tested this on both Debian unstable and the latest Ubuntu which both use this setup, and this appears to work largely the same way as GCC does. It isn't exactly the same, but it is close enough and more principled in its behavior where it differs. This should resolve any failures to find 'crt1.o' etc on Debian-based Linux distributions. If folks find more cases where we fail, please file bugs and CC me. Test cases for all of the debian silliness are waiting both to simplify the process of merging these down into the 3.0 release, and because they're so crazy I haven't yet been able to really produce a fake tree that represents what we need to test for. I'll eventually add them though. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_30@143432 91177308-0d34-0410-b5e6-96231b3b80d8
* Patch for PR9614. By Rafael Espindola.Bill Wendling2011-10-293-4/+79
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_30@143301 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixes an intermittent bug that I finally got a good test case for in GNU ObjC.Bill Wendling2011-10-291-12/+14
| | | | | | | Patch by David Chisnall. git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_30@143270 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r142918:Bill Wendling2011-10-251-8/+8
| | | | | | | | | | | | | ------------------------------------------------------------------------ r142918 | theraven | 2011-10-25 03:12:21 -0700 (Tue, 25 Oct 2011) | 3 lines Change an int64_t to an intptr_t so that we don't end up with crashes in the back end on large classes on 32-bit. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_30@142953 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r142476:Bill Wendling2011-10-222-1/+20
| | | | | | | | | | | | ------------------------------------------------------------------------ r142476 | dgregor | 2011-10-18 22:50:34 -0700 (Tue, 18 Oct 2011) | 2 lines Add TypeKind.CONSTANTARRAY, from Anders Waldenborg! ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_30@142723 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r142474:Bill Wendling2011-10-221-1/+1
| | | | | | | | | | | | | | | ------------------------------------------------------------------------ r142474 | dgregor | 2011-10-18 22:47:46 -0700 (Tue, 18 Oct 2011) | 5 lines This new field was introduced in clang-c in r141277 Python needs this in its structure definition so it allocates enough memory. From Anders Waldenborg! ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_30@142722 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r142187:Bill Wendling2011-10-186-6/+41
| | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r142187 | dgregor | 2011-10-17 07:55:37 -0700 (Mon, 17 Oct 2011) | 6 lines When building a module, use the macro definitions on the command line as part of the hash rather than ignoring them. This means we'll end up building more module variants (overall), but it allows configuration macros such as NDEBUG to work so long as they're specified via command line. More to come in this space. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_30@142428 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r142349:Bill Wendling2011-10-181-4/+5
| | | | | | | | | | | | | | ------------------------------------------------------------------------ r142349 | d0k | 2011-10-18 03:10:08 -0700 (Tue, 18 Oct 2011) | 4 lines Use llvm::Triple's methods to parse FreeBSD version numbers. Who could've thought that FreeBSD would ever reach version 10! Patch from Dimitry Andric. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_30@142366 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r142134:Bill Wendling2011-10-171-2/+2
| | | | | | | | | | | ------------------------------------------------------------------------ r142134 | chandlerc | 2011-10-16 04:05:04 -0700 (Sun, 16 Oct 2011) | 1 line Fix a silly bug introduced in r142133. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_30@142175 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r142133:Bill Wendling2011-10-171-27/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r142133 | chandlerc | 2011-10-16 03:54:30 -0700 (Sun, 16 Oct 2011) | 30 lines Clean up some cruft in the library path searching logic by making 'libdir' mean the actual library directory, not the GCC subdirectory of the library directory. That was just a confusing pattern. Instead, supply proper GCC subdirectories when scanning for various triple-based subdirectories with a GCC installation in them. This also makes it much more obvious how multiarch installations, which have a triple-based prefix as well as suffix work. Also clean up our handling of these triple-prefixed trees by using them in both a multiarch pattern and a non-multiarch pattern whenever they exist. Note that this *does not* match what GCC does on Debian, the only truly multiarch installation I've been able to get installed and test on. GCC appears to have a bug, and ends up searching paths like '/lib/../../lib32' which makes no sense what-so-ever. Instead, I've tried to encode the rational logic that seems clearly intended by GCC's pattern. GCC ends up with patterns like: /lib/../../lib32 /usr/lib/../../lib32 /usr/lib/x86_64-linux-gnu/../..lib32 Only the last one makes any sense having a '/../..' in it, so in Clang, that's the only one which gets a '/../..' in it. I *think* this will fix Debian multiarch links. I'm committing without baking this logic into our test suite so I can test on a few different systems. If all goes well (and no one screams) I'll check in some more comprehensive tests for multiarch behavior tomorrow. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_30@142174 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r142113:Bill Wendling2011-10-161-1/+1
| | | | | | | | | | | ------------------------------------------------------------------------ r142113 | void | 2011-10-15 23:43:18 -0700 (Sat, 15 Oct 2011) | 1 line Enable CREATE_SUBDIRS for a performance win, because there are a lot of files being generated. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_30@142115 91177308-0d34-0410-b5e6-96231b3b80d8
* Creating release_30 branchBill Wendling2011-10-150-0/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_30@142038 91177308-0d34-0410-b5e6-96231b3b80d8
* Change 'Emit' to 'EmitCaret' which sums up what it *should* be doing.Chandler Carruth2011-10-151-6/+9
| | | | | | | | Also note that it is actually doing much more than it should. This paves the way for building a more generic 'Emit' routine that is the real entry point here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142035 91177308-0d34-0410-b5e6-96231b3b80d8
* -Wc++98-compat warnings for the lexer.Richard Smith2011-10-159-8/+81
| | | | | | | | | This also adds a -Wc++98-compat-pedantic for warning on constructs which would be diagnosed by -std=c++98 -pedantic (that is, it warns even on C++11 features which we enable by default, with no warning, in C++98 mode). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142034 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach the ASTImporter to perform DeclContext lookups in a way thatDouglas Gregor2011-10-153-77/+118
| | | | | | | | | | | avoids loading data from an external source, since those lookups were causing some "interesting" recursion in LLDB. This code is not efficient. I plan to remedy this inefficiency in a follow-up commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142023 91177308-0d34-0410-b5e6-96231b3b80d8
* Add c_alignas and cxx_alignas featuresPeter Collingbourne2011-10-145-0/+43
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142020 91177308-0d34-0410-b5e6-96231b3b80d8