summaryrefslogtreecommitdiffstats
path: root/clang/Driver
Commit message (Collapse)AuthorAgeFilesLines
...
* Moved construction of TargetInfo objects out of the DriverTed Kremenek2007-12-124-745/+9
| | | | | | | | and into the "Basic" library. TargetInfo objects are now constructed from triples by calling the static method TargetInfo::CreateTargetInfo. llvm-svn: 44940
* more cleanups changing things like getInstanceVariables to iterators.Chris Lattner2007-12-122-22/+25
| | | | llvm-svn: 44930
* resolve some fixmes and clean up some code by eliminating the get*Vars apis ↵Chris Lattner2007-12-122-72/+59
| | | | | | to some classes and use iterators instead. llvm-svn: 44927
* Simplify some code, don't force the triple to a darwin triple if non-darwin.Chris Lattner2007-12-121-21/+10
| | | | llvm-svn: 44911
* Moved creation of SourceManager, HeaderSearch, TargetInfo, and LangOptionsTed Kremenek2007-12-111-42/+45
| | | | | | | into the loop that processes input files. These will soon become translation unit specific (with the exception of LangOptions). llvm-svn: 44893
* 80-column please.Fariborz Jahanian2007-12-111-2/+5
| | | | llvm-svn: 44888
* Modified the internals of Diagnostic and DiagnosticClient to useTed Kremenek2007-12-117-27/+25
| | | | | | | | | | | | | | | | SourceManager*'s instead of SourceManager&'s. This allows the client specify a NULL SourceManager when using a default constructed SourceLocation. Thus the SourceManager can be NULL when the SourceLocation's isValid() == false. The interface to most clients of Diagnostic remains the same. Diagnostic::Report() is overload to either accept a SourceLocation and a SourceManager&, or neither. Thus clients that do not have a SourceManager cannot specify a SourceLocation. Modified TextDiagnostics* to use this new interface. Modified the driver to not passed in SourceManager when warning about "-I-". llvm-svn: 44887
* Implemented rewriting of protocol-qualified global variable types.Fariborz Jahanian2007-12-111-19/+48
| | | | | | | Re-implemented some of rewriting of protocol-qualified function argument types to support it in its generality. llvm-svn: 44886
* Mega-patch: ripped SourceManager out of Diagnostic/DiagnosticClient. NowTed Kremenek2007-12-1112-34/+51
| | | | | | | | | | | | | | | | | | 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
* Refactor Rewritetest::RewriteObjcQualifiedInterfaceTypes in preparation for moreFariborz Jahanian2007-12-111-10/+13
| | | | | | general use. llvm-svn: 44876
* 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-093-455/+4
| | | | | | used by CGBuiltin.cpp llvm-svn: 44748
* The flags on tokens indicate whether they are the start of a *physical* line, Chris Lattner2007-12-091-16/+33
| | | | | | | | not the start of a logical line. Be careful about this distinction, which affects when newlines are printed and when paste-avoidance happens, etc. This fixes PR1848, thanks to Neil for noticing this! llvm-svn: 44743
* Fix a pretty big but subtle bug counting the number of newlines to emit.Chris Lattner2007-12-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | This would cause us to emit different code (in -E mode) for these two files: --- #define t(x) x t(a 3) --- #define t(x) x t(a 3) --- In one case, -E would print "a\n3", in the other it printed "a3". Now it prints "a3" for both. This is part of PR1848. llvm-svn: 44742
* avoid ///usr/include/foo.h, patch by Sean MiddleditchChris Lattner2007-12-091-3/+10
| | | | llvm-svn: 44731
* Add getTargetPrefix to TargetInfo, to be used with target specific intrinsics.Anders Carlsson2007-12-081-0/+23
| | | | llvm-svn: 44712
* Omit the field name when including the super class structure template.Steve Naroff2007-12-071-4/+10
| | | | | | | | This allows us to access a superclasses ivars without deriving the absolute path. The comments below say a bit more... llvm-svn: 44688
* Implemented when static typing is combined with protocols and use as receiverFariborz Jahanian2007-12-071-0/+4
| | | | | | type. llvm-svn: 44685
* Patch for rewriting of @protocol.Fariborz Jahanian2007-12-071-4/+52
| | | | llvm-svn: 44681
* Rewrite 'super' within a class method. This required some minor tweaks to ↵Steve Naroff2007-12-071-14/+79
| | | | | | the front-end. llvm-svn: 44673
* On Steve's suggestion, moved handling of use of undeclared method in a messageFariborz Jahanian2007-12-061-4/+4
| | | | | | to rewriter (my previous patch). llvm-svn: 44665
* Subdivided the function InitializeBaseLanguage into InitializeBaseLanguage,Ted Kremenek2007-12-051-43/+51
| | | | | | | | | GetLanguage, and InitializeLangOptions. The goal is to break up this logic into atomic units of functionality that can later be refactored into better driver logic that is capable of handling a mixture of source files of different languages. llvm-svn: 44642
* Avoid passing Diags into InitializeIncludePaths.Chris Lattner2007-12-051-10/+13
| | | | llvm-svn: 44639
* Converted SerializationTest (--test-pickling) to use the new TranslationUnitTed Kremenek2007-12-052-267/+48
| | | | | | class to serialize and deserialize translation units. llvm-svn: 44634
* Make sure the class methods get attached to the metaclass object.Steve Naroff2007-12-051-2/+2
| | | | | | Need to query the implementation, not the interface... llvm-svn: 44633
* Added "TranslationUnit" class that will be used to provide an interfaceTed Kremenek2007-12-052-0/+304
| | | | | | | for serializing/deserializing ASTs that is decoupled from the logic in SerializationTest (which will soon be rewritten to use this interface). llvm-svn: 44631
* Modified: CreateTargetInfo(). Now takes Diagnostic* instead of Diagnostic&.Ted Kremenek2007-12-055-11/+14
| | | | | | | 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
* Moved creation of ASTConsumers that can operate on both freshly-parsed andTed Kremenek2007-12-051-44/+51
| | | | | | | | deserialized ASTs into the function CreateASTConsumer(). This function is called by ProcessInputFile, and soon the logic that processes deserialized ASTs. llvm-svn: 44618
* Changed type-cast of "struct objc_super"'s 2nd initializer to match ↵Fariborz Jahanian2007-12-051-2/+2
| | | | | | | | definition of "struct objc_super". llvm-svn: 44616
* Added serialization support of SourceManager to the clang driver.Ted Kremenek2007-12-053-10/+17
| | | | llvm-svn: 44592
* Add the definition of objc_super...Steve Naroff2007-12-041-1/+5
| | | | llvm-svn: 44588
* Type-cast initializers for "struct objc_super" parameter to avoid warning.Fariborz Jahanian2007-12-041-3/+9
| | | | llvm-svn: 44583
* Don't assert if objc.h not declared when rewriting.Fariborz Jahanian2007-12-041-1/+17
| | | | llvm-svn: 44580
* Removed a "TODO" comment as objc1 runtime does not need to do the "TODO".Fariborz Jahanian2007-12-041-1/+1
| | | | llvm-svn: 44577
* 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
* Fixed order of operands to strstr call.Ted Kremenek2007-12-031-1/+1
| | | | llvm-svn: 44561
* For target processing, on non-Darwin systems instead of using the host triple,Ted Kremenek2007-12-032-21/+31
| | | | | | | | | | | 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
* Change <Objc/objc.h> to <objc/objc.h>Fariborz Jahanian2007-12-031-1/+1
| | | | llvm-svn: 44556
* Implemented serialization of TargetInfo.Ted Kremenek2007-12-033-12/+24
| | | | | | SerializationTest (subclass of ASTConsumer) now takes Diagnostics& in its ctor. llvm-svn: 44555
* Fixed a bug exposed by referencing an ivar field using component reference ↵Fariborz Jahanian2007-12-031-1/+3
| | | | | | syntax. llvm-svn: 44553
* Few cleanups to patch 44551:Ted Kremenek2007-12-031-9/+13
| | | | | | | | | http://llvm.org/viewvc/llvm-project?view=rev&revision=44551 Removed debugging fprintfs for printing targets. Implemented error messages when processing invalid targets. llvm-svn: 44552
* Implemented initial support for "-triple" option to the clang driver. ThisTed Kremenek2007-12-033-52/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix an ast-print/ast-dump bug.Chris Lattner2007-12-031-2/+2
| | | | llvm-svn: 44550
* Support for rewriteing of messaging of methods which return float.Fariborz Jahanian2007-12-031-0/+27
| | | | llvm-svn: 44548
* Added support for messagings which return a structure-value.Fariborz Jahanian2007-12-031-9/+122
| | | | | | (Also fixed a regression caused by recent changes to synthesis of structs). llvm-svn: 44540
* Warn about unsupported codegen with the diags machinery, giving us:Chris Lattner2007-12-021-1/+1
| | | | | | | | | | | | | t.c:3322:5: warning: cannot codegen this yet __asm__ ("bswap %0" : "+r" (_data)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ instead of: Unimplemented stmt! (AsmStmt 0x80eaa0 <t.c:3331:5, line:3334:28>) llvm-svn: 44501
* fix a crash when the rewriter would scan off the beginning of the file.Chris Lattner2007-12-021-3/+11
| | | | llvm-svn: 44499
* add support for custom client-specific diagnostics. As a testcase, make the Chris Lattner2007-12-021-0/+5
| | | | | | | | | | | | rewriter emit this error if it fails to rewrite an @encode: t.m:17:9: error: rewriter could not replace sub-expression due to macros c = ENC(char *)[2] + 4; ^~~~~~~~~~~ ... where ENC is: #define ENC @encode llvm-svn: 44498
* start partitioning the diagnostics into two classes: thoseChris Lattner2007-11-308-17/+21
| | | | | | | | that are builtin and those that are aren't. This is a bunch of API refactoring that will make this possible, but there is no functionality change yet. llvm-svn: 44473
OpenPOWER on IntegriCloud