summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Add BMI, BMI2, and LZCNT feature flags to enable adding intrinsics.Craig Topper2011-12-251-1/+47
| | | | llvm-svn: 147262
* Mass rename C1x references to C11. The name hasn't proliferated like "C++0x" ↵Benjamin Kramer2011-12-231-2/+2
| | | | | | | | so this patch is surprisingly small. Also drop -Wc1x-extensions in favor of -Wc11-extensions. I don't think we need to keep this around for compatibility. llvm-svn: 147221
* remove unneeded config.h includesDylan Noblesmith2011-12-222-2/+1
| | | | llvm-svn: 147195
* Add support for bitcasts to vector type in Evaluate.Eli Friedman2011-12-222-1/+11
| | | | llvm-svn: 147137
* Fix bugs in SourceManager::computeMacroArgsCache() and add a unit test for it.Argyrios Kyrtzidis2011-12-211-5/+22
| | | | llvm-svn: 147057
* For SourceManager::isBeforeInTranslationUnit(), have it consider macro arg ↵Argyrios Kyrtzidis2011-12-211-1/+1
| | | | | | | | | | expanded token locations as coming before the closing ')' of a function macro expansion. Include a unit test for SourceManager. llvm-svn: 147056
* Bump suitable alignment on darwin ppc 32/64 and x86-32 to 16 bytes. I don'tNick Lewycky2011-12-211-1/+3
| | | | | | actually know about the other OSes on X86-32 besides Linux... llvm-svn: 147034
* Unweaken vtables as per ↵David Blaikie2011-12-202-0/+4
| | | | | | http://llvm.org/docs/CodingStandards.html#ll_virtual_anch llvm-svn: 146959
* objc-arc: bridge casts in non-objc-arc mode are ignord.Fariborz Jahanian2011-12-192-8/+3
| | | | | | But, warn too. // rdar://10597832 llvm-svn: 146904
* SourceManager: use getBufferSize()Dylan Noblesmith2011-12-191-4/+5
| | | | | | | Forming an out of bounds pointer to check if it's out of bounds was undefined behavior. llvm-svn: 146861
OpenPOWER on IntegriCloud