summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Move a method from IdentifierTable.h out of line and remove the SmallString ↵Benjamin Kramer2012-02-043-2/+15
| | | | | | | | include. Fix all the transitive include users. llvm-svn: 149783
* Move Storage and StorageAllocator out of the PartialDiagnostic class so we ↵Benjamin Kramer2012-02-041-2/+2
| | | | | | | | | can forward declare them. Let ASTContext allocate the storage in its BumpPtrAllocator. This will help us remove ASTContext's depedency on PartialDiagnostic.h soon. llvm-svn: 149780
* Change the fixed array of FixitHints to a SmallVector to lift offArgyrios Kyrtzidis2012-02-032-8/+4
| | | | | | the limit on the number of fixits. llvm-svn: 149676
* [frontend] Don't allow a mapping to a warning override an error/fatal mapping.Chad Rosier2012-02-031-0/+7
| | | | | | rdar://10736625 llvm-svn: 149662
* Back out my heinous hack that tricked the module generation mechanismDouglas Gregor2012-02-021-0/+2
| | | | | | | | | | | | | | | | | | | | into using non-absolute system includes (<foo>)... ... and introduce another hack that is simultaneously more heineous and more effective. We whitelist Clang-supplied headers that augment or override system headers (such as float.h, stdarg.h, and tgmath.h). For these headers, Clang does not provide a module mapping. Instead, a system-supplied module map can refer to these headers in a system module, and Clang will look both in its own include directory and wherever the system-supplied module map suggests, then adds either or both headers. The end result is that Clang-supplied headers get merged into the system-supplied module for the C standard library. As a drive-by, fix up a few dependencies in the _Builtin_instrinsics module. llvm-svn: 149611
* Use the new Triple::getMacOSXVersion function in another place.Bob Wilson2012-01-311-26/+5
| | | | | | | I removed support for "*-darwin*-iphoneos" triples, since we now have iOS listed as a separate OS in the triples. llvm-svn: 149455
* Fix "long double" and __SIZE_TYPE__ on powerpc, now with test fix.Nico Weber2012-01-311-1/+5
| | | | | | Fixes PR11867. Patch from Jeremy Huddleston! llvm-svn: 149334
* Revert r149285, it breaks test/Preprocessor/init.c.Nico Weber2012-01-301-5/+1
| | | | llvm-svn: 149301
* Fix "long double" and __SIZE_TYPE__ on powerpc.Nico Weber2012-01-301-1/+5
| | | | | | Fixes PR11867. Patch from Jeremy Huddleston! llvm-svn: 149285
* Introduce TargetInfo::hasFeature() to query various feature names inDouglas Gregor2012-01-302-2/+78
| | | | | | | | | | | | | | each of the targets. Use this for module requirements, so that we can pin the availability of certain modules to certain target features, e.g., provide a module for xmmintrin.h only when SSE support is available. Use these feature names to provide a nearly-complete module map for Clang's built-in headers. Only mm_alloc.h and unwind.h are missing, and those two are fairly specialized at the moment. Finishes <rdar://problem/10710060>. llvm-svn: 149227
* Thread a TargetInfo through to the module map; we'll need it forDouglas Gregor2012-01-301-5/+8
| | | | | | target-specific module requirements. llvm-svn: 149224
* Complain about attempts to use 'protected' visibility on targetsJohn McCall2012-01-291-0/+6
| | | | | | | | like Darwin that don't support it. We should also complain about invalid -fvisibility=protected, but that information doesn't seem to exist at the most appropriate time, so I've left a FIXME behind. llvm-svn: 149186
* Use defined-at-zero behavior for CLZ/CTZ builtins on PowerPC.Bob Wilson2012-01-281-0/+2
| | | | llvm-svn: 149181
* DiagnosticsEngine::setMappingToAllDiagnostics() does not need to return bool,Argyrios Kyrtzidis2012-01-281-3/+1
| | | | | | caught by Chad. llvm-svn: 149173
* Introduce module attributes into the module map grammar, along with aDouglas Gregor2012-01-271-4/+11
| | | | | | | | | | | | | single attribute ("system") that allows us to mark a module as being a "system" module. Each of the headers that makes up a system module is considered to be a system header, so that we (for example) suppress warnings there. If a module is being inferred for a framework, and that framework directory is within a system frameworks directory, infer it as a system framework. llvm-svn: 149143
* Due to a bug, -Wno-everything works like -Weverything. Fix the bug by havingArgyrios Kyrtzidis2012-01-272-0/+20
| | | | | | | | | -Wno-everything remap all warnings to ignored. We can now use "-Wno-everything -W<warning>" to ignore all warnings except specific ones. llvm-svn: 149121
* Make clz/ctz builtins defined for zero on ARM targets. rdar://10732455Bob Wilson2012-01-261-0/+1
| | | | | | | | | | | | | | | | ARM supports clz and ctz directly and both operations have well-defined results for zero. There is no disadvantage in performance to using the defined-at-zero versions of llvm.ctlz/cttz intrinsics. We're running into ARM-specific code written with the assumption that __builtin_clz(0) == 32, even though that value is technically undefined. The code is failing now because of llvm optimizations that are taking advantage of the undef behavior (specifically svn r147255). There's nothing wrong with that optimization on x86 where any incorrect assumptions about __builtin_clz(0) will quickly be exposed. For ARM, though, optimizations based on that undef behavior are likely to cause subtle bugs. Other targets with defined-at-zero clz/ctz support may want to override the default behavior as well. llvm-svn: 149086
* rename -ccc-host-triple into -targetSebastian Pop2012-01-201-1/+1
| | | | llvm-svn: 148582
* fix for PR11655Anton Yartsev2012-01-171-0/+3
| | | | | | changes i64 alignment from 64 to 32 for powerpc-darwin llvm-svn: 148345
* Remove unreachable code in Clang. (replace with llvm_unreachable where ↵David Blaikie2012-01-173-4/+2
| | | | | | appropriate or when GCC requires it) llvm-svn: 148292
* Remove unnecessary default cases in switches over enums.David Blaikie2012-01-171-1/+0
| | | | | | This allows -Wswitch-enum to find switches that need updating when these enums are modified. llvm-svn: 148281
* Revert r148138; it's causing test failures.Eli Friedman2012-01-131-1/+1
| | | | llvm-svn: 148141
* remove assertions in the Hexagon backend specific clang driverSebastian Pop2012-01-131-0/+12
| | | | | | | | | | | | | | | | | | | Patch from Jyotsna Verma: I have made the changes to remove assertions in the Hexagon backend specific clang driver. Instead of asserting on invalid arch name, it has been modified to use the default value. I have changed the implementation of the CPU flag validation for the Hexagon backend. Earlier, the clang driver performed the check and asserted on invalid inputs. In the new implementation, the driver passes the last CPU flag (or sets to "v4" if not specified) to the compiler (and also to the assembler and linker which perform their own check) instead of asserting on incorrect values. This patch changes the setCPU function for the Hexagon backend in clang/lib/Basic/Targets.cpp which causes the compiler to error out on incorrect CPU flag values. llvm-svn: 148139
* rename -ccc-host-triple into -targetSebastian Pop2012-01-131-1/+1
| | | | llvm-svn: 148138
* Fix -mfpu parsing on ARM.Evgeniy Stepanov2012-01-111-1/+1
| | | | | | | | | - Support gcc-compatible vfpv3 name in addition to vfp3. - Support vfpv3-d16. - Disable neon feature for -mfpu=vfp* (yes, we were emitting Neon instructions for those!). llvm-svn: 147943
* Add definitions for AMD's bobcat (aka btver1)Benjamin Kramer2012-01-101-2/+18
| | | | llvm-svn: 147849
* Enable POPCNT and LZCNT with sse4a.Benjamin Kramer2012-01-101-1/+1
| | | | llvm-svn: 147848
* Factor the repetitive cpu macro definition into a helper function.Benjamin Kramer2012-01-101-45/+23
| | | | llvm-svn: 147847
* Merge AVX/AVX2 into the SSE level.Craig Topper2012-01-091-23/+12
| | | | llvm-svn: 147771
* __FLT_EVAL_METHOD__ should be 1 on NetBSD/i386, since it defaults toJoerg Sonnenberger2012-01-061-1/+15
| | | | | | "double" rounding. llvm-svn: 147669
* Store the submodules of a module in source order, as they are storedDouglas Gregor2012-01-041-10/+33
| | | | | | | | in the module map. This provides a bit more predictability for the user, as well as eliminating the need to sort the submodules when serializing them. llvm-svn: 147564
* Penryn doesn't support sse4.2, don't enable it in the first place.Benjamin Kramer2012-01-041-2/+1
| | | | | | | While the code took care of disabling the sse42 flag it didn't know about popcnt. This broke -march=native on penryn. llvm-svn: 147531
* Re-uglify #public and #private to #__public_macro and #__private_macro.Douglas Gregor2012-01-031-2/+4
| | | | llvm-svn: 147469
* Eliminate the uglified keyword __import_module__ for importingDouglas Gregor2012-01-031-0/+1
| | | | | | | | | | | | | modules. This leaves us without an explicit syntax for importing modules in C/C++, because such a syntax needs to be discussed first. In Objective-C/Objective-C++, the @import syntax is used to import modules. Note that, under -fmodules, C/C++ programs can import modules via the #include mechanism when a module map is in place for that header. This allows us to work with modules in C/C++ without committing to a syntax. llvm-svn: 147467
* Under -fmodules, accept #public <macroname> and #private <macroname>Douglas Gregor2012-01-031-4/+3
| | | | | | | to make a macro public (the default for headers) or private, respectively. llvm-svn: 147455
* Implement support for module requirements, which indicate the languageDouglas Gregor2011-12-311-0/+74
| | | | | | | | | features needed for a particular module to be available. This allows mixed-language modules, where certain headers only work under some language variants (e.g., in C++, std.tuple might only be available in C++11 mode). llvm-svn: 147387
* Add FMA4 feature flag. Intrinsics coming soon. Also make sse4a feature flag ↵Craig Topper2011-12-301-7/+25
| | | | | | imply sse3. Matches gcc behavior. llvm-svn: 147370
* Add popcnt feature flag to match gcc. This flag is implied when sse42 is ↵Craig Topper2011-12-291-4/+19
| | | | | | enabled, but can be disabled separately. Move popcnt intrinsics to popcntintrin.h to match gcc. llvm-svn: 147340
* Add a target hook for FLT_EVAL_METHOD and use it to set the value on x86 ↵Benjamin Kramer2011-12-281-0/+4
| | | | | | | | | with sse disabled. x87 math evaluates everything with 80 bits precision, so we have to set FLT_EVAL_METHOD to "2". llvm-svn: 147311
* Partially revert r147195; lib/Basic/Version.cpp conditionally depends on ↵Eli Friedman2011-12-261-0/+1
| | | | | | config.h. llvm-svn: 147282
OpenPOWER on IntegriCloud