summaryrefslogtreecommitdiffstats
path: root/clang/tools/clang-cc
Commit message (Collapse)AuthorAgeFilesLines
...
* Reject compiles for x86_64 target for MacOS versions whichFariborz Jahanian2009-04-101-0/+8
| | | | | | do not support it. llvm-svn: 68819
* Support -miphoneos-version-min in clang-cc.Daniel Dunbar2009-04-101-2/+60
| | | | | | | | | | - Patch by Shantonu Sen (with a minor tweak to split out getDarwin{OSX,IPhoneOS}Defines)! - <rdar://problem/6776277> Need clang-cc/ccc-analyzer support for -miphoneos-version-min llvm-svn: 68815
* emit tokens, constify the Preprocessor passed down into PCH writer.Chris Lattner2009-04-102-4/+4
| | | | llvm-svn: 68798
* Add PCH sources to CMake build filesDouglas Gregor2009-04-101-0/+1
| | | | llvm-svn: 68794
* Arrange for the preprocessor to be passed down into the PCH writer.Chris Lattner2009-04-103-31/+26
| | | | llvm-svn: 68790
* PCH serialization/deserialization of the source manager. With thisDouglas Gregor2009-04-101-6/+21
| | | | | | | | | | | | improvement, source locations read from the PCH file will properly resolve to the source files that were used to build the PCH file itself. Once we have the preprocessor state stored in the PCH file, source locations that refer to macro instantiations that occur in the PCH file should have the appropriate instantiation information. llvm-svn: 68758
* Implementation of pre-compiled headers (PCH) based on lazyDouglas Gregor2009-04-093-0/+106
| | | | | | | | | | | | | | | | | | | de-serialization of abstract syntax trees. PCH support serializes the contents of the abstract syntax tree (AST) to a bitstream. When the PCH file is read, declarations are serialized as-needed. For example, a declaration of a variable "x" will be deserialized only when its VarDecl can be found by a client, e.g., based on name lookup for "x" or traversing the entire contents of the owner of "x". This commit provides the framework for serialization and (lazy) deserialization, along with support for variable and typedef declarations (along with several kinds of types). More declarations/types, along with important auxiliary structures (source manager, preprocessor, etc.), will follow. llvm-svn: 68732
* Propagate the ASTContext to various AST traversal and lookup functions.Douglas Gregor2009-04-097-75/+129
| | | | | | No functionality change (really). llvm-svn: 68726
* Make -include, -imacros paths absolute in Frontend.Daniel Dunbar2009-04-091-13/+22
| | | | | | | | | | | | - Otherwise paths will be resolved relative to the main input file, which is incorrect. - I don't know how to make a reasonable test case for this with our testing infrastructure. - PR3395 llvm-svn: 68665
* add support for -Wtrigraphs and -Wno-trigraphs.Chris Lattner2009-04-081-16/+15
| | | | llvm-svn: 68649
* finish the implementation of -imacros. The driver still needs to be hooked up.Chris Lattner2009-04-081-0/+3
| | | | llvm-svn: 68640
* According to the GCC man page, all -imacros are included before any -include's.Chris Lattner2009-04-081-15/+10
| | | | llvm-svn: 68633
* properly escape filenames when generating implicit #includes, this handlesChris Lattner2009-04-081-2/+8
| | | | | | things like " in paths etc. Found by inspection. llvm-svn: 68632
* Add initial support for -imacros. Right now it has the same semantics asChris Lattner2009-04-081-13/+48
| | | | | | -include, but that will be fixed soon. llvm-svn: 68625
* More fixes to builtin preprocessor defines.Daniel Dunbar2009-04-081-6/+14
| | | | | | | | | | | | | | | | | | | | | - Add -static-define option driver can use when __STATIC__ should be defined (instead of __DYNAMIC__). - Don't set __OPTIMIZE_SIZE__ on Os, __OPTIMIZE_SIZE__ is tied to Oz. - Set __NO_INLINE__ following GCC 4.2. - Set __GNU_GNU_INLINE__ or __GNU_STDC_INLINE__ following GCC 4.2. - Set __EXCEPTIONS for Objective-C NonFragile ABI. - Set __STRICT_ANSI__ for standard conforming modes. - I added a clang style test case in utils for this, but its not particularly portable and I don't think it belongs in the test suite. llvm-svn: 68621
* Make debug info work when using -save-temps.Daniel Dunbar2009-04-081-0/+6
| | | | | | | | | | | | | | | | | | - This is pretty ugly, but the most obvious solution. Chime in if you have a nicer one. - The problem is that with -save-temps, clang-cc has no idea what the name of the original input file is. However, the user expects to be able to set breakpoints based on the input file name. - We support this by providing a new option -main-file-name (similar to -dumpbase used by gcc) which allows the driver to pass in the original file name. - <rdar://problem/6753383> building with clang using --save-temps gets the compile unit name from the .i file... llvm-svn: 68595
* fix typo, noticed by GaborChris Lattner2009-04-081-1/+1
| | | | llvm-svn: 68587
* Set __PIC__ (more) correctly.Daniel Dunbar2009-04-081-0/+8
| | | | | | | | | | | - Add -pic-level clang-cc option to specify the value for the define, updated driver to pass this. - Added __pic__ - Added OBJC_ZEROCOST_EXCEPTIONS define while I was here (to match gcc). llvm-svn: 68584
* Driver: Fix forwarding of -{std,ansi,trigraphs} when there areDaniel Dunbar2009-04-071-8/+2
| | | | | | | | multiple instances of an option. Also, removed direct -ansi support from clang-cc. llvm-svn: 68558
* Driver: Manually translate a number of -f with no- variants options toDaniel Dunbar2009-04-071-9/+5
| | | | | | | | | | | | clang. - We will eventually want some more driver infrastructre for this probably. - For now, the clang-cc interface stays relatively the same, but we don't accept multiple instances anymore, or the [no-] variants directly. llvm-svn: 68550
* add a warning for this crazy case, as suggested by Eli.Chris Lattner2009-04-071-1/+7
| | | | llvm-svn: 68524
* implement rdar://6762183. I'm not sure if it is more insane thatChris Lattner2009-04-071-1/+6
| | | | | | | GCC ignores macro definitions after \n's or that real code depends on this. llvm-svn: 68511
* Remove a FIXME, the driver handles -O4.Daniel Dunbar2009-04-071-1/+0
| | | | llvm-svn: 68481
* Define __OPTIMIZE__ and __OPTIMIZE_SIZE__ if the -O[12] and -Os flags are ↵Anders Carlsson2009-04-061-25/+34
| | | | | | passed to the compiler. llvm-svn: 68450
* enable -std=c9x and -std=iso9899:199x, patch by Ed Schouten!Chris Lattner2009-04-061-2/+2
| | | | llvm-svn: 68449
* Apply a patch which adds 'OriginalParmVar' to the DeclContextPrinter by JonZhongxing Xu2009-04-051-1/+6
| | | | | | Simons. llvm-svn: 68436
* Implement -fvisibility.Fariborz Jahanian2009-04-031-0/+23
| | | | llvm-svn: 68369
* Rename GeneratePCH action to GeneratePTHDouglas Gregor2009-04-021-3/+3
| | | | llvm-svn: 68348
* Add a new command-line option "-fixit-at=file:line:column" that onlyDouglas Gregor2009-04-021-0/+121
| | | | | | | applies fix-its to error messages that occur at that specific location in the program. llvm-svn: 68342
* Remove -ftrapu.Mike Stump2009-04-021-8/+2
| | | | llvm-svn: 68330
* Provide FIX-IT notes to describe what fix-it is doing behind theDouglas Gregor2009-04-021-2/+1
| | | | | | | scenes, using the underlying diagnostic client to format the messages. llvm-svn: 68324
* Introduce a "-fixit" mode to clang-cc that applies code-modification hints.Douglas Gregor2009-04-021-1/+17
| | | | llvm-svn: 68268
* Fixup -ftrapv to be more gcc compatible. -ftrapu (for want of aMike Stump2009-04-021-2/+8
| | | | | | | | | | better name) is the option that SmallTalk can use to intercept all overflows, including unsigned. I added some testcases so we don't break anything. Also included is another patch from David for += and friends. llvm-svn: 68267
* Add -ftrapv support, patch from David Chisnall; well all except theMike Stump2009-04-011-0/+9
| | | | | | clang option code that is and two bug fixes. llvm-svn: 68240
* Revert r68221, -ftrapv support, which causes several regressions inDouglas Gregor2009-04-011-9/+0
| | | | | | Clang's test suite. llvm-svn: 68230
* Add -ftrapv support, patch from David Chisnall; well all except theMike Stump2009-04-011-0/+9
| | | | | | clang option code that is. llvm-svn: 68221
* Pull clang-cc code for generating PTH files based on the input type.Daniel Dunbar2009-04-011-45/+12
| | | | | | | | | | | | | | | | | | | | | | | | - <rdar://problem/6741594> [pth] don't abuse -x to drive pth generation - Simpler, and fixes PR3915. Cleanup test cases for PTH: - Update to use -emit-pth - Removed PTH test of carbon.c and cocoa.mm; these didn't actually verify anything, and since PTH is token based the extra coverage (over cocoa.m) isn't particularly helpful. - Split PTH tests in cocoa.m to cocoa-pth.m, solely to increase available parallelism when running tests. Ted, could you update the PTH test cases (include-pth.c and cocoa-pth.m) to have some sort of positive check that the PTH is getting used? "# of PTH cache hits" or "tokens read from PTH cache" statistics would work great. :) llvm-svn: 68189
* Add '-emit-pth' option to clang-cc as an alternate API for the high-level driverTed Kremenek2009-04-011-1/+3
| | | | | | | to generate PTH files. Soon we will remove from clang-cc the GCC-style '-x c-header' interface for generating PTH files and push this logic to 'clang'. llvm-svn: 68164
* Add two FIXMEsDaniel Dunbar2009-03-311-0/+4
| | | | llvm-svn: 68138
* Rename clang.[cpp,h] to clang-cc.[cpp,h] to reflect the name change of theTed Kremenek2009-03-3111-13/+13
| | | | | | low-level frontend driver. llvm-svn: 68131
* (LLVM up) Update to use llvm::sys::getHostTriple().Daniel Dunbar2009-03-311-20/+3
| | | | | | | | - Always pass -triple to clang-cc (-arch will be removed). - clang-cc doesn't play guess work with the target triple anymore. llvm-svn: 68119
* Implement -Wmissing-prototypes. Fixes PR3911.Douglas Gregor2009-03-311-0/+5
| | | | llvm-svn: 68110
* Add support for -Wdeprecated-declarations.Steve Naroff2009-03-311-0/+3
| | | | | | This fixes <rdar://problem/6712496> Unable to disable deprecated warning. llvm-svn: 68108
* Implement -Wno-pointer-sign.Eli Friedman2009-03-301-0/+4
| | | | llvm-svn: 68062
* Driver: Support -M and -MM.Daniel Dunbar2009-03-301-5/+9
| | | | | | | | - Not particularly elegant, but my hand is forced by gcc. Also, tweak -ccc-print-bindings output. llvm-svn: 68027
* Improve dependency file support.Daniel Dunbar2009-03-303-132/+57
| | | | | | | | | | | | - Rip out various bits of logic from clang-cc's dependency file gen, force driver to provide instead. - -MD output now goes to proper location <rdar://problem/6723948> clang -MD puts dep file in /tmp with wrong name - -M and -MM still don't work correctly. llvm-svn: 68022
* Push DeclGroup much farther throughout the compiler. Now the variousChris Lattner2009-03-298-30/+59
| | | | | | | | | | | | | | | | | | | | | | | | | productions (except the already broken ObjC cases like @class X,Y;) in the parser that can produce more than one Decl return a DeclGroup instead of a Decl, etc. This allows elimination of the Decl::NextDeclarator field, and exposes various clients that should look at all decls in a group, but which were only looking at one (such as the dumper, printer, etc). These have been fixed. Still TODO: 1) there are some FIXME's in the code about potentially using DeclGroup for better location info. 2) ParseObjCAtDirectives should return a DeclGroup due to @class etc. 3) I'm not sure what is going on with StmtIterator.cpp, or if it can be radically simplified now. 4) I put a truly horrible hack in ParseTemplate.cpp. I plan to bring up #3/4 on the mailing list, but don't plan to tackle #1/2 in the short term. llvm-svn: 68002
* Introduce a new OpaquePtr<N> struct type, which is a simple POD wrapper for aChris Lattner2009-03-281-93/+96
| | | | | | | | | | | | | | | | | | | | pointer. Its purpose in life is to be a glorified void*, but which does not implicitly convert to void* or other OpaquePtr's with a different UID. Introduce Action::DeclPtrTy which is a typedef for OpaquePtr<0>. Change the entire parser/sema interface to use DeclPtrTy instead of DeclTy*. This makes the C++ compiler enforce that these aren't convertible to other opaque types. We should also convert ExprTy, StmtTy, TypeTy, AttrTy, BaseTy, etc, but I don't plan to do that in the short term. The one outstanding known problem with this patch is that we lose the bitmangling optimization where ActionResult<DeclPtrTy> doesn't know how to bitmangle the success bit into the low bit of DeclPtrTy. I will rectify this with a subsequent patch. llvm-svn: 67952
* rename some methods.Chris Lattner2009-03-281-1/+1
| | | | llvm-svn: 67923
* reduce indentation, no functionality change.Chris Lattner2009-03-281-116/+122
| | | | llvm-svn: 67916
OpenPOWER on IntegriCloud