summaryrefslogtreecommitdiffstats
path: root/clang/Driver/Targets.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Moved construction of TargetInfo objects out of the DriverTed Kremenek2007-12-121-733/+0
| | | | | | | | and into the "Basic" library. TargetInfo objects are now constructed from triples by calling the static method TargetInfo::CreateTargetInfo. llvm-svn: 44940
* Mega-patch: ripped SourceManager out of Diagnostic/DiagnosticClient. NowTed Kremenek2007-12-111-2/+3
| | | | | | | | | | | | | | | | | | SourceManager is passed by reference, allowing the SourceManager to be associated with a specific translation unit, and not the entire execution of the driver. Modified all users of Diagnostics to comply with this new interface. Integrated SourceManager as a member variable of TargetInfo. TargetInfo will eventually be associated with a single translation unit (just like SourceManager). Made the SourceManager reference in ASTContext private. Provided accessor getSourceManager() for clients to use instead. Modified clients to comply with new interface. llvm-svn: 44878
* properly namespacify.Chris Lattner2007-12-111-1/+2
| | | | llvm-svn: 44845
* Move target specific builtin IDs to TargetBuiltins.h so that they can be ↵Anders Carlsson2007-12-091-16/+4
| | | | | | used by CGBuiltin.cpp llvm-svn: 44748
* Add getTargetPrefix to TargetInfo, to be used with target specific intrinsics.Anders Carlsson2007-12-081-0/+23
| | | | llvm-svn: 44712
* Modified: CreateTargetInfo(). Now takes Diagnostic* instead of Diagnostic&.Ted Kremenek2007-12-051-2/+2
| | | | | | | Modified: ctor of SerializationTest: Now takes LangOptions argument. We will eventually serialize this as well. llvm-svn: 44630
* I'm apparently the only sad lonely ppc user left :)Chris Lattner2007-12-051-2/+2
| | | | llvm-svn: 44622
* Removed searching for "darwin" keyword in target triple. We don't really supportTed Kremenek2007-12-041-15/+13
| | | | | | | any alternative targets at this point other than "darwin," so we now default to Darwin targets (for now). llvm-svn: 44572
* For target processing, on non-Darwin systems instead of using the host triple,Ted Kremenek2007-12-031-14/+17
| | | | | | | | | | | we default to "i386-apple-darwin". This is an interim solution. Removed processing of "linux" triples from Targets.cpp, since we don't have any sensical Linux target support (yet). Cleaned up error processing of targets; added better diagnostics. llvm-svn: 44560
* Implemented initial support for "-triple" option to the clang driver. ThisTed Kremenek2007-12-031-50/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | replaces the functionality previously provided by just "-arch" (which is still supported but has different semantics). The new behavior is as follows: (1) If the user does not specify -triple: (a) If no -arch options are specified, the target triple used is the host triple (in llvm/Config/config.h). (b) If one or more -arch's are specified (and no -triple), then there is one triple for each -arch, where the specified arch is substituted for the arch in the host triple. Example: host triple = i686-apple-darwin9 command: clang -arch ppc -arch ppc64 ... triples used: ppc-apple-darwin9 ppc64-apple-darwin9 (2) The user does specify a -triple (only one allowed): (a) If no -arch options are specified, the triple specified by -triple is used. E.g clang -triple i686-apple-darwin9 (b) If one or more -arch options are specified, then the triple specified by -triple is used as the primary target, and the arch's specified by -arch are used to create secondary targets. For example: clang -triple i686-apple-darwin9 -arch ppc -arch ppc64 has the following targets: i686-apple-darwin9 (primary target) ppc-apple-darwin9 ppc64-apple-darwin9 Other changes related to the changes to the driver: - TargetInfoImpl now includes the triple string. - TargetInfo::getTargetTriple returns the triple for its primary target. - test case test/Parser/portability.c has been updated because "-arch linux" is no longer valid ("linux" is an OS, not an arch); instead we use a bogus architecture "bogusW16W16" where WCharWidth=16 and WCharAlign=16. llvm-svn: 44551
* Add more semantic analysis for inline asm statements.Anders Carlsson2007-11-271-1/+76
| | | | llvm-svn: 44349
* Forgot some X86 registersAnders Carlsson2007-11-251-0/+1
| | | | llvm-svn: 44309
* Add tables for GCC register names and aliases. This will be used for inline asmAnders Carlsson2007-11-241-2/+146
| | | | llvm-svn: 44308
* fix problems with test/sema/Cocoa.m etc on non-apple machines.Chris Lattner2007-10-171-0/+4
| | | | llvm-svn: 43067
* Add __builtin_va_list definitions for x86_64 and ppc64.Anders Carlsson2007-10-131-0/+42
| | | | llvm-svn: 42943
* speed up clang startup another 28% by avoiding std::vector<std::string> Chris Lattner2007-10-061-173/+182
| | | | | | for holding builtin target-specific macros. llvm-svn: 42689
* non-apple targets should be like i386, not the mythical, bogus, linux target.Chris Lattner2007-07-151-2/+2
| | | | llvm-svn: 39865
* A significant refactoring of the type size stuff to also Chris Lattner2007-07-141-0/+1
| | | | | | compute type alignment. This info is needed for struct layout. llvm-svn: 39850
* Finally bite the bullet and make the major change: split the clang namespaceChris Lattner2007-06-151-4/+3
| | | | | | | | | | | | | out of the llvm namespace. This makes the clang namespace be a sibling of llvm instead of being a child. The good thing about this is that it makes many things unambiguous. The bad things is that many things in the llvm namespace (notably data structures like smallvector) now require an llvm:: qualifier. IMO, libsystem and libsupport should be split out of llvm into their own namespace in the future, which will fix this issue. llvm-svn: 39659
* wchar_t width is now expressed in terms of bits for uniformity.Chris Lattner2007-04-051-1/+1
| | | | llvm-svn: 39391
* Add support for target-specific builtins, including detecting nonportabilityChris Lattner2007-01-291-0/+62
| | | | | | | | | | | | | | | | | of source code. For example: $ clang INPUTS/carbon_h.c -arch i386 -arch ppc prints: ... /usr/lib/gcc/i686-apple-darwin8/4.0.1/include/mmintrin.h:51:3: note: use of a target-specific builtin function, source is not 'portable' __builtin_ia32_emms (); ^ because carbon.h pulls in xmmintrin.h, and __builtin_ia32_emms isn't a builtin on ppc. Though clang now supports target-specific builtins, the full table isn't implemented yet. llvm-svn: 39328
* Sink target-specific #define info into the target descriptions. Add ↵Chris Lattner2006-10-151-2/+207
| | | | | | x86-32/64 and ppc64. llvm-svn: 38987
* Implement TargetInfo hooks for #definesChris Lattner2006-10-141-8/+40
| | | | llvm-svn: 38978
* Write up TargetInfo so that use of wchar_t strings results in a warning ifChris Lattner2006-10-141-0/+2
| | | | | | used in a target set where the size is not identical. llvm-svn: 38975
* Add Targets.cpp, which implements the -arch command line option in terms ofChris Lattner2006-10-141-0/+143
TargetInfo. llvm-svn: 38972
OpenPOWER on IntegriCloud