summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Update CMake dependencies.Ted Kremenek2011-12-171-0/+1
| | | | llvm-svn: 146836
* Add -mavx2 and -mno-avx2 command line support. Also add core-avx2 processor ↵Craig Topper2011-12-171-2/+27
| | | | | | type. llvm-svn: 146835
* Add the value of "suitably aligned" from the C++11 standard to Basic/TargetInfo.Nick Lewycky2011-12-162-1/+8
| | | | | | | | This is equal to alignof(std::max_align_t) on the platform and equal to the alignment provided by malloc. (Platform owners please double-check your platform's value.) llvm-svn: 146762
* Fix 80-column violation and whitespace. No functionality change.Nick Lewycky2011-12-161-2/+3
| | | | llvm-svn: 146761
* C++11 constexpr: Add note stacks containing backtraces if constant evaluationRichard Smith2011-12-161-0/+1
| | | | | | | | | | fails within a call to a constexpr function. Add -fconstexpr-backtrace-limit argument to driver and frontend, to control the maximum number of notes so produced (default 10). Fix APValue printing to be able to pretty-print all APValue types, and move the testing for this functionality from a unittest to a -verify test now that it's visible in clang's output. llvm-svn: 146749
* In SourceManager::~SourceManager do a sanity check to make sure weArgyrios Kyrtzidis2011-12-151-4/+8
| | | | | | | | don't try to destruct a null ContentCache. rdar://10567159 llvm-svn: 146707
* gcov-style profiling support for OpenBSD. Patch by Jonathan Gray.Eli Friedman2011-12-151-1/+20
| | | | llvm-svn: 146631
* Hexagon backend supportTony Linthicum2011-12-121-1/+134
| | | | llvm-svn: 146413
* In ContentCache::replaceBuffer, add sanity check to make sure that we do not ↵Argyrios Kyrtzidis2011-12-101-1/+5
| | | | | | | | free a buffer and then continue using it. rdar://10359140. llvm-svn: 146308
* Add a sanity check in SourceManager::getColumnNumber, make sureArgyrios Kyrtzidis2011-12-101-1/+8
| | | | | | we don't try to access beyond the buffer. llvm-svn: 146305
* Separate the serialization library's diagnostics from the frontend'sChandler Carruth2011-12-091-0/+2
| | | | | | | diagnostics. Conflating them was highly confusing and makes it harder to establish a firm layering separation between these two libraries. llvm-svn: 146207
* Misc Minix-specific changes to clang:Eli Friedman2011-12-081-0/+1
| | | | | | | | | | | . move compiler-rt to a separate directory so the -L argument only includes compiler-rt (thanks joerg) . build all clang subdirs . switches the Minix platform to ELF . normalizes toolchain invocation Patch by Ben Gras. llvm-svn: 146206
* Tweak the syntax of umbrella headers, so that "umbrella" is treated asDouglas Gregor2011-12-081-1/+6
| | | | | | | | | | | a modifier for a header declarartion, e.g., umbrella header "headername" Collapse the umbrella-handling code in the parser into the header-handling code, so we don't duplicate the header-search logic. llvm-svn: 146159
* Within the module representation, generalize the notion of an umbrellaDouglas Gregor2011-12-081-1/+8
| | | | | | | | | | header to also support umbrella directories. The umbrella directory for an umbrella header is the directory in which the umbrella header resides. No functionality change yet, but it's coming. llvm-svn: 146158
OpenPOWER on IntegriCloud