summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic
Commit message (Collapse)AuthorAgeFilesLines
...
* OpenBSD: Remove incorrect -pthread preprocessor define _POSIX_THREADS and ↵Chris Lattner2012-04-251-1/+1
| | | | | | | | | | replace with _REENTRANT. Also remove undef _POSIX_THREADS in phread.h. Patch by Brad Smith! llvm-svn: 155535
* Revert r155363, due to the underlying patches in LLVM causing regressionChandler Carruth2012-04-231-11/+2
| | | | | | test suite failures. llvm-svn: 155371
* Hexagon V5 (floating point) support in cfe.Sirish Pande2012-04-231-2/+11
| | | | llvm-svn: 155363
* Revert some Hexagon builtin commits to match reverts done to LLVM inChandler Carruth2012-04-181-11/+2
| | | | | | | | | | | | | | | | | | | r155047. See the LLVM log for the primary motivation: http://llvm.org/viewvc/llvm-project?rev=155047&view=rev Primary commit r154828: - Several issues were raised in review, and fixed in subsequent commits. - Follow-up commits also reverted, and which should be folded into the original before reposting: - r154837: Re-add the 'undef BUILTIN' thing to fix the build. - r154928: Fix build warnings, re-add (and correct) header and license - r154937: Typo fix. Please resubmit this patch with the relevant LLVM resubmission. llvm-svn: 155048
* MIPS: Followup to r154606. Expand list of accepted MIPS target features in ↵Simon Atanasyan2012-04-181-1/+4
| | | | | | the MipsTargetInfoBase::setFeatureEnabled() routine. llvm-svn: 154998
* objective-c modern translator: buildit objc boolFariborz Jahanian2012-04-161-0/+1
| | | | | | | type for rewriter project will be BoolTy. // rdar://11231426. llvm-svn: 154861
* Hexagon V5(Floating Point) support.Sirish Pande2012-04-161-2/+11
| | | | llvm-svn: 154828
* MIPS: Initialize MIPS CPU's name by default value.Simon Atanasyan2012-04-121-3/+6
| | | | | | | Otherwise MipsTargetInfoBase::getDefaultFeatures() might return an invalid features set with an empty feature name. llvm-svn: 154606
* SourceManager: Vectorize ComputeLineNumbers for SSE2.Benjamin Kramer2012-04-061-2/+39
| | | | | | | | | | | | | | | | This method is very hot, it is called when emitting diagnostics, in -E mode and for many #pragma handlers. It scans through the whole source file to count newlines, records and caches them in a vector. The speedup from vectorization isn't very large, as we fall back to bytewise scanning when we hit a newline. There might be a way to avoid leaving the sse loop but everything I tried didn't work out because a call to push_back clobbers xmm registers. About 2% speedup on average on "clang -E > /dev/null" of all .cpp files in clang's lib/Sema. llvm-svn: 154204
* Move some MIPS target macro definitions from class Mips32TargetInfoBaseSimon Atanasyan2012-04-051-4/+4
| | | | | | | to the base class MipsTargetInfoBase. These macros are applicable for both 32/64-bits targets. llvm-svn: 154116
* [driver] Create a new -mfpmath= option, which is used to control whether clangChad Rosier2012-04-041-1/+2
| | | | | | | | | | | uses Neon instructions for single-precision FP. -mfpmath=neon is analogous to passing llc -mattr=+neonfp. -mfpmath=[vfp|vfp2|vfp3|vfp4] is analogous to passing llc -mattr=-neonfp. rdar://11108618 llvm-svn: 154046
* Add more constraint registers for mips.Eric Christopher2012-04-031-0/+3
| | | | | | Patch by Jack Carter. Testcase cleanup by me. llvm-svn: 153921
* ARM backend knows about cortex-m4. The front end should too.Jim Grosbach2012-03-291-0/+1
| | | | llvm-svn: 153678
* Define __LITTLE_ENDIAN__ for le32, since "le" stands for little endian.Jan Wen Voung2012-03-291-0/+1
| | | | | | Add a test for this too. llvm-svn: 153616
* Fix the type of wchar_t on Solaris.David Chisnall2012-03-281-1/+1
| | | | | | Patch by Dmitri Shubin! llvm-svn: 153585
* Add better support for $fp and $sp for mips inline asm support.Eric Christopher2012-03-271-5/+9
| | | | | | Patch by Jack Carter. llvm-svn: 153530
* Add support for MIPS' floating ABIs (hard, soft and single) to clang driver.Akira Hatanaka2012-03-231-2/+56
| | | | | | Patch by Simon Atanasyan. llvm-svn: 153348
* No longer defining LP64 in 64-bit builds on platforms which are not LP64.Aaron Ballman2012-03-141-2/+4
| | | | llvm-svn: 152740
* [Basic] Fix up DiagnosticBuilder::{FlushCounts,Emit} to be inline.Daniel Dunbar2012-03-131-23/+6
| | | | | | | | | | | | | | | | - This is much more important than it appears at first glance... The intended design of DiagnosticBuilder was that it never escape and that all its members would get lowered to registers by the compiler. By fixing Emit here, the compiler can completely eliminate the DiagnosticBuilder object and never need to push those registers back into it. Unfortunately, Sema has broken DiagnosticBuilder in other ways (by introducing SemaDiagnosticBuilder), so we don't get the fill impact of this, but it is still good for 30k reduction in code size. I'll work on fixing the SemaDiagnosticBuilder problems next. llvm-svn: 152669
* Fix the long double to be of width/align 64. Rename va_list_test toRoman Divacky2012-03-131-2/+6
| | | | | | powerpc_types and add testing for the (long) double there. llvm-svn: 152647
* [Basic] Stop using a SmallVector<> for Diagnostic. This drops Clang binary sizeDaniel Dunbar2012-03-131-3/+6
| | | | | | | | | | by ~%.3/~100k in my build -- simply by eliminating the horrible code bloat coming from the .clear() of the SmallVector<FixItHint>, which does a std::~string, etc. - My understanding is we don't ever emit arbitrary numbers of fixits, so I just moved us to using a statically sized array like we do for arguments and ranges. llvm-svn: 152639
* Long double is just double on FreeBSD/{PPC,PPC64}.Roman Divacky2012-03-131-0/+6
| | | | llvm-svn: 152632
* Use ZeroLengthBitfieldAlignment for AAPCS, as well as APCS-GNU.James Molloy2012-03-121-6/+6
| | | | llvm-svn: 152552
* Fix typo in comment, 'langauge' -> 'language'.Nick Lewycky2012-03-111-1/+1
| | | | llvm-svn: 152547
* When checking the encoding of an 8-bit string literal, don't just check theRichard Smith2012-03-081-3/+19
| | | | | | | first codepoint! Also, don't reject empty raw string literals for spurious "encoding" issues. Also, don't rely on undefined behavior in ConvertUTF.c. llvm-svn: 152344
* More git-svn compatible version string, by request.Andrew Trick2012-03-071-11/+18
| | | | | | | | | | | | | | | | | If you're using git-svn, the clang and llvm repository will typically map to a different revision. Before we had: clang version 3.1 (trunk 152167 trunk 152162) After this change: clang version 3.1 (trunk 152167) (llvm/trunk 152162) So it's self-descriptive with an extra parens group. Which is more compatible with version string parsers is probably debatable, but this style was requested. llvm-svn: 152183
* Add new code migrator support for migrating existing Objective-C code to useTed Kremenek2012-03-061-13/+0
| | | | | | | | | | | the new Objective-C NSArray/NSDictionary/NSNumber literal syntax. This introduces a new library, libEdit, which provides a new way to support migration of code that improves on the original ARC migrator. We now believe that most of its functionality can be refactored into the existing libraries, and thus this new library may shortly disappear. llvm-svn: 152141
* TargetInfo: create less temporary strings.Benjamin Kramer2012-03-051-16/+17
| | | | llvm-svn: 152029
* Fix an ABI problem with ptrdiff_t and intptr_t on PPC32Hal Finkel2012-03-021-0/+2
| | | | | | | | | | ptrdiff_t on PPC32 on Linux, etc. should be int not long. This does not matter for C, but it does matter for C++ because of name mangling. The preprocessor test has been changed accordingly. llvm-svn: 151935
* Use tabs instead of spaces.Benjamin Kramer2012-03-021-3/+3
| | | | | | No, really, make doesn't work with spaces. llvm-svn: 151920
* clang -v support for separate clang.git and llvm.git, patch by Andrew Trick.Jia Liu2012-03-022-10/+48
| | | | llvm-svn: 151910
* Add the Solaris support directory to the header search when using libc++.David Chisnall2012-03-021-1/+1
| | | | | | | | Unconditionally define __C99FEATURES__ when using C++ on Solaris. This is a (hopefully temporary) work around for libc++ exposing C99-but-not-C++98 features in C++98 mode. llvm-svn: 151889
* Moving tagging of '__experimental_modules_import' IdentifierInfo out ofTed Kremenek2012-03-011-0/+4
| | | | | | | | | IndentifierTable::get() and into IdentifierTable's constructor. This gets a 0.7% reducing on lexing time for Cocoa.h, and about the same for PCH generation. llvm-svn: 151854
* Change @import to @__experimental_modules_import. We are not ready to ↵Ted Kremenek2012-03-011-1/+1
| | | | | | | | commit to a particular syntax for modules, and don't have time to push it forward in the near future. llvm-svn: 151841
* Some more Solaris fixes. Now successfully building libc++ on Solaris with ↵David Chisnall2012-02-281-1/+11
| | | | | | clang (and linking clang against it). llvm-svn: 151632
* Move FullSourceLoc::dump into the .cpp file, the used attribute made us emit ↵Benjamin Kramer2012-02-261-0/+4
| | | | | | this into every TU that includes SourceLocation.h. llvm-svn: 151493
* More ArrayRef-ification of methods.Bill Wendling2012-02-221-1/+1
| | | | llvm-svn: 151152
* [PCH] Recover gracefully if the ASTReader detects that a file is differentArgyrios Kyrtzidis2012-02-201-1/+34
| | | | | | | | | | | | | | | | | | | from the one stored in the PCH/AST, while trying to load a SLocEntry. We verify that all files of the PCH did not change before loading it but this is not enough because: - The AST may have been 1) kept around, 2) to do queries on it. - We may have 1) verified the PCH and 2) started parsing. Between 1) and 2) files may change and we are going to have crashes because the rest of clang cannot deal with the ASTReader failing to read a SLocEntry. Handle this by recovering gracefully in such a case, by initializing the SLocEntry with the info from the PCH/AST as well as reporting failure by the ASTReader. rdar://10888929 llvm-svn: 151004
* Basic: import IntrusiveRefCntPtr<> into clang namespaceDylan Noblesmith2012-02-201-1/+1
| | | | | | | The class name is long enough without the llvm:: added. Also bring in RefCountedBase and RefCountedBaseVPTR. llvm-svn: 150958
* On Solaris, define some standard macros that the Solaris headers require inDavid Chisnall2012-02-171-0/+4
| | | | | | order to not be broken (by Solaris standards). llvm-svn: 150822
* Provide common include for all diagnostic headers.David Blaikie2012-02-151-17/+1
| | | | | | Reviewed by Ted Kremenek. llvm-svn: 150616
* Store the warning option corresponding to a diagnostics as an index into the ↵Benjamin Kramer2012-02-151-21/+16
| | | | | | | | option table instead of storing the name. Another 8 bytes + relocation removed from every diagnostic on x86_64. llvm-svn: 150615
* Remove the unuseful -fdiagnostics-show-nameDavid Blaikie2012-02-151-95/+4
| | | | | | | | | | | | | | This option was added in r129614 and doesn't have any use case that I'm aware of. It's possible that external tools are using these names - and if that's the case we can certainly reassess the functionality, but for now it lets us shave out a few unneeded bits from clang. Move the "StaticDiagNameIndex" table into the only remaining consumer, diagtool. This removes the actual diagnostic name strings from clang entirely. Reviewed by Chris Lattner & Ted Kremenek. llvm-svn: 150612
* Set UserLabelPrefix and MCountName correctly for DragonFly BSD. Patch by ↵Eli Friedman2012-02-101-1/+12
| | | | | | | | Sascha Wildner. Setting UserLabelPrefix correctly fixes PR11949. llvm-svn: 150280
* Kill the brief and full explanation fields from StaticDiagInfoRec. They were ↵Benjamin Kramer2012-02-091-32/+5
| | | | | | | | unused and wasted space for nothing. - per PR11952. llvm-svn: 150199
* Fix indentation and an 80-column violation.Chad Rosier2012-02-071-5/+7
| | | | llvm-svn: 150010
* Revert my patches which removed Diagnostic.h includes by moving some ↵Benjamin Kramer2012-02-071-2/+2
| | | | | | | | | | | | | | | | | | operator overloads out of line. This seems to negatively affect compile time onsome ObjC tests (which use a lot of partial diagnostics I assume). I have to come up with a way to keep them inline without including Diagnostic.h everywhere. Now adding a new diagnostic requires a full rebuild of e.g. the static analyzer which doesn't even use those diagnostics. This reverts commit 6496bd10dc3a6d5e3266348f08b6e35f8184bc99. This reverts commit 7af19b817ba964ac560b50c1ed6183235f699789. This reverts commit fdd15602a42bbe26185978ef1e17019f6d969aa7. This reverts commit 00bd44d5677783527d7517c1ffe45e4d75a0f56f. This reverts commit ef9b60ffed980864a8db26ad30344be429e58ff5. llvm-svn: 150006
* In r149662, setDiagnosticMapping was modified to not allow warnings mapped to Chad Rosier2012-02-071-0/+35
| | | | | | | | MAP_ERROR to be remapped to MAP_WARNING. These new APIs are being added to allow the diagnostic mapping's "no Werror" bit to be set, and potentially downgrade anything already mapped to be a warning. llvm-svn: 150001
* Basic: import SmallString<> into clang namespaceDylan Noblesmith2012-02-053-8/+8
| | | | | | | (I was going to fix the TODO about DenseMap too, but that would break self-host right now. See PR11922.) llvm-svn: 149799
* Basic: import OwningPtr<> into clang namespaceDylan Noblesmith2012-02-052-3/+3
| | | | llvm-svn: 149798
OpenPOWER on IntegriCloud