summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Provide sema proper values of maximal number of arguments passed in registers.Anton Korobeynikov2009-04-031-0/+2
| | | | llvm-svn: 68413
* Add target hook for setting symbol prefix and section of unicodeDaniel Dunbar2009-04-031-0/+16
| | | | | | string literals. llvm-svn: 68363
* Fix a little typo that was killing de-serializationDouglas Gregor2009-04-031-1/+1
| | | | llvm-svn: 68354
* Resynchronize Decl/VarDecl serialization code with the structuresDouglas Gregor2009-04-021-2/+2
| | | | llvm-svn: 68346
* Add ConvertUTF module from http://www.unicode.org/Public/PROGRAMS/CVTUTF.Steve Naroff2009-04-012-0/+548
| | | | | | | | | | #ifdef'd out the 5 conversion routines that we don't currently need. Still need a bit more work in GetAddrOfConstantCFString(). Added a FIXME to indicate this. Expect to remove the FIXME today... llvm-svn: 68208
* Add Target hooks for IRgen of [cf]string literals.Daniel Dunbar2009-03-311-0/+18
| | | | | | | | | | | - Notably, set section on cfstring literal string data (for now, this is done everywhere because it matches what we were already doing for the CFString data itself) - <rdar://problem/6599098> [irgen] linker requires objc string data to go into cstring llvm-svn: 68160
* Fix the default for intptr_t on *BSD x86-32 and Windows. Slight cleanup Eli Friedman2009-03-291-14/+7
| | | | | | by moving the general case to the generic x86-32 target. llvm-svn: 68015
* Ad FreeBSD ARM target info.Daniel Dunbar2009-03-231-0/+15
| | | | | | - Patch by Ed Schoeten! llvm-svn: 67527
* Eliminate post-diagnostic hooks. Instead, implement a Sema-specificDouglas Gregor2009-03-201-10/+0
| | | | | | | variant of DiagnosticBuilder that emits the template instantiation backtrace when needed. llvm-svn: 67413
* refactor some code, fixing a problem discovered by the dragonfly bsd people, ↵Chris Lattner2009-03-201-19/+31
| | | | | | | | where clang was defining "i386" even when in non-gnu mode. llvm-svn: 67378
* pass langoptions around.Chris Lattner2009-03-201-9/+10
| | | | llvm-svn: 67376
* pass LangOptions into TargetInfo::getTargetDefines, so that targetsChris Lattner2009-03-201-33/+53
| | | | | | can have language-specific defines. llvm-svn: 67375
* Bindir and Win32 builds work, so switch to .inc files. Leave the .def files ↵Sebastian Redl2009-03-191-16/+16
| | | | | | in the tree for a day or so longer. llvm-svn: 67346
* Allow notes to be printed following a fatal error, then suppress anyDouglas Gregor2009-03-191-12/+17
| | | | | | | | | | diagnostics following those notes. Make exceeding the template instantiation depth a fatal error. Thanks to Daniel for pointing out the problem! llvm-svn: 67320
* Build system changes to use TableGen to generate the variousDouglas Gregor2009-03-162-1/+11
| | | | | | | | | | | | | | | | | | diagnostics. This builds on the patch that Sebastian committed and then revert. Major differences are: - We don't remove or use the current ".def" files. Instead, for now, we just make sure that we're building the ".inc" files. - Fixed CMake makefiles to run TableGen and build the ".inc" files when needed. Tested with both the Xcode and Makefile generators provided by CMake, so it should be solid. - Fixed normal makefiles to handle out-of-source builds that involve the ".inc" files. I'll send a separate patch to the list with Sebastian's changes that eliminate the use of the .def files. llvm-svn: 67058
* Revert the switch to the tablegen diags. It fails for seperate objdir builds ↵Sebastian Redl2009-03-141-16/+16
| | | | | | and cmake builds, and I have no clue what to do about it. Revisit this after someone with a clue about the build systems has looked at it. llvm-svn: 67009
* Switch diagnostics from .def to tablegen files. Please validate the Windows ↵Sebastian Redl2009-03-141-16/+16
| | | | | | build. llvm-svn: 67007
* Add Diagnostic files for Frontend and move a couple errors over.Daniel Dunbar2009-03-121-2/+14
| | | | | | | - Notably, clang now exits with an error if it can't find a file. This flushed out a bug in the CGColorSpace.c test case. :) llvm-svn: 66789
* Driver: Use standard Diagnostic interface for diagnostics.Daniel Dunbar2009-03-121-2/+14
| | | | llvm-svn: 66786
* Clear all the linetable state in clear(), fixing problemsChris Lattner2009-03-111-0/+1
| | | | | | | with "clang t.i s.i" where the .i files contain line markers. rdar://6667812 llvm-svn: 66619
* Add a notion of "post-diagnostic hooks", which are callbacks attachedDouglas Gregor2009-03-101-0/+18
| | | | | | | | | | | | | | | | | to a diagnostic that will be invoked after the diagnostic (if it is not suppressed). The hooks are allowed to produce additional diagnostics (typically notes) that provide more information. We should be able to use this to help diagnostic clients link notes back to the diagnostic they clarify. Comments welcome; I'll write up documentation and convert other clients (e.g., overload resolution failures) if there are no screams of protest. As the first client of post-diagnostic hooks, we now produce a template instantiation backtrace when a failure occurs during template instantiation. There's still more work to do to make this output pretty, if that's even possible. llvm-svn: 66557
* Remove some now-unneeded calls to llvm::errs().flush().Daniel Dunbar2009-03-101-1/+0
| | | | llvm-svn: 66555
* Add FullSourceLoc::getDecomposedLoc.Ted Kremenek2009-03-101-0/+4
| | | | llvm-svn: 66522
OpenPOWER on IntegriCloud