aboutsummaryrefslogtreecommitdiff
path: root/Basic
AgeCommit message (Collapse)Author
2008-03-15Make a major restructuring of the clang tree: introduce a top-levelChris Lattner
lib dir and move all the libraries into it. This follows the main llvm tree, and allows the libraries to be built in parallel. The top level now enforces that all the libs are built before Driver, but we don't care what order the libs are built in. This speeds up parallel builds, particularly incremental ones. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48402 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-10Add support for the 'N' constraint.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48185 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-10Add some missing #includes for GCC mainline, patch by Shantonu Sen!Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48153 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09Handle the 'n' constraintAnders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48091 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-08make float format handling more regular.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48052 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-08simplify all the type info accessors in TargeTInfo to return scalars,Chris Lattner
which is simpler to use and provide. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48051 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-08eliminate the TargetInfoImpl stuff, simplifying the target implementations.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48049 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-08eliminate ComputeWCharInfo.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48048 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-05remove the source location arguments to various target query methods.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47954 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-05Remove the first layer of support for "portability" warnings. This is Chris Lattner
theoretically useful, but not useful in practice. It adds a bunch of complexity, and not much value. It's best to nuke it. One big advantage is that it means the target interfaces will soon lose their SLoc arguments and target queries can never emit diagnostics anymore (yay). Removing this also simplifies some of the core preprocessor which should make it slightly faster. Ted, I didn't simplify TripleProcessor, which can now have at most one triple, and can probably just be removed. Please poke at it when you have time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47930 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-05move this into the right file.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47925 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-04TargetInfo objects now own the TargetInfoImpl objects they refer to.Ted Kremenek
TargetInfo::AddSecondaryTarget is now private, as it is only used during object construction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47891 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-27A, q and Z are valid LLVM inline asm constraints.Lauro Ramos Venancio
Fix regression in Applications/ClamAV/clamscan. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47673 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-26Convert x86 target specific inline asm constraints to LLVM.Lauro Ramos Venancio
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47609 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-24In FileManager: use full paths to unique files and directories on Windows,Ted Kremenek
since inodes are bogus abstraction on that platform. Patch by Argiris Kirtzidis! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47535 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-21Added classes SolarisTargetInfo andGabor Greif
SolarisSparcV8TargetInfo to be able to handle "sparc-" triple prefixes. Please be aware that this is a minimal kludge, that pretty much duplicates the features of DarwinPowerPCTargetInfo, and also incorrectly uses stuff from the PPC namespace. But in result "make test" now passes a lot of tests, the notable exceptions being the objc rewrite tests and mandel.c. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47436 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-19fix the second half of PR2041: __restrict is ok in c90 mode, even ifChris Lattner
restrict isn't. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47316 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-18Add more supported constraints.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47270 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-17Change alignment for doubles to 32 bits which is what X86 has.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47234 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-06Even more inline asm codegen fixes.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46784 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-05Handle the memory clobber.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46780 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-03Fix PR1966 by ignoring non-error diagnostics from system headers even if ↵Chris Lattner
they are *mapped* onto errors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46686 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-03the macro start and macro end bits in source location are dead, remove them.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46685 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-24Don't add an extra line to the end of the buffer, it doesn't really exist.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46330 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-20Fix the __SIZE_TYPE__ definition on x86_32. This fixes the alloca.c (wget ↵Lauro Ramos Venancio
1.10.2) compilation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46196 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-11Fix misspelling of "existent".Ted Kremenek
Do not use std::cerr; use llvm::cerr instead. Patch provided by Sam Bishop! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45880 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-11Fixed 80-col violation.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45845 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29remove attribution from makefiles.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45412 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29Don't attribute in file headers anymore. See llvmdev for theChris Lattner
discussion of this change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45410 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19Added storage of the FileID of the the main source file of a translation unitTed Kremenek
in SourceManager. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45225 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18Refactored inode and device number into FileEntry, and changed theTed Kremenek
ADT storing FileEntry's in FileManager from a map to a set. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45184 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18When serializing SourceManager, we now serialize out absolute pathsTed Kremenek
to serialized source files. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45183 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18Added to FileEntry a pointer to the <dev_t,ino_t> pair for the file, andTed Kremenek
accessors to FileEntry to query these values. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45171 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-13Add hack to SourceManager to support missing source files duringTed Kremenek
deserialization. Eventually this should be replaced with a lazy-reading mechanism that only reads source files when they are needed by clients. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45007 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-13Fix file header.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44983 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12TargetInfo no longer includes a reference to SourceManager.Ted Kremenek
Moved all clients of Diagnostics to use FullSourceLoc instead of SourceLocation. Added many utility methods to FullSourceLoc to provide shorthand for: FullLoc.getManager().someMethod(FullLoc.getLocation()); instead we have: FullLoc.someMethod(); Modified TextDiagnostics (and related classes) to use this short-hand. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44957 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12Moved construction of TargetInfo objects out of the DriverTed Kremenek
and into the "Basic" library. TargetInfo objects are now constructed from triples by calling the static method TargetInfo::CreateTargetInfo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44940 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-11Modified the internals of Diagnostic and DiagnosticClient to useTed Kremenek
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-". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44887 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-11Mega-patch: ripped SourceManager out of Diagnostic/DiagnosticClient. NowTed Kremenek
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44878 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-10Added newline to end of file.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44797 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-08Add getTargetPrefix to TargetInfo, to be used with target specific intrinsics.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44712 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-05Removed dependence on including iostream (use llvm/Support/Streams.h instead).Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44635 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-05Implemented serialization of LangOptions.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44624 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-05Renamed SourceManager::Read to SourceManager::CreateAndRegister.Ted Kremenek
Now sourcemanager deserializer automatically self-registers itself with the deserializer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44591 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-05Implemented initial serialization support for SourceManager.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44590 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-04Removed serialization of FileEntry and DirectoryEntry. This objects willTed Kremenek
now be lazily recreated upon deserialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44585 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-04Implemented serialization of SrcMgr::ContentCache.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44578 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-04Implemented serialization of FileEntry and DirectoryEntry.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44573 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-03Implemented initial support for "-triple" option to the clang driver. ThisTed Kremenek
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44551 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-02add support for custom client-specific diagnostics. As a testcase, make the Chris Lattner
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44498 91177308-0d34-0410-b5e6-96231b3b80d8