summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* Place diagnostic ext_predef_outside_function under a -W flag. Fixes ↵Ted Kremenek2011-10-042-3/+3
| | | | | | <rdar://problem/10226192>. llvm-svn: 141087
* Fix include path detection on Fedora 15 with GCC 4.6.1. Patch by Arthur Haas.Justin Holewinski2011-10-041-1/+6
| | | | llvm-svn: 141086
* Add bitmaps for strong / weak ivar layout (GNUstep runtime).David Chisnall2011-10-041-18/+102
| | | | llvm-svn: 141085
* Place warning warn_drv_no_debug_w_integrated_as under a -W flag.Ted Kremenek2011-10-041-1/+2
| | | | llvm-svn: 141078
* Revert r141060. We should NEVER add new warnings that aren't guarded by flag.Ted Kremenek2011-10-041-2/+1
| | | | | | This reverts commit 5383d065241b18e84232bc50d81523f2058ea62b. llvm-svn: 141077
* Add a comment explaining that I have a better plan for implementing theChandler Carruth2011-10-041-0/+2
| | | | | | | | | | | | | GCC installation search that requires fewer filesystem operations. Planning to implement that next as the current approcah while thorough (and so far looks correct) does a very unfortunate number of filesystem operations. I'm motivated to fix this in no small part because I would like to support a much larger space of triples and GCC versions, which would explode the current algorithm. llvm-svn: 141073
* Invert the loop for detecting installed GCC trees. This make the loopChandler Carruth2011-10-041-36/+19
| | | | | | | | | | | | | | | | | | | find the newest GCC available, among other goodness. It makes the entire system much less prone to error from prefixes and/or system roots pruning early the set of triples and GCC versions available. Also, improve some comments and simplify the forms of some of the loops. This causes the driver to stat directories more often than is strictly necessary, but the alternatives which I looked at that still accomplished this goal needed quite a bit more code and were likely not much faster. Test cases for this, now that our behavior here is significantly more principled and predictable, should come tomorrow as I walk back through VMs looking for edge cases that are missed after this. llvm-svn: 141072
* Fuse the two halves of the GCC installation detection. This isChandler Carruth2011-10-041-54/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | significantly cleaner (IMO) and more principled. We now walk down each layer of the directory hierarchy searching for the GCC install. This change does in fact introduce a significant behavior change in theory, although in practice I don't know of any distro that will be impacted by it negatively, and Debian may (untested) get slightly better through it. Specifically, the logic now looks exhaustively for patterns such as: /usr/lib/<triple>/gcc/<triple> Previously, this would only be selected if there was *also* a '/usr/lib/gcc/<triple>' directory, or if '<triple>' were the excat DefaultHostTriple in the driver. There is a 4-deep nested loop here, but it doesn't do terribly many filesystem operations, as we skip at each layer of that layer's directory doesn't exist. There remains a significant FIXME in this logic: it would be much better to first build up a set of candidate components for each of the four layers with a bottom-up pruning such as this, but then select the final installation using a top-down algorithm in order to find the newest GCC installation available, regardless of which particular path leads to it. llvm-svn: 141071
* Mark calls to objc_retainBlock that don't result from castsJohn McCall2011-10-044-13/+74
| | | | | | to id so that we can still optimize them appropriately. llvm-svn: 141064
* Rip out flags for controlling C++ "production mode" separately.Bob Wilson2011-10-046-25/+5
| | | | | | | This is old leftover cruft from the days when C++ was not yet ready for prime time. llvm-svn: 141063
* Specify -ccc-clang-archs for le32 targets which may not be supported by default.Bob Wilson2011-10-041-3/+3
| | | | llvm-svn: 141062
* Improve location fidelity of objc decls.Argyrios Kyrtzidis2011-10-0415-136/+144
| | | | | | | | -Add the location of the class name to all objc container decls, not just ObjCInterfaceDecl. -Make objc decls consistent with the rest of the NamedDecls and have getLocation() point to the class name, not the location of '@'. llvm-svn: 141061
* Update testcase for r141053+r141055.Chad Rosier2011-10-041-1/+2
| | | | llvm-svn: 141060
* Factor the data apart from the logic of locating various GCCChandler Carruth2011-10-041-45/+63
| | | | | | | | | | | | | | | | | | | | | | | | | installations. This first selects a set of prefixes and a set of compatible triples for the current architecture. Once selected, we drive the search with a single piece of code. This code isn't particularly efficient as it stands, but its only executed once. I'm hoping as I clean up the users of this information, it will also slowly become both cleaner and more efficient. This also changes the behavior slightly. Previously, we had an ad-hoc list of prefixes and triples, and we only looked for some triples beneath specific prefixes and vice versa. This has led to lots of one-off patches to support triple X, or support lib dir Y. Even without going to a fully universal driver, we can do better here. This patch makes us always look first in either 'lib32' or 'lib64' on 32- or 64-bit hosts (resp.). However, we *always* look in 'lib'. Currently I have one lingering problem with this strategy. We might find a newer or better GCC version under a different (but equally compatible) triple. Fundamentally, this loop needs to be fused with the one below. That's my next patch. llvm-svn: 141056
* [driver] Improve r141053 by only emitting the warning if the original inputChad Rosier2011-10-041-2/+12
| | | | | | | was assembly. Otherwise, something like -save-temps causes the integrated assembler to warn. llvm-svn: 141055
* [driver] Emit a warning if the user has requested debug information and we'reChad Rosier2011-10-042-1/+7
| | | | | | | using the integrated assembler. rdar://10216353 llvm-svn: 141053
* When build a module on demand, run the module-building job on aDouglas Gregor2011-10-041-3/+21
| | | | | | | separate thread with the "suitably large" stack, so we don't blow the stack when building modules recursively. llvm-svn: 141051
* Make sure SourceManager::getFileIDLoaded doesn't hang in release build ↵Argyrios Kyrtzidis2011-10-031-0/+4
| | | | | | | | because of invalid passed parameter. rdar://10210140 llvm-svn: 141048
* [analyzer] Remove redundant state (AnalysisContext pointer for every ↵Anna Zaks2011-10-031-4/+9
| | | | | | BinaryOperator tracked) from IdempotentOperationChecker. llvm-svn: 141045
* objc arc: Suppress certain arc diagnostics on unavailableFariborz Jahanian2011-10-033-2/+21
| | | | | | functions. // rdar://10186536 llvm-svn: 141037
* [analyzer] In UndefBranchChecker, use a node generator which does not create ↵Anna Zaks2011-10-032-1/+3
| | | | | | an edge/branching. (ExprEngine should be in charge of generating edges. The checkers should examine the condition and generate PostCondition node if needed.) llvm-svn: 141034
* [analyzer] Cleanup in UndefBranchChecker:Anna Zaks2011-10-031-7/+4
| | | | | | | - Remove unused FindUndefExpr::ProgramStateManager. - The Condition parameter of the callback is the terminator of the block, no need to retrieve it again. llvm-svn: 141027
* Fixed source range for template implicit instantiations.Abramo Bagnara2011-10-033-10/+25
| | | | llvm-svn: 141018
* Fixed exapnsion range for # and ##.Abramo Bagnara2011-10-038-27/+45
| | | | llvm-svn: 141012
* Refactor the detection of a GCC installation into a helper class. ThisChandler Carruth2011-10-031-157/+191
| | | | | | | | | | | | | is designed to allow the detection to record more rich information about the installation than just a single path. Mostly, the functionality remains the same. This is primarily a factoring change. However, the new factoring immediately fixes one issue where on ubuntu we didn't walk up enough layers to reach the parent lib path. I'll have a test tree for that once I finish making the Ubuntu tree work reasonably. llvm-svn: 141011
* objc++: Accessing explicit property of reference type need Fariborz Jahanian2011-10-032-1/+30
| | | | | | not bind to a temporary. Fixes //rdar://10188258 llvm-svn: 141009
* PTX: Add some basic support for OpenCL address spacesJustin Holewinski2011-10-031-0/+6
| | | | llvm-svn: 141008
* Don't crash when trying to emit too many fixits. Also, keep some constants inMatt Beaumont-Gay2011-10-032-2/+6
| | | | | | sync between DiagnosticsEngine and PartialDiagnostic. llvm-svn: 141006
* Propagate __attribute__((returns_twice)) from C to IL.Rafael Espindola2011-10-037-15/+54
| | | | llvm-svn: 141002
* Test a multilib setup on a 64-bit host. This is the far more commonChandler Carruth2011-10-0312-0/+33
| | | | | | | | | | | | | configuration, although the test still stubs out more directories than are necessary or common in order to exercise all of the lookup paths observed with upstream GCC. This finishes testing the distribution-independent and GCC-installation-independent parts of the library path search logic. More testing is still needed for the triple detection, GCC-installation detection, and handling distributions with unusual configurations. llvm-svn: 141000
* Enable generic multilib support on 32bit hosts. Previously this was onlyChandler Carruth2011-10-0313-13/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | enabled for debian hosts, which is quite odd. I think all restriction on when Clang attempts to use a multilib installation should go away. Clang is fundamentally a cross compiler. It behaves more like GCC when built as a cross compiler, and so it should just use multilib installs when they are present on the system. However, there is a very specific exemption for Exherbo, which I can't test on, so I'm leaving that in place. With this, check in a generic test tree for multilib on a 32-bit host. This stubs out many directories that most distributions don't use but that uptsream GCC supports. This is intended to be an agnostic test that the driver behaves properly compared with the GCC driver it aims for compatibility with. Also, fix a bug in the driver that this testing exposed (see!) where it was incorrectly testing the target architecture rather than the host architecture. If anyone is having trouble with the tree-structure stubs I'm creating to test this, let me know and I can revisit the design. I chose this over (for example) a tar-ball in order to make tests run faster at the small, hopefully amortized VCS cost. llvm-svn: 140999
* Relax an assertion here a bit. This doesn't really matter, as we won'tChandler Carruth2011-10-031-2/+2
| | | | | | | | | | | | | include *any* path on crtbegin.o unless we actually find such a file via one of the search paths. We still strictly check the search paths right after this, so we'll catch any issues there. The reason for this is that the driver does some normalization of the path on the actual object file, and this changes the textual format of the string on Windows. It no longer matches the textual format of the sysroot flag. llvm-svn: 140998
* Test that we include a GCC-triple-prefixed tree. While I don't know ofChandler Carruth2011-10-033-0/+2
| | | | | | | any distros that use this, building a multilib GCC from mainline will install linker scripts here. llvm-svn: 140996
* Teach the logic for locating an installed GCC about the system root.Chandler Carruth2011-10-034-9/+23
| | | | | | | | | | | | | | | | | This requires fixing a latent bug -- if we used the default host triple instead of an autodetected triple to locate GCC's installation, we didn't go back and fix the GCC triple. Correct that with a pile of hacks. This entire routine needs a major refactoring which I'm saving for a subsequent commit. Essentially, the detection of the GCC triple should be hoisted into the same routine as we locate the GCC installation: the first is intrinsically tied to the latter. Then the routine will just return the triple and base directory. Also start to bring the rest of the library search path logic under test, including locating crtbegin.o. Still need to test the multilib and other behaviors, but there are also bugs in the way of that. llvm-svn: 140995
* Add initial support for applying the sysroot to library search paths.Chandler Carruth2011-10-034-10/+18
| | | | | | | | | | | | | | | | | | | | This is still very much a WIP, but sysroot was completely broken before this so we are moving closer to correctness. The crux of this is that 'ld' (on Linux, the only place I'm touching here) doesn't apply the sysroot to any flags given to it. Instead, the driver must translate all the paths it adds to the link step with the system root. This is easily observed by building a GCC that supports sysroot, and checking its driver output. This patch just fixes the non-multilib library search paths. We should also use this in many other places, but first things first. This also allows us to make the Linux 'ld' test independent of the host system. This in turn will allow me to check in test tree configurations based on various different distro's configuration. Again, WIP. llvm-svn: 140990
* Allow getting all source locations of selector identifiers in a ObjCMethodDecl.Argyrios Kyrtzidis2011-10-0319-47/+214
| | | | | | | | | | | | | Instead of always storing all source locations for the selector identifiers we check whether all the identifiers are in a "standard" position; "standard" position is -Immediately before the arguments: -(id)first:(int)x second:(int)y; -With a space between the arguments: -(id)first: (int)x second: (int)y; -For nullary selectors, immediately before ';': -(void)release; In such cases we infer the locations instead of storing them. llvm-svn: 140989
* Move field in ObjCMessageExpr to avoid padding.Argyrios Kyrtzidis2011-10-032-13/+13
| | | | llvm-svn: 140988
* Allow getting all source locations of selector identifiers in a ObjCMessageExpr.Argyrios Kyrtzidis2011-10-039-61/+328
| | | | | | | | | | | | | Instead of always storing all source locations for the selector identifiers we check whether all the identifiers are in a "standard" position; "standard" position is -Immediately before the arguments: [foo first:1 second:2] -With a space between the arguments: [foo first: 1 second: 2] -For nullary selectors, immediately before ']': [foo release] In such cases we infer the locations instead of storing them. llvm-svn: 140987
* ArrayRef'ize ObjCMessageExprArgyrios Kyrtzidis2011-10-034-37/+39
| | | | llvm-svn: 140986
* Add an assertion that we don't overflow the bitfield ObjCMessageExpr::NumArgs.Argyrios Kyrtzidis2011-10-032-6/+18
| | | | llvm-svn: 140985
* Pass from the parser the locations of selector identifiers when creatingArgyrios Kyrtzidis2011-10-039-10/+21
| | | | | | | | objc method decls. They are not stored in the AST yet. llvm-svn: 140984
* Don't keep NumSelectorArgs in the ObjCMethodDecl, the number can be derived ↵Argyrios Kyrtzidis2011-10-037-30/+11
| | | | | | from the selector. llvm-svn: 140983
* Pass all the locations of the selector identifiers for a message expression ↵Argyrios Kyrtzidis2011-10-035-41/+47
| | | | | | | | from the parser. They are not kept in the AST yet. llvm-svn: 140982
* Rework the selection of builtin library search paths on Linux toChandler Carruth2011-10-032-35/+46
| | | | | | | | | | | | | | | | | | | | | | | | | precisely match the pattern and logic used by the GCC driver on Linux as of a recent SVN checkout. This happens to follow a *much* more principled approach. There is a strict hierarchy of paths examined, first with multilib-suffixing, second without such suffixing. Any and all of these directories which exist will be added to the library search path when using GCC. There were many places where Clang followed different paths, omitted critical entries, and worst of all (in terms of challenges to debugging) got the entries in a subtly wrong order. If this breaks Clang on a distro you use, please let me know, and I'll work with you to figure out what is needed to work on that distro. I've checked the behavior of the latest release of Ubuntu, OpenSUSE, Fedora, and Gentoo. I'll be testing it on those as well as Debian stable and unstable and ArchLinux. I may even dig out a Slackware install. No real regression tests yet, those will follow once I add enough support for sysroot to simulate various distro layouts in the testsuite. llvm-svn: 140981
* CUDA: diagnose invalid calls across targetsPeter Collingbourne2011-10-028-2/+169
| | | | llvm-svn: 140978
* CUDA: add separate diagnostics for too few/many exec config argsPeter Collingbourne2011-10-024-17/+31
| | | | llvm-svn: 140977
* Add ConvertArgumentsForCall diagnostics for at least/at most n argsPeter Collingbourne2011-10-021-4/+9
| | | | llvm-svn: 140976
* CUDA: diagnose unconfigured calls to global functionsPeter Collingbourne2011-10-023-0/+8
| | | | llvm-svn: 140975
* Sorry, I misunderstood the interaction here; the GNU runtime doesJohn McCall2011-10-021-5/+3
| | | | | | | | | support both a fragile and non-fragile ABI, and it can be selected at runtime. That driver option also works on Darwin (although obviously the code is not necessarily usable if the system runtime is fragile) so just do that. llvm-svn: 140973
* Use -fgnu-runtime to force the use of the non-fragile ABI;John McCall2011-10-021-6/+5
| | | | | | | otherwise these tests would fail on hosts that happen to default to that, since that affects whether default synthesis can happen. llvm-svn: 140970
OpenPOWER on IntegriCloud