summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert 124754 and 124760 as they made clang unusable in the presence of symbolicRafael Espindola2011-02-031-84/+0
| | | | | | links. llvm-svn: 124776
* Improve the performance of filename canonicalization by avoidingDouglas Gregor2011-02-031-1/+8
| | | | | | redundant searches in the string. No functionality change. llvm-svn: 124760
* Canonicalize path names in the file manager before performing a lookupDouglas Gregor2011-02-021-0/+77
| | | | | | | | | | | | | | | on that name. Canonicalization eliminates silliness such as "." and "foo/.." that breaks the uniquing of files in the presence of virtual files or files whose inode numbers have changed during parsing/re-parsing. c-index-test isn't able to create this crazy situation, so I've resorted to testing outside of the Clang tree. Fixes <rdar://problem/8928220>. Note that this hackery will go away once we have a real virtual file system on which we can layer FileManager; the virtual-files hack is showing cracks. llvm-svn: 124754
* Support EFI target triple, from Carl Norum!Douglas Gregor2011-02-011-1/+4
| | | | llvm-svn: 124660
* Harden Lexer::GetBeginningOfToken() against bogus source locations andDouglas Gregor2011-01-311-2/+11
| | | | | | the disappearance/alteration of files. llvm-svn: 124616
* Teach Diagnostic::setClient() to free the existing, ownedDouglas Gregor2011-01-311-0/+7
| | | | | | client. Fixes a libclang leak. llvm-svn: 124614
* Separate the access-control diagnostics from other diagnostics that do not ↵Douglas Gregor2011-01-271-5/+9
| | | | | | have SFINAE behavior. llvm-svn: 124441
* TextDiagnosticPrinter.cpp: Show diagnostics as far as possible even with ↵Axel Naumann2011-01-271-6/+10
| | | | | | | | | | | | | | invalid PresomedLoc, instead of just silencing it. FileManager.cpp: Allow virtual files in nonexistent directories. FileManager.cpp: Close FileDescriptor for virtual files that correspond to actual files. FileManager.cpp: Enable virtual files to be created even for files that were flagged as NON_EXISTENT_FILE, e.g. by a prior (unsuccessful) addFile(). ASTReader.cpp: Read a PCH even if the original source files cannot be found. Add a test for reading a PCH of a file that has been removed and diagnostics referencing that file. llvm-svn: 124374
* lib/Basic/Targets.cpp: __builtin_va_list is as same on win64 mingw64!NAKAMURA Takumi2011-01-171-3/+3
| | | | llvm-svn: 123691
* lib/Basic/Targets.cpp: Fix __declspec() on Mingw-w64.NAKAMURA Takumi2011-01-171-1/+1
| | | | | | It should be defined as-is. Some headers would detect existence of __declspec and use one. llvm-svn: 123690
* lib/Basic/Targets.cpp: Set user_label_prefix on Win64 both mingw and msvc.NAKAMURA Takumi2011-01-171-0/+1
| | | | llvm-svn: 123689
* Properly propagate #pragma diagnostic mappings from PCH but not command-line ↵Argyrios Kyrtzidis2011-01-142-6/+7
| | | | | | | | warning flags. Addresses rdar://8435969&8852495 llvm-svn: 123462
* wint_t is defined as 'unsigned int' on Linux. Fixes PR8938.Douglas Gregor2011-01-121-0/+1
| | | | llvm-svn: 123320
* Update AST reader/writer to handle new AppleKext.Fariborz Jahanian2011-01-071-1/+1
| | | | | | | | Fix an unexpected hickup caused by exceeding size of generated table (and a misleading comment). Improve on help message for -fapple-kext. llvm-svn: 123003
* Add cortex-m3 CPU to getCPUDefineSuffix mapping.Bob Wilson2011-01-061-0/+1
| | | | | | Patch by Sylvère Teissier. llvm-svn: 122965
* PowerPC fixes.Roman Divacky2011-01-062-17/+25
| | | | | | | | | | | | | Fix the width and align of bool type on Darwin to be 32bits while keeping it 8 everywhere else. Change the definition of va_list to default to SV4 ABI one and let darwin subtarget override this. Both changes submitted by Nathan Whitehorn and reviewed by Rafael Espindola. llvm-svn: 122956
* set features for k8-sse3Roman Divacky2010-12-291-0/+3
| | | | llvm-svn: 122629
* The -fshort-wchar option causes wchar_t to become unsigned, in addition to beingChris Lattner2010-12-251-1/+1
| | | | | | | 16-bits in size. Implement this by splitting WChar into two enums, like we have for char. This fixes a miscompmilation of XULRunner, PR8856. llvm-svn: 122558
* Handle locations coming from macro instantiations properly in ↵Argyrios Kyrtzidis2010-12-241-0/+7
| | | | | | | | SourceManager::isBeforeInTranslationUnit(). Fixes rdar://8790245 and http://llvm.org/PR8821. llvm-svn: 122536
* In C++, if the user redeclares a builtin function with a type that isDouglas Gregor2010-12-211-0/+4
| | | | | | | | | | | | | | | inconsistent with the type that the builtin *should* have, forget about the builtin altogether: we don't want subsequence analyses, CodeGen, etc., to think that we have a proper builtin function. C is protected from errors here because it allows one to use a library builtin without having a declaration, and detects inconsistent (re-)declarations of builtins during declaration merging. C++ was unprotected, and therefore would crash. Fixes PR8839. llvm-svn: 122351
* Replace all uses of PathV1::makeAbsolute with PathV2::fs::make_absolute.Michael J. Spencer2010-12-211-3/+4
| | | | llvm-svn: 122340
* Add missing standard includes. Patch by Joerg Sonnenberger!Nick Lewycky2010-12-191-0/+1
| | | | llvm-svn: 122194
* Replace all uses of PathV1::isAbsolute with PathV2::is_{absolute,relative}.Michael J. Spencer2010-12-172-5/+6
| | | | llvm-svn: 122087
* MemoryBuffer API update.Michael J. Spencer2010-12-161-19/+18
| | | | llvm-svn: 121956
* Fix diagnostic pragmas.Argyrios Kyrtzidis2010-12-153-22/+137
| | | | | | | | | | | | Diagnostic pragmas are broken because we don't keep track of the diagnostic state changes and we only check the current/latest state. Problems manifest if a diagnostic is emitted for a source line that has different diagnostic state than the current state; this can affect a lot of places, like C++ inline methods, template instantiations, the lexer, etc. Fix the issue by having the Diagnostic object keep track of the source location of the pragmas so that it is able to know what is the diagnostic state at any given source location. Fixes rdar://8365684. llvm-svn: 121873
* Change MBlaze target to have the same description string as its LLVM equivalent.Wesley Peck2010-12-121-2/+1
| | | | llvm-svn: 121640
* Use error_code instead of std::string* for MemoryBuffer.Michael J. Spencer2010-12-091-8/+27
| | | | llvm-svn: 121378
* attempt to fix a buildbot failure, apparently apache fails to build.Chris Lattner2010-12-022-2/+2
| | | | llvm-svn: 120688
* Such function decls,as objc's objc_msgSend, builtins in Fariborz Jahanian2010-11-302-13/+21
| | | | | | | | | a specific language. We are adding such language info. by extensing Builtins.def and via a language flag added to LIBBUILTIN/BUILTIN and check for that when deciding a name is builtin or not. Implements //rdar://8689273. llvm-svn: 120429
* Merge System into Support.Michael J. Spencer2010-11-293-3/+3
| | | | llvm-svn: 120297
* Fix 2 problems with Chris Lattner's FileManager redesign on Windows.Francois Pichet2010-11-241-1/+1
| | | | | | | - FileEntry::operator= is needed on Win32. - There was an error in the S_ISDIR() macro. llvm-svn: 120079
* The final result of all this refactoring: instead of doing stat immediatelyChris Lattner2010-11-232-6/+54
| | | | | | | | | | | | | followed by an open for every source file we open, probe the file system with 'open' and then do an fstat when it succeeds. open+fstat is faster than stat+open because the kernel only has to perform the string->inode mapping once. Presumably it gets faster the deeper in your filesystem a lookup happens. For -Eonly on cocoa.h, this reduces system time from 0.042s to 0.039s on my machine, a 7.7% speedup. llvm-svn: 120066
* if we succeed in opening a directory but expected a file, ensure we don'tChris Lattner2010-11-231-1/+22
| | | | | | leak a filedescriptor if a client ever starts returning one. llvm-svn: 120062
* hopefully resolve the windows buildbot issue (retch)Chris Lattner2010-11-231-0/+8
| | | | llvm-svn: 120061
* change the 'is directory' indicator to be a null-or-notChris Lattner2010-11-232-16/+47
| | | | | | | | | pointer that is passed down through the APIs, and make FileSystemStatCache::get be the one that filters out directory lookups that hit files. This also paves the way to have stat queries be able to return opened files. llvm-svn: 120060
* pull "is directory" handling into FileManager::getStatValueChris Lattner2010-11-231-29/+36
| | | | | | | which simplifies clients and is important for future directions. Add a FD member to FileEntry which isn't used but will be shortly. llvm-svn: 120056
* tidy up code, add a comment about dir caching.Chris Lattner2010-11-231-20/+16
| | | | llvm-svn: 120048
* replicate a terrible hack to fix a build error on VC++Chris Lattner2010-11-231-0/+4
| | | | llvm-svn: 120039
* simplify the cache miss handling code, eliminating CacheMissing.Chris Lattner2010-11-231-6/+1
| | | | llvm-svn: 120038
* factor the "cache miss" handling code out of FM into a static Chris Lattner2010-11-231-21/+6
| | | | | | method in FileSystemStatCache. llvm-svn: 120037
* r120013 dropped passing in the precomputed file size to Chris Lattner2010-11-232-3/+3
| | | | | | | MemoryBuffer::getFile, causing us to pick up a fstat for every file. Restore the optimization. llvm-svn: 120032
* PCH files only cache successful stats. Remove the code that reads/writes Chris Lattner2010-11-231-1/+1
| | | | | | the result code of the stat to/from the PCH file since it is always 0. llvm-svn: 120031
* rework the stat cache, pulling it out of FileManager.h intoChris Lattner2010-11-233-35/+80
| | | | | | | its own header and giving it some more structure. No functionality change. llvm-svn: 120030
* tidy up. Split FileManager::getBufferForFile intoChris Lattner2010-11-231-6/+14
| | | | | | | | | | two copies, since they are fundamentally different operations and the StringRef one should go away (it shouldn't be part of FileManager at least). Remove some dead arguments. llvm-svn: 120013
* reduce indentation and use early outs, to make it easier to readChris Lattner2010-11-231-72/+79
| | | | | | this code. no functionality change. llvm-svn: 120011
* now the FileManager has a FileSystemOpts ivar, stop threadingChris Lattner2010-11-232-21/+11
| | | | | | | | | FileSystemOpts through a ton of apis, simplifying a lot of code. This also fixes a latent bug in ASTUnit where it would invoke methods on FileManager without creating one in some code paths in cindextext. llvm-svn: 120010
* give FileManager a 'FileSystemOptions' ivar, which will be usedChris Lattner2010-11-231-7/+7
| | | | | | | to simplify a bunch of code in it. It should ultimately get inlined into FileManager. llvm-svn: 120007
* Partially revert Doug's PCH validation patch (r98585).Chris Lattner2010-11-232-19/+7
| | | | | | | | | | | | | | | | | | | | | | This patch completely defeated the "passing in a prestat'd size to MemoryBuffer" optimization, leading to an extra fstat call for every buffer opened, in order to find out if the datestamp and size of the file on disk matches what is in the stat cache. I fully admit that I don't completely understand what is going on here: why punish code when a stat cache isn't in use? what is the point of a stat cache if you have to turn around and stat stuff to validate it? To resolve both these issues, just drop the modtime check and check the file size, which is the important thing anyway. This should also resolve PR6812, because presumably windows is stable when it comes to file sizes. If the modtime is actually important, we should get it and keep it on the first stat. This eliminates 833 fstat syscalls when processing Cocoa.h, speeding up system time on -Eonly Cocoa.h from 0.041 to 0.038s. llvm-svn: 120001
* stringref'ize APIChris Lattner2010-11-231-18/+16
| | | | llvm-svn: 119997
* avoid creating sys::Path instances when -fworking-directory isn't being used.Chris Lattner2010-11-231-1/+8
| | | | llvm-svn: 119995
OpenPOWER on IntegriCloud