aboutsummaryrefslogtreecommitdiffstats
path: root/unittests/Support/Path.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update aosp/master LLVM for rebase to r235153Pirama Arumuga Nainar2015-05-181-4/+2
| | | | | Change-Id: I9bf53792f9fc30570e81a8d80d296c681d005ea7 (cherry picked from commit 0c7f116bb6950ef819323d855415b2f2b0aad987)
* Update aosp/master llvm for rebase to r233350Pirama Arumuga Nainar2015-04-091-0/+43
| | | | Change-Id: I07d935f8793ee8ec6b7da003f6483046594bca49
* Update aosp/master LLVM for rebase to r230699.Stephen Hines2015-03-231-19/+22
| | | | Change-Id: I2b5be30509658cb8266be782de0ab24f9099f9b9
* Update aosp/master LLVM for rebase to r222494.Stephen Hines2014-12-021-34/+95
| | | | Change-Id: Ic787f5e0124df789bd26f3f24680f45e678eef2d
* Update LLVM for rebase to r212749.Stephen Hines2014-07-211-22/+25
| | | | | | | Includes a cherry-pick of: r212948 - fixes a small issue with atomic calls Change-Id: Ib97bd980b59f18142a69506400911a6009d9df18
* Update to LLVM 3.5a.Stephen Hines2014-04-241-28/+125
| | | | Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
* Path: Recognize COFF import library file magic.Rui Ueyama2013-11-151-0/+2
| | | | | | | | | | | | Summary: Make identify_magic to recognize COFF import file. Reviewers: Bigcheese CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2165 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194852 91177308-0d34-0410-b5e6-96231b3b80d8
* Recognize 0x0000 as a COFF file magic.Rui Ueyama2013-11-141-0/+2
| | | | | | | | | | | | | | | Summary: Some machine-type-neutral object files containing only undefined symbols actually do exist in the Windows standard library. Need to recognize them as COFF files. Reviewers: Bigcheese CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2164 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194734 91177308-0d34-0410-b5e6-96231b3b80d8
* Path: Add tests for existing file magics.Rui Ueyama2013-11-131-6/+36
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194607 91177308-0d34-0410-b5e6-96231b3b80d8
* Whitespace.Rui Ueyama2013-11-131-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194605 91177308-0d34-0410-b5e6-96231b3b80d8
* Try to fix the build on windows.Rafael Espindola2013-10-251-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193431 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixes a bug when iterating on pathsTareq A. Siraj2013-08-121-0/+69
| | | | | | | | | | This fixes the incorrect implementation of iterating on file/directory paths. Differential Review: http://llvm-reviews.chandlerc.com/D1277 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188183 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix windows' implementation of status when a file doesn't exist.Rafael Espindola2013-07-311-0/+4
| | | | | | | | | The unix one was returning no_such_file_or_directory, but the windows one was return success. Update the one one caller that was depending on the old behavior. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187463 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement getUniqueID for directories on windows.Rafael Espindola2013-07-301-0/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187441 91177308-0d34-0410-b5e6-96231b3b80d8
* Include st_dev to make the result of getUniqueID actually unique.Rafael Espindola2013-07-291-3/+3
| | | | | | This will let us use getUniqueID instead of st_dev directly on clang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187378 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't end a file name with a dot. It looks odd.Rafael Espindola2013-07-251-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187124 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a unit test for checking that we respect the F_Binary flag.Rafael Espindola2013-07-191-0/+31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186676 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dead code.Rafael Espindola2013-07-181-7/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186561 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a wrapper for open.Rafael Espindola2013-07-161-2/+1
| | | | | | | This centralizes the handling of O_BINARY and opens the way for hiding more differences (like how open behaves with directories). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186447 91177308-0d34-0410-b5e6-96231b3b80d8
* We now always create files with the correct permissions. Simplify the interface.Rafael Espindola2013-07-081-28/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185834 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix windows build.Rafael Espindola2013-07-051-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185730 91177308-0d34-0410-b5e6-96231b3b80d8
* Use sys::fs::createTemporaryFile.Rafael Espindola2013-07-051-7/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185719 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a convenience createUniqueDirectory function.Rafael Espindola2013-06-271-5/+1
| | | | | | | | | | | There are a few valid situation where we care about the structure inside a directory, but not about the directory itself. A simple example is for unit testing directory traversal. PathV1 had a function like this, add one to V2 and port existing users of the created temp file and delete it hack to using it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185059 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename fs::GetUniqueID to fs::getUniqueID to match the style guide.Rafael Espindola2013-06-201-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184431 91177308-0d34-0410-b5e6-96231b3b80d8
* Modified the implementation of fs::GetUniqueID on Windows such that it ↵Aaron Ballman2013-06-191-0/+36
| | | | | | actually finds a unique identifier for a file. Also adds unit tests for GetUniqueID. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184351 91177308-0d34-0410-b5e6-96231b3b80d8
* Move PathV2.h to Path.hRafael Espindola2013-06-111-1/+1
| | | | | | | Most clients have already been moved from Path V1 to V2. The ones using V1 now include PathV1.h explicitly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183801 91177308-0d34-0410-b5e6-96231b3b80d8
* [Support][FileSystem] Fix identify_magic for big endian ELF.Michael J. Spencer2013-04-051-2/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178905 91177308-0d34-0410-b5e6-96231b3b80d8
* Test case for graceful handling of long file names on Windows. Patch thanks ↵Aaron Ballman2013-03-161-0/+12
| | | | | | to Paul Robinson! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177223 91177308-0d34-0410-b5e6-96231b3b80d8
* [Support][Test] Missed this in the API change.Michael J. Spencer2013-03-141-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176996 91177308-0d34-0410-b5e6-96231b3b80d8
* Sort the #include lines for unittest/...Chandler Carruth2012-12-041-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169250 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch LLVM_USE_RVALUE_REFERENCES to LLVM_HAS_RVALUE_REFERENCES.Chandler Carruth2012-11-301-1/+1
| | | | | | | | | | | | | | Rationale: 1) This was the name in the comment block. ;] 2) It matches Clang's __has_feature naming convention. 3) It matches other compiler-feature-test conventions. Sorry for the noise. =] I've also switch the comment block to use a \brief tag and not duplicate the name. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168996 91177308-0d34-0410-b5e6-96231b3b80d8
* Properly test the LLVM_USE_RVALUE_REFERENCES macro.Michael J. Spencer2012-08-151-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161979 91177308-0d34-0410-b5e6-96231b3b80d8
* [PathV2] Add mapped_file_region. Implementation for Windows and POSIX.Michael J. Spencer2012-08-151-26/+33
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161976 91177308-0d34-0410-b5e6-96231b3b80d8
* unittests/Support/Path.cpp: [Win32] Suppress FileSystemTest.FileMapping for now.NAKAMURA Takumi2012-06-241-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159099 91177308-0d34-0410-b5e6-96231b3b80d8
* unittests/Support/Path.cpp: [Win32] Suppress FileSystemTest.Permissions for now.NAKAMURA Takumi2012-06-241-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159098 91177308-0d34-0410-b5e6-96231b3b80d8
* Add permissions(), map_file_pages(), and unmap_file_pages() to llvm::sys::fs ↵Nick Kledzik2012-06-201-0/+65
| | | | | | and add unit test. Unix is implemented. Windows side needs to be implemented. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158770 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r146363 to allow buildbots to make forward progress.Chad Rosier2011-12-121-28/+0
| | | | | | | | Original commit message: Support/FileSystem: Implement canonicalize. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146378 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/FileSystem: Implement bool equivalent(file_status A, file_status B);Michael J. Spencer2011-12-121-0/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146364 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/FileSystem: Implement canonicalize.Michael J. Spencer2011-12-121-0/+28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146363 91177308-0d34-0410-b5e6-96231b3b80d8
* unittests/Support/Path.cpp: [recursive_directory_iterator] Work around for ↵NAKAMURA Takumi2011-12-091-1/+4
| | | | | | | | end iterator. FIXME: It should be more robust. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146294 91177308-0d34-0410-b5e6-96231b3b80d8
* unittests/SupportTests: Fix test. pop modifies the current entry, thus theMichael J. Spencer2011-12-091-5/+2
| | | | | | dontlookhere check must be after it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146217 91177308-0d34-0410-b5e6-96231b3b80d8
* unittests/SupportTests: Add some outs()'s to debug the issues on some bots.Michael J. Spencer2011-12-091-0/+3
| | | | | | | I have run these tests under many configurations on the exact same OS as the failures, and I can't reproduce them :(. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146214 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/FileSystem: Implement recursive_directory_iterator and makeMichael J. Spencer2011-12-081-0/+51
| | | | | | directory_iterator preserve InputIterator semantics on copy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146200 91177308-0d34-0410-b5e6-96231b3b80d8
* Adds llvm::sys::path::is_separator() to test whether a char is a path separatorZhanyong Wan2011-02-111-0/+13
| | | | | | | on the host OS. Reviewed by dgregor. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125406 91177308-0d34-0410-b5e6-96231b3b80d8
* Unittests/Support/Path: Tweak test.Michael J. Spencer2011-01-151-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123546 91177308-0d34-0410-b5e6-96231b3b80d8
* UnitTests/Path: Add magical tests. This will also test identify_magic.Michael J. Spencer2011-01-061-0/+23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122948 91177308-0d34-0410-b5e6-96231b3b80d8
* UnitTests/Path: More ASSERT_NO_ERROR cleanup.Michael J. Spencer2011-01-061-12/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122947 91177308-0d34-0410-b5e6-96231b3b80d8
* UnitTests/Path: Fix typo, add error number, and enable the directory cleanup ↵Michael J. Spencer2011-01-051-7/+12
| | | | | | code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122885 91177308-0d34-0410-b5e6-96231b3b80d8
* UnitTests/PathV2: Setup a test fixture to make tracking created file systemMichael J. Spencer2011-01-051-0/+24
| | | | | | entities easier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122880 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Implement directory iteration on POSIX.Michael J. Spencer2011-01-051-3/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122879 91177308-0d34-0410-b5e6-96231b3b80d8