summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic
Commit message (Collapse)AuthorAgeFilesLines
...
* Followup to 132737; make two-character string explicit, add someStuart Hastings2011-06-081-1/+1
| | | | | | comments. rdar://problem/9037836 llvm-svn: 132752
* Clang support for ARM Uv/Uy/Uq inline-asm constraints.Stuart Hastings2011-06-071-4/+26
| | | | | | rdar://problem/9037836 llvm-svn: 132737
* My testing shows that function stat has no problem with trailing separators. ↵Francois Pichet2011-06-031-4/+0
| | | | | | | | | | | (tested on Windows and Darwin). This fixes a bug on Windows: clang c:\test.cpp Here the call stat("c:") is not recognized as a directory (must be "c:\"). llvm-svn: 132539
* Add stuff for o32 ABI conformance.Akira Hatanaka2011-06-021-2/+4
| | | | llvm-svn: 132443
* Add a couple of helper methods in the SourceManager API, ↵Argyrios Kyrtzidis2011-05-281-0/+67
| | | | | | | | isAtStartOfMacroInstantiation/isAtEndOfMacroInstantiation useful only for source locations that point at a macro token. llvm-svn: 132247
* A StringRef-ication of the DiagnosticIDs API and internals.Argyrios Kyrtzidis2011-05-252-67/+124
| | | | | | | | | Patch by Matthieu Monrocq with tweaks by me to avoid StringRefs in the static diagnostic data structures, which resulted in a huge global-var-init function. Depends on llvm commit r132046. llvm-svn: 132047
* sandybridge is now called corei7-avxBenjamin Kramer2011-05-201-1/+1
| | | | llvm-svn: 131729
* Do some safety checks.Argyrios Kyrtzidis2011-05-171-0/+6
| | | | llvm-svn: 131491
* Define __ARM_NEON__ in both ARM and Thumb modes. Radar 9431992.Bob Wilson2011-05-131-3/+3
| | | | llvm-svn: 131301
* __builtin_va_list is void* on ARM, not char*.John McCall2011-05-091-1/+1
| | | | | | rdar://problem/9391966 llvm-svn: 131080
* Introduce a Diagnostic::Report function that accepts and emits a ↵Argyrios Kyrtzidis2011-05-051-0/+41
| | | | | | StoredDiagnostic. llvm-svn: 130919
* Revert r130750, "Make the mno flags match GCC. Patch by Alexander Best!", it ↵Daniel Dunbar2011-05-031-45/+29
| | | | | | breaks tests. llvm-svn: 130753
* Make the mno flags match GCC. Patch by Alexander Best!Michael J. Spencer2011-05-031-29/+45
| | | | llvm-svn: 130750
* Enhance clang_getCXTUResourceUsage() to report how much memory is used by ↵Ted Kremenek2011-04-281-0/+34
| | | | | | SourceManager's memory buffers. llvm-svn: 130433
* Remove this assert, I don't think it's being helpful and people haveEric Christopher2011-04-271-1/+0
| | | | | | been running into it. llvm-svn: 130296
* Like the coding standards say, do not use "using namespace std".Jay Foad2011-04-231-2/+0
| | | | llvm-svn: 130054
* Don't hide #warnings in a system header, same as gcc. Fixes rdar://8495837.Argyrios Kyrtzidis2011-04-211-0/+6
| | | | llvm-svn: 129951
* Move the check whether a diagnostic must be ignored because it is in a ↵Argyrios Kyrtzidis2011-04-211-26/+13
| | | | | | | | system header inside DiagnosticIDs::getDiagnosticLevel. llvm-svn: 129950
* Driver/Darwin: Allow OS X deployment targets like 10.4.11, even though theyDaniel Dunbar2011-04-211-4/+8
| | | | | | can't be represented in the environment define. llvm-svn: 129939
* PTX: Add PTX intrinsics as builtins and add ptx32 and ptx64 as valid ↵Justin Holewinski2011-04-201-0/+86
| | | | | | architectures for triples, e.g. ptx32-unknown-unknown llvm-svn: 129870
* Teach SourceManager::getSLocEntry() that it can fail due to problemsDouglas Gregor2011-04-201-22/+91
| | | | | | | | during deserialization from a precompiled header, and update all of its callers to note when this problem occurs and recover (more) gracefully. Fixes <rdar://problem/9119249>. llvm-svn: 129839
* TWEAKDaniel Dunbar2011-04-191-1/+1
| | | | llvm-svn: 129835
* Driver/Darwin: Switch to using -macosx for OS name in triples.Daniel Dunbar2011-04-191-5/+1
| | | | llvm-svn: 129834
* ADT/Triple: Switch to using .isOSDarwin() predicate.Daniel Dunbar2011-04-191-12/+12
| | | | llvm-svn: 129823
* Basic/Darwin: Add support for new -osx and -ios style triples (not yet used).Daniel Dunbar2011-04-191-17/+33
| | | | llvm-svn: 129820
* Add SelectorTable::getTotalMemory() to allow clients to query how much ↵Ted Kremenek2011-04-181-0/+4
| | | | | | memory is used by selectors. llvm-svn: 129728
* Make -mno-mmx imply -mno-3dnow. This is what gcc does, and it makes sense.Michael J. Spencer2011-04-171-4/+3
| | | | | | | | Also, fold the sse4 and sse4.1 cases together. Patch by Alexander Best! llvm-svn: 129665
* Initial work to improve documentation for Clang's diagnostics, from Matthieu ↵Douglas Gregor2011-04-152-13/+89
| | | | | | Monrocq llvm-svn: 129614
* fix a bunch of comment typos found by codespell. Patch byChris Lattner2011-04-153-4/+4
| | | | | | Luis Felipe Strano Moraes! llvm-svn: 129559
* C1X: add a language standardPeter Collingbourne2011-04-151-1/+3
| | | | llvm-svn: 129553
* Fix a bunch of major problems with __unknown_anytype and properly testJohn McCall2011-04-091-0/+5
| | | | | | for them. The only major missing feature is references. llvm-svn: 129234
* refactor flags for TokenKinds.defDylan Noblesmith2011-04-091-12/+12
| | | | | | | | Make KEYALL a combination of all other flags instead of its own separate flag. Also rewrite the enum definitions in hex instead of decimal. llvm-svn: 129213
* Eat the UTF-8 BOM at the beginning of a file since it's ignored anyhow.Eric Christopher2011-04-091-6/+5
| | | | | | | | Nom Nom Nom. Patch by Anton Korobeynikov! llvm-svn: 129174
* Enable sse4 and aes for SandyBridge. Leave avx support commented out for now.Roman Divacky2011-04-051-2/+5
| | | | llvm-svn: 128923
* Explain why layout prefers 32 for small types on Thumb.Sandeep Patel2011-04-041-0/+4
| | | | llvm-svn: 128850
* Change ARM data layout strings to match llvm-gcc.Bob Wilson2011-04-041-5/+5
| | | | | | | | | Sandeep Patel noticed that the alignment was wrong for Neon vector types, and this change is partly derived from his patch. For the APCS ABI, however, additional changes were required: the maximum ABI alignment is 32 bits and the preferred alignment for i64 and f64 types should be 64 bits. llvm-svn: 128825
* Change Clang's __VERSION__ to include the same basic info as in clang -v.Daniel Dunbar2011-03-311-0/+13
| | | | | | - Please never ever ever ever write a tool that sniffs this. llvm-svn: 128599
* Basic: Add support for a build variable to set the repository path that goesDaniel Dunbar2011-03-311-0/+4
| | | | | | into the Clang version. llvm-svn: 128595
* For Diagnostic::Reset() also reset the state related to #pragma diagnostic. ↵Argyrios Kyrtzidis2011-03-261-5/+10
| | | | | | Fixes rdar://9170766. llvm-svn: 128346
* Implement a new 'availability' attribute, that allows one to specifyDouglas Gregor2011-03-234-3/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | which versions of an OS provide a certain facility. For example, void foo() __attribute__((availability(macosx,introduced=10.2,deprecated=10.4,obsoleted=10.6))); says that the function "foo" was introduced in 10.2, deprecated in 10.4, and completely obsoleted in 10.6. This attribute ties in with the deployment targets (e.g., -mmacosx-version-min=10.1 specifies that we want to deploy back to Mac OS X 10.1). There are several concrete behaviors that this attribute enables, as illustrated with the function foo() above: - If we choose a deployment target >= Mac OS X 10.4, uses of "foo" will result in a deprecation warning, as if we had placed attribute((deprecated)) on it (but with a better diagnostic) - If we choose a deployment target >= Mac OS X 10.6, uses of "foo" will result in an "unavailable" warning (in C)/error (in C++), as if we had placed attribute((unavailable)) on it - If we choose a deployment target prior to 10.2, foo() is weak-imported (if it is a kind of entity that can be weak imported), as if we had placed the weak_import attribute on it. Naturally, there can be multiple availability attributes on a declaration, for different platforms; only the current platform matters when checking availability attributes. The only platforms this attribute currently works for are "ios" and "macosx", since we already have -mxxxx-version-min flags for them and we have experience there with macro tricks translating down to the deprecated/unavailable/weak_import attributes. The end goal is to open this up to other platforms, and even extension to other "platforms" that are really libraries (say, through a #pragma clang define_system), but that hasn't yet been designed and we may want to shake out more issues with this narrower problem first. Addresses <rdar://problem/6690412>. As a drive-by bug-fix, if an entity is both deprecated and unavailable, we only emit the "unavailable" diagnostic. llvm-svn: 128127
* Make the definition of "long double" consistent for llvm::Triple::Win32 forEli Friedman2011-03-221-1/+3
| | | | | | both 32-bit and 64-bit targets. llvm-svn: 128110
* Another cortex-m0 patch from James Orr.Bob Wilson2011-03-211-0/+1
| | | | llvm-svn: 128029
* Relax assertion to fail during crash recovery cleanup.Ted Kremenek2011-03-211-3/+1
| | | | llvm-svn: 128010
* Use CrashRecoveryContextCleanup objects to reclaim resources from ↵Ted Kremenek2011-03-211-1/+7
| | | | | | CompilerInstance objects. llvm-svn: 128009
* Unbreak build.Daniel Dunbar2011-03-191-1/+2
| | | | llvm-svn: 127942
* Add support for language-specific address spaces. On top of that,Peter Collingbourne2011-03-181-0/+6
| | | | | | | | | add support for the OpenCL __private, __local, __constant and __global address spaces, as well as the __read_only, _read_write and __write_only image access specifiers. Patch originally by ARM; language-specific address space support by myself. llvm-svn: 127915
* Add FileManager::getNoncachedStatValue, which will resolve relative paths ↵Anders Carlsson2011-03-181-0/+8
| | | | | | against the working directory specified in the file system options. llvm-svn: 127893
* Having FileManager::getFile always open the file, brought much consternation ↵Argyrios Kyrtzidis2011-03-161-1/+6
| | | | | | | | | | | and leaking of file descriptors. Add 'openFile' bool to FileManager::getFile to specify whether we want to have the file opened or not, have it false by default, and enable it only in HeaderSearch.cpp where the open+fstat optimization matters. Fixes rdar://9139899. llvm-svn: 127748
* lib/Basic/Targets.cpp: __declspec(attr) should be provided on mingw as ↵NAKAMURA Takumi2011-03-151-2/+18
| | | | | | | | macro, alias of __attribute__. On mingw without -fms-extensions, we can provide "as-is" __declspec. llvm-svn: 127655
* Stop leaking file descriptors.Argyrios Kyrtzidis2011-03-151-14/+16
| | | | | | | | After the open+fstat optimization, files were already opened for FileManager::getBufferForFile() and we closed them after reading them. The problem was that when -working-directory was passed, the code path that actually reuses & closes the already opened file descriptor was not followed. llvm-svn: 127639
OpenPOWER on IntegriCloud