summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Get rid of the static FileManager::FixupRelativePath.Anders Carlsson2011-03-141-8/+4
| | | | llvm-svn: 127573
* Add 'OverridenFilesKeepOriginalName' field in SourceManager which if true ↵Argyrios Kyrtzidis2011-03-081-2/+4
| | | | | | | | | | | the SourceManager should report the original file name for contents of files that were overriden by other files, otherwise it should report the name of the new file. Default is true. Also add similar field in PreprocessorOptions and pass similar parameter in ASTUnit::LoadFromCommandLine. llvm-svn: 127289
* lib/Basic/Targets.cpp: mingw-w64 should define __MINGW32__, too.NAKAMURA Takumi2011-03-081-0/+1
| | | | llvm-svn: 127238
* Check in the implementation as well...Anders Carlsson2011-03-071-3/+7
| | | | llvm-svn: 127144
* Convert FileManager::FixupRelativePath over to using PathV2.Anders Carlsson2011-03-061-8/+10
| | | | llvm-svn: 127133
* Currently we can only remap a file by creating a MemoryBuffer and replacing ↵Argyrios Kyrtzidis2011-03-051-18/+38
| | | | | | | | | the file contents with it. Allow remapping a file by specifying another filename whose contents should be loaded if the original file gets loaded. This allows to override files without having to create & load buffers in advance. llvm-svn: 127052
* Move some of the logic about classifying Objective-C methods intoJohn McCall2011-03-021-0/+50
| | | | | | | | conventional categories into Basic and AST. Update the self-init checker to use this logic; CFRefCountChecker is complicated enough that I didn't want to touch it. llvm-svn: 126817
* Teach TextDiagnosticPrinter to print out '-Werror' in addition to the ↵Ted Kremenek2011-02-251-3/+8
| | | | | | | | | | warning flag for a warning mapped to an error. For example: t.c:7:9: error: using the result of an assignment as a condition without parentheses [-Werror,-Wparentheses] llvm-svn: 126466
* Switch the VerifyDiagnosticsClient to use PresumedLocs now that theyChandler Carruth2011-02-231-3/+14
| | | | | | | exist. Cheat and do this by adding some wrappers around the PresumedLoc machinery that directly return the line and column number. llvm-svn: 126281
* Targets/Darwin: mcount name on Darwin needs to be unmangled.Daniel Dunbar2011-02-211-0/+1
| | | | llvm-svn: 126152
* Test commit.Richard Smith2011-02-201-1/+0
| | | | llvm-svn: 126063
* Re-instate r125819 and r125820 with no functionality changePeter Collingbourne2011-02-191-12/+0
| | | | llvm-svn: 126060
* Revert 125820 and 125819 to fix PR9266.Rafael Espindola2011-02-191-0/+12
| | | | llvm-svn: 126050
* Selector::getIdentifierInfoForSlot() can return NULL values, a factDouglas Gregor2011-02-181-0/+5
| | | | | | | | | | | | that was ignored in a few places (most notably, code completion). Introduce Selector::getNameForSlot() for the common case where we only care about the name. Audit all uses of getIdentifierInfoForSlot(), switching many over to getNameForSlot(), fixing a few crashers. Fixed <rdar://problem/8939352>, a code-completion crasher. llvm-svn: 125977
OpenPOWER on IntegriCloud