summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic
Commit message (Collapse)AuthorAgeFilesLines
* Define some built-ins macros on mips32 platform, from Simon Atanasyan!Douglas Gregor2011-11-091-0/+4
| | | | llvm-svn: 144189
* [PCH] Fix reading from PCH of diagnostic pragmas.Argyrios Kyrtzidis2011-11-091-10/+1
| | | | | | | | | | | In certain cases ASTReader would call the normal DiagnosticsEngine API to initialize the state of diagnostic pragmas but DiagnosticsEngine would try to compare source locations leading to crash because the main FileID was not yet initialized. Yet another case of the ASTReader trying to use the normal APIs and inadvertently breaking invariants. Fix this by having the ASTReader set up the internal state directly. llvm-svn: 144153
* Use StringRef's case transformation methods.Benjamin Kramer2011-11-061-3/+2
| | | | llvm-svn: 143889
* Move definitions of SizeType and PtrDiffType to Mips32TargetInfoBase.Akira Hatanaka2011-11-051-5/+5
| | | | llvm-svn: 143775
* Fix various minor issues find via unreachable code warnings, fromDouglas Gregor2011-11-021-0/+2
| | | | | | Ahmed Charles! llvm-svn: 143569
* Move ConvertUTF8toUTF32 out of #if 0, in preparation for a patch which needs it.Eli Friedman2011-11-011-61/+62
| | | | llvm-svn: 143415
* In x86_64, when calling an Objective-C method that returns a _Complex long ↵Anders Carlsson2011-10-312-0/+6
| | | | | | double, make sure to use the objc_msgSend_fp2ret function which ensures that the return value will be {0, 0} if the receiver is nil. llvm-svn: 143350
* Add support for sse4a and enable it for amdfam10 cpu.Roman Divacky2011-10-301-3/+9
| | | | llvm-svn: 143312
* Add support for amdfam10 cpu.Roman Divacky2011-10-301-0/+9
| | | | llvm-svn: 143305
* Make the loading of information attached to an IdentifierInfo from anDouglas Gregor2011-10-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AST file more lazy, so that we don't eagerly load that information for all known identifiers each time a new AST file is loaded. The eager reloading made some sense in the context of precompiled headers, since very few identifiers were defined before PCH load time. With modules, however, a huge amount of code can get parsed before we see an @import, so laziness becomes important here. The approach taken to make this information lazy is fairly simple: when we load a new AST file, we mark all of the existing identifiers as being out-of-date. Whenever we want to access information that may come from an AST (e.g., whether the identifier has a macro definition, or what top-level declarations have that name), we check the out-of-date bit and, if it's set, ask the AST reader to update the IdentifierInfo from the AST files. The update is a merge, and we now take care to merge declarations before/after imports with declarations from multiple imports. The results of this optimization are fairly dramatic. On a small application that brings in 14 non-trivial modules, this takes modules from being > 3x slower than a "perfect" PCH file down to 30% slower for a full rebuild. A partial rebuild (where the PCH file or modules can be re-used) is down to 7% slower. Making the PCH file just a little imperfect (e.g., adding two smallish modules used by a bunch of .m files that aren't in the PCH file) tips the scales in favor of the modules approach, with 24% faster partial rebuilds. This is just a first step; the lazy scheme could possibly be improved by adding versioning, so we don't search into modules we already searched. Moreover, we'll need similar lazy schemes for all of the other lookup data structures, such as DeclContexts. llvm-svn: 143100
* Use assert(0) instead of duplicating the check, suggestion by Anna.Argyrios Kyrtzidis2011-10-251-3/+3
| | | | llvm-svn: 142886
* Remove the Blackfin backend.Dan Gohman2011-10-251-79/+0
| | | | llvm-svn: 142881
* Remove the SystemZ backend.Dan Gohman2011-10-241-63/+0
| | | | llvm-svn: 142879
* Make changes necessary for N32/64 ABI conformance.Akira Hatanaka2011-10-221-9/+25
| | | | | | | - Size of long double is 16 bytes for both N32 and N64. - Size of pointers and long is 8 bytes for N64. llvm-svn: 142705
* Further refine the diagnostic categories for ARC diagnostics. Addresses ↵Ted Kremenek2011-10-201-2/+7
| | | | | | <rdar://problem/10245086>. llvm-svn: 142571
* Use llvm::Triple's methods to parse FreeBSD version numbers.Benjamin Kramer2011-10-181-4/+5
| | | | | | | Who could've thought that FreeBSD would ever reach version 10! Patch from Dimitry Andric. llvm-svn: 142349
* For modules, all macros that aren't include guards are implicitlyDouglas Gregor2011-10-171-0/+2
| | | | | | | public. Add a __private_macro__ directive to hide a macro, similar to the __module_private__ declaration specifier. llvm-svn: 142188
* Place static initializers on linux into the ".text.startup" section, so the ↵Benjamin Kramer2011-10-151-0/+4
| | | | | | | | linker can group them together for performance. This only has an effect with fairly new binutils (2.21.51 or later). Other ELF targets probably want this as well, but on BSDs binutils is usually old so it doesn't matter. llvm-svn: 142076
* Provide half floating point support as a storage only type.Anton Korobeynikov2011-10-141-0/+3
| | | | | | Lack of half FP was a regression compared to llvm-gcc. llvm-svn: 142016
* Misc fixes for atomics. Biggest fix is doing alignment correctly for ↵Eli Friedman2011-10-142-0/+19
| | | | | | _Atomic types. llvm-svn: 142002
* Change __extension__ to disable only diagnostics controlled by -pedantic.Bob Wilson2011-10-121-3/+6
| | | | | | | | | | | | This changes clang to match GCC's behavior for __extension__, which temporarily disables the -pedantic flag. Warnings that are enabled without -pedantic are not affected. Besides the general goodness of matching GCC's precedent, my motivation for this is that macros in the arm_neon.h header need to use __extension__ to avoid pedantic complaints about their use of statement expressions, yet we still want to warn about incompatible pointer arguments for those macros. llvm-svn: 141804
* Add target info for Linux on PPC & Sparc.Anton Korobeynikov2011-10-121-0/+6
| | | | | | Patch by Hal Finkel! llvm-svn: 141772
* Introduce SourceManager::getFileLoc which returns a file locationArgyrios Kyrtzidis2011-10-121-0/+10
| | | | | | taking into account macro arguments. llvm-svn: 141771
* Add a -Wc++0x-compat warning for C++11 keywords used as identifiers when inRichard Smith2011-10-111-7/+10
| | | | | | C++98 mode. Only the first occurrence of each keyword will produce a warning. llvm-svn: 141700
* Allow regparm attribute for PNaCl targetDavid Meyer2011-10-111-0/+1
| | | | llvm-svn: 141638
* Fixed natural stack alignment for Linux x86-32. Thanks Eli.Lang Hames2011-10-111-1/+1
| | | | llvm-svn: 141617
* Update target data strings for ARM and X86 to include the natural stackLang Hames2011-10-101-9/+9
| | | | | | alignment parameter "S<size>" that was introduced in r141599. llvm-svn: 141601
* Add address spaces for TCE target. Patch by Pekka Jääskeläinen.Eli Friedman2011-10-071-0/+7
| | | | llvm-svn: 141390
* Basic/Diagnostics: Apparently, #pragma ... diagnostic is intended to overrideDaniel Dunbar2011-10-041-0/+7
| | | | | | | | the command line options (at least according to GCC's documentation). GCC 4.2 didn't appear to actually do this, but it seems like that has been fixed in later release, so we will follow the docs. llvm-svn: 141119
* Make sure SourceManager::getFileIDLoaded doesn't hang in release build ↵Argyrios Kyrtzidis2011-10-031-0/+4
| | | | | | | | because of invalid passed parameter. rdar://10210140 llvm-svn: 141048
* PTX: Add some basic support for OpenCL address spacesJustin Holewinski2011-10-031-0/+6
| | | | llvm-svn: 141008
* Basic/Diagnostic: Kill off a few unnecessary functions now that refactoring ↵Daniel Dunbar2011-09-292-8/+6
| | | | | | is done, and add a note that the new setDiagnosticGroup{...} methods only operate on the current diagnostic state. llvm-svn: 140771
* Basic/Diagnostics: Rewrite DiagnosticIDs::getDiagnosticLevel completely to ↵Daniel Dunbar2011-09-292-69/+55
| | | | | | | | be straighter line code, use the new DiagnosticMappingInfo flags, and eliminate the odd MAP_WARNING_NO_WERROR and friend mappings. - This fixes a host of obscure bugs with regards to how warning mapping options composed with one another, and I believe makes the code substantially easier to read and reason about. llvm-svn: 140770
* Basic/Diagnostics: Add three explicit bits to DiagnosticMappingInfo to track ↵Daniel Dunbar2011-09-292-21/+66
| | | | | | | | "no-warning-as-error", "no-error-as-fatal", and "show-in-system-header", and update DiagnosticsEngine::setDiagnosticGroup{WarningAsError,ErrorAsFatal} and GetDefaultDiagMappingInfo to set them appropriately. - No actual functionality change for now, we still also use the diag::Mapping::{MAP_WARNING_NO_ERROR,MAP_ERROR_NO_FATAL,MAP_WARNING_SHOW_IN_SYSTEM_HEADER} for a little while longer. llvm-svn: 140768
* Basic/Diagnostics: Add a DiagnosticIDs::getDiagnosticsInGroup method, and useDaniel Dunbar2011-09-292-39/+42
| | | | | | | that in DiagnosticEngine instead of the convoluted calling into DiagnosticIDs which then calls back into the DiagnosticsEngine. llvm-svn: 140766
* Basic/Diagnostic: Add a DiagSate::getOrAddMappingInfo method.Daniel Dunbar2011-09-291-7/+22
| | | | | | - Also, spell const_iterator as const_iterator. llvm-svn: 140765
* Basic/Diagnostics: Move setDiagnosticMapping() to using DiagnosticMappingInfoDaniel Dunbar2011-09-291-5/+7
| | | | | | and eliminate setDiagnosticMappingInternal. llvm-svn: 140763
* Basic/Diagnostics: Add a DiagnosticMappingInfo helper class, and switch toDaniel Dunbar2011-09-291-10/+11
| | | | | | | storing mappings with that instead of straying some magic constants about the source. llvm-svn: 140760
* Basic/Diagnostics: Eliminate getDiagnosticMappingInfo method, which wasn't ↵Daniel Dunbar2011-09-291-2/+1
| | | | | | worth methodizing. llvm-svn: 140759
* Basic/Diagnostic: Eliminate the extra "mapping" out-parameter now that I ↵Daniel Dunbar2011-09-291-8/+3
| | | | | | killed the sole client. llvm-svn: 140756
* Basic/Diagnostics: Add an isDefaultMappingAsError method, and switch ↵Daniel Dunbar2011-09-291-0/+7
| | | | | | | | TextDiagnosticPrinter to use that instead of extracting the current mapping via getDiagnosticLevel, which fixes one class of corner cases w.r.t. printing the "-Werror" diagnostic option marker. - The TextDiagnosticPrinter code is still fragile as it is just "reverse engineering" what the diagnostic engine is doing. Not my current priority to fix though. llvm-svn: 140752
* Basic/Diagnostic: Factor outDaniel Dunbar2011-09-291-0/+12
| | | | | | | | | DiagnosticsEngine::setDiagnosticGroup{ErrorAsFatal,WarningAsError} methods which more accurately model the correct API -- no internal change to the diagnostics engine yet though. - Also, stop honoring -Werror=everything (etc.) as a valid (but oddly behaved) option. llvm-svn: 140747
* Basic/Diagnostics: Split out the default warning "no-Werror" andDaniel Dunbar2011-09-291-6/+26
| | | | | | | "show-in-system-header" bits, which is part of teasing them apart from the diagnostic mapping kind. llvm-svn: 140742
* Fix a typo spotted by Jonathan Sauer.Chandler Carruth2011-09-281-1/+1
| | | | llvm-svn: 140708
* Attempt to silence the GCC -Wreturn-type warning...Chandler Carruth2011-09-281-0/+1
| | | | llvm-svn: 140693
* Generate tests for all of the x86 SIMD instruction feature setChandler Carruth2011-09-281-4/+6
| | | | | | | | | | | | | | predefines based on the output of GCC as well as the CPU predefines. Invert tests for __AVX__, Clang's AVX feature is hard coded off still. Switch Atom from 'SSE3' to 'SSSE3'. This matches GCC's behavior, Intel's documentation, and ICC's documentation (such as I could dig up). Switch Athlon and Geode to enable 3dnowa rather than just 3dnow and nothing (resp.). llvm-svn: 140692
* Fix a think-o on my part that got enshrined in a FIXME by setting up theChandler Carruth2011-09-281-1/+3
| | | | | | __tune_...__ define as well. llvm-svn: 140690
* Move some of the defines down to more natural locations, consolidatingChandler Carruth2011-09-281-10/+10
| | | | | | the target identifying macros at the top, including subtarget macros. llvm-svn: 140689
* Teach Clang to reject 32-bit only CPUs when compiling in 64-bit mode.Chandler Carruth2011-09-281-2/+59
| | | | | | Add 64-bit preprocessor macro tests. llvm-svn: 140688
* Simplify the control flow for predefined macro selection by usingChandler Carruth2011-09-281-27/+26
| | | | | | | | | fallthrough now that we're working with a switch. Also remove a dubious "feature" regarding k6 processors and 3dnow and leave a fixme... Not that anyone is likely to care about correct tuning for k6 processors with and w/o 3dnow... llvm-svn: 140687
OpenPOWER on IntegriCloud