summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic
Commit message (Collapse)AuthorAgeFilesLines
...
* Provide dummy va_list typedef for msp430Anton Korobeynikov2009-05-081-1/+1
| | | | llvm-svn: 71233
* Handle -march for the LLVM recognized cpu names.Daniel Dunbar2009-05-061-10/+35
| | | | | | | - x86 target feature handling should not be feature complete, even if the code quality is lacking. llvm-svn: 71123
* More x86 target feature support.Daniel Dunbar2009-05-061-4/+58
| | | | | | | | | | | | | | | | | | - Apologies for the extremely gross code duplication, I want to get this working and then decide how to get this information out of the back end. - This replaces -m[no-]sse4[12] by -m[no-]sse4, it appears gcc doesn't distinguish them? - -msse, etc. now properly disable/enable related features. - Don't always define __SSE3__... - The main missing functionality bit here is that we don't initialize the features based on the CPU for all -march options. llvm-svn: 71117
* Tweak x86 -mcpu defaults.Daniel Dunbar2009-05-061-0/+3
| | | | | | | | | - Default to yonah on Darwin (to get SSE3). - Default to Pentium4 (32-bit) and x86-64 (64-bit) on non-Darwin. Welcome to the 21st century. llvm-svn: 71069
* Fix rdar://6860124 - invalid input constraint 'J' in asmChris Lattner2009-05-061-1/+9
| | | | | | | This recognizes all the target-independent constant constraints that have target-specific meanings. llvm-svn: 71064
* Improve handling of (X86) target features.Daniel Dunbar2009-05-061-45/+52
| | | | | | | | | | | | | | | | | | | | | - This is a WIP... - This adds -march= handling to the driver, and fixes the defaulting of -mcpu on Darwin (which was using the wrong test). Instead of handling -m{sse, ...} in the driver, pass them to clang-cc as -target-feature [+-]name In clang-cc, communicate with the (clang) target to discover the legal features of a target, and the features which are enabled based on -mcpu. This is currently hardcoded just enough to not be a feature regression, we need to get this information from the backend's TableGen information somehow. This is used to construct the full list of features which are being used, which is in turn used to initialize the predefines. llvm-svn: 71061
* Hook msp430 inAnton Korobeynikov2009-05-031-0/+73
| | | | llvm-svn: 70774
* Whitespace cleanupAnton Korobeynikov2009-05-031-139/+138
| | | | llvm-svn: 70773
* when creating custom warning diagnostics, do not attempt to mapChris Lattner2009-05-021-5/+0
| | | | | | | | them with -Werror. Custom diags cannot be mapped, and this makes -Werror cause a determinstic crash for the checker and other clients of the custom diagnostics machinery. rdar://6816191 llvm-svn: 70639
* Simplify the scheme used for keywords, and change the classification Eli Friedman2009-04-281-55/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | scheme to be more useful. The new scheme introduces a set of categories that should be more readable, and also reflects what we want to consider as an extension more accurately. Specifically, it makes the "what is a keyword" determination accurately reflect whether the keyword is a GNU or Microsoft extension. I also introduced separate flags for keyword aliases; this is useful because the classification of the aliases is mostly unrelated to the classification of the original keyword. This patch treats anything that's in the implementation namespace (prefixed with "__", or "_X" where "X" is any upper-case letter) as a keyword without marking it as an extension. This is consistent with the standards in that an implementation is allowed to define arbitrary extensions in the implementation namespace without violating the standard. This gets rid of all the nasty "extension used" warnings for stuff like __attribute__ in -pedantic mode. We still warn for extensions outside of the the implementation namespace, like typeof. If someone wants to implement -Wextensions or something like that, we could add additional information to the keyword table. This also removes processing for the unused "Boolean" language option; such an extension isn't supported on any other C implementation, so I don't see any point to adding it. The changes to test/CodeGen/inline.c are required because previously, we weren't actually disabling the "inline" keyword in -std=c89 mode. I'll remove Boolean and NoExtensions from LangOptions in a follow-up commit. llvm-svn: 70281
* Be more careful in our teardown of the PCHReader after deciding toDouglas Gregor2009-04-271-0/+16
| | | | | | ignore a PCH file. llvm-svn: 70251
* Implement caching of stat() calls for precompiled headers, which isDouglas Gregor2009-04-271-0/+18
| | | | | | | | essentially the same thing we do with pretokenized headers. stat() caching improves performance of the Cocoa-prefixed "Hello, World" by 45%. llvm-svn: 70223
* Load most of the source manager's information lazily from the PCHDouglas Gregor2009-04-271-4/+52
| | | | | | | | | | | | | | | | | | | file. In particular, only eagerly load source location entries for files and for the predefines buffer. Other buffers and macro-instantiation source location entries are loaded lazily. With the Cocoa-prefixed "Hello, World", we only load 815/26555 source location entities. This halves the amount of user time we spend in this "Hello, World" program with -fsyntax-only (down to .007s). This optimization is part 1 of 2 for the source manager. This eliminates most of the user time in loading a PCH file. We still spend too much time initialize File structures (especially in the calls to stat), so we need to either make the loading of source location entries for files lazy or import the stat cache from the PTH implementation. llvm-svn: 70196
* Some fixes for PCH (de-)serialization of Objective-C AST nodes:Douglas Gregor2009-04-261-2/+5
| | | | | | | | | | | | | | | | - Deal with the Receiver/ClassInfo shared storage in ObjCMessageExpr - Implement PCH support for ImplicitParamDecl - Fix the handling of the body of an ObjCMethodDecl - Several cast -> cast_or_null fixes - Make Selector::getIdentifierInfoForSlot work for 1-argument, NULL selectors. - Make Selector::getAsString() work with NULL selectors. - Fix the names of VisitObjCAtCatchStmt and VisitObjCAtFinallyStmt in the PCH reader and writer; these were never getting called. At this point, all of the pch-test tests pass for C and Objective-C. llvm-svn: 70163
* in a tied operand, don't copy over the name or constraint string, just the ↵Chris Lattner2009-04-261-2/+1
| | | | | | flags. llvm-svn: 70137
* pull operands names "[foo]" into ConstraintInfo.Chris Lattner2009-04-261-13/+7
| | | | llvm-svn: 70136
* pull the constraint string into the ConstraintInfo structChris Lattner2009-04-261-4/+5
| | | | | | instead of passing it around in addition to it. llvm-svn: 70135
* change TargetInfo::ConstraintInfo to be a struct that containsChris Lattner2009-04-262-29/+23
| | | | | | the enum along with some other data. llvm-svn: 70114
* Lazily load the controlling macros for all of the headers known in theDouglas Gregor2009-04-251-0/+2
| | | | | | | | PCH file. In the Cocoa-prefixed "Hello, World" benchmark, this takes us from reading 503 identifiers down to 37 and from 470 macros down to 4. It also results in an 8% performance improvement. llvm-svn: 70094
* some arm triples have weird characters in them, just fuzzy matchChris Lattner2009-04-231-7/+11
| | | | | | on armv* to be more compatible llvm-svn: 69864
* Remove the serialization code that predates precompiledDouglas Gregor2009-04-226-377/+1
| | | | | | | headers. Future approaches to (de-)serializing ASTs will be based on the PCH infrastructure. llvm-svn: 69828
* Add missing dependency, patch by Jason Haslam!Chris Lattner2009-04-221-0/+1
| | | | llvm-svn: 69819
* Pass and return aggregate types directly to function calls.Sanjiv Gupta2009-04-211-1/+1
| | | | llvm-svn: 69668
* Don't crash in the diagnostic printer if we happen to get passed aDaniel Dunbar2009-04-201-0/+13
| | | | | | null string / identifier. llvm-svn: 69575
* move group twiddling options into Diagnostic.cpp instead ofChris Lattner2009-04-191-0/+58
| | | | | | | Warnings.cpp. Warnings.cpp now doesn't need to #include tblgen produced output directly. llvm-svn: 69559
* Add target property for whether thread-local storage is supported. Eli Friedman2009-04-192-3/+10
| | | | | | | | Let me know if I messed up for some target. Note that for Windows, we should be able to support it (MSVC supports "__declspec(thread)"), but I'm pretty sure LLVM doesn't know how to generate the correct code. llvm-svn: 69552
* actually just do this on all x86 targets, it won't hurtChris Lattner2009-04-191-10/+5
| | | | | | non-glibc ones. llvm-svn: 69528
* Define __NO_MATH_INLINES on linux/x86 so that we don't get inlineChris Lattner2009-04-191-0/+10
| | | | | | | | | | functions in glibc header files that use FP Stack inline asm which the backend can't deal with (PR879). This "fixes" PR3970 for linux. Other affected systems should do similar things. Maybe this should just go to the general i386/x86-64 sections? llvm-svn: 69527
* optimize and comment GetDiagInfo.Chris Lattner2009-04-161-6/+32
| | | | llvm-svn: 69273
* merge several scattered tables into StaticDiagInfo.Chris Lattner2009-04-161-144/+19
| | | | llvm-svn: 69272
* Implement Diagnostic::getWarningOptionForDiag with information from tblgen,Chris Lattner2009-04-161-10/+19
| | | | | | this implements -fdiagnostics-show-option in clang-cc. llvm-svn: 69271
* tblgen is now passing diagnostic group information in the .inc file, ignore ↵Chris Lattner2009-04-161-3/+4
| | | | | | it everywhere. llvm-svn: 69269
* implement framework for -fdiagnostics-show-option, but tblgen isn'tChris Lattner2009-04-161-0/+7
| | | | | | passing down the right info yet. llvm-svn: 69268
* move handling of -pedantic and -pedantic-errors into Diagnostics,Chris Lattner2009-04-161-3/+20
| | | | | | | out of Warnings.cpp. This simplifies warnings.cpp and makes it more efficient. llvm-svn: 69266
* arrange for -Wno-error=foo warnings to be immune to -Werror as Chris Lattner2009-04-161-1/+14
| | | | | | they are supposed to be. llvm-svn: 69265
* change mappings to distinguish between "unset", "set by the user" and Chris Lattner2009-04-161-7/+23
| | | | | | "set to the default value". llvm-svn: 69264
* fix some out of bounds array access problems, which manifest particularlyChris Lattner2009-04-151-18/+37
| | | | | | spectacularly when built for x86-64. llvm-svn: 69197
* move {'sChris Lattner2009-04-151-6/+3
| | | | llvm-svn: 69179
* Make diagnostic class explicit in the diag record instead ofChris Lattner2009-04-151-16/+14
| | | | | | | implicit from its parenting. Now that diag mapping is explicit, eliminate the fatal and extwarn classes. llvm-svn: 69177
* Tblgen now passes the default mapping explicitly, instead of having it Chris Lattner2009-04-151-20/+3
| | | | | | be tied to the diag class. This requires an LLVM tree update. llvm-svn: 69175
* Rejigger how -pedantic and -pedantic-errors work and their interactionChris Lattner2009-04-151-58/+107
| | | | | | | | | | | | | | | | with other diagnostic mapping. In the new scheme, -Wfoo or -Wno-foo or -Werror=foo all override the -pedantic options, and __extension__ robustly silences all extension diagnostics in their scope. An added bonus of this change is that MAP_DEFAULT goes away, meaning that per-diagnostic mapping information can now be stored in 2 bits, doubling the density of the Diagnostic::DiagMapping array. This also substantially simplifies Diagnostic::getDiagnosticLevel. OTOH, this temporarily introduces some "macro intensive" code in Diagnostic.cpp. This will be addressed in a later patch. llvm-svn: 69154
* Fixup whitespacing.Mike Stump2009-04-141-2/+2
| | | | llvm-svn: 69055
* Include the SourceManager's line table in the PCH file. We can nowDouglas Gregor2009-04-131-0/+11
| | | | | | properly cope with #line directives in PCH files. llvm-svn: 68963
* Factor the internals of SourceManager (specially, LineTableInfo) into a ↵Douglas Gregor2009-04-131-96/+1
| | | | | | separate Internals header. No functionality change llvm-svn: 68960
* Support -miphoneos-version-min in clang-cc.Daniel Dunbar2009-04-101-25/+79
| | | | | | | | | | - 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
* Add initial support for -imacros. Right now it has the same semantics asChris Lattner2009-04-081-0/+2
| | | | | | -include, but that will be fixed soon. llvm-svn: 68625
* remove fixme!Chris Lattner2009-04-081-2/+0
| | | | llvm-svn: 68589
* Add basic support for arm static analysis checking. Radar 6699395Mike Stump2009-04-081-3/+33
| | | | llvm-svn: 68582
* Fariborz points out that weak is now defined to the attribute evenChris Lattner2009-04-071-6/+6
| | | | | | in C mode. llvm-svn: 68520
* The __weak and __strong defines are common to all darwin targetsChris Lattner2009-04-071-6/+16
| | | | | | | | | | | and are even set in C mode. As such, move them to Targets.cpp. __OBJC_GC__ is also darwin specific, but seems reasonable to always define it when in objc-gc mode. This fixes rdar://6761450 llvm-svn: 68494
OpenPOWER on IntegriCloud