summaryrefslogtreecommitdiff
path: root/lib/System/Path.cpp
Commit message (Collapse)AuthorAge
* Merge System into Support.Michael J. Spencer2010-11-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120298 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo: Exectuable -> ExecutablePeter Collingbourne2010-11-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119433 91177308-0d34-0410-b5e6-96231b3b80d8
* appendSuffix: don't append a dot when the suffix is empty.Mikhail Glushenkov2010-11-02
| | | | | | | Additionally, move the implementation of appendSuffix to Path.cpp: it is platform-independent. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118089 91177308-0d34-0410-b5e6-96231b3b80d8
* GetDLLSuffix: Remove the leading dot from LTDL_SHLIB_EXT.Mikhail Glushenkov2010-11-02
| | | | | | This allows using GetDLLSuffix() with appendSuffix(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118051 91177308-0d34-0410-b5e6-96231b3b80d8
* System/Path: Add x86-64 COFF to IdentifyFileType.Michael J. Spencer2010-09-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114037 91177308-0d34-0410-b5e6-96231b3b80d8
* System/Path: Add isObjectFile().Michael J. Spencer2010-09-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114032 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup Whitespace.Michael J. Spencer2010-08-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112587 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't bother checking canRead() before calling getMagicNumber();Dan Gohman2010-05-27
| | | | | | | getMagicNumber() does its own error checking. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104851 91177308-0d34-0410-b5e6-96231b3b80d8
* Make Path use StringRef instead of std::string where possible.Jeffrey Yasskin2009-12-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91620 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused includes.Chandler Carruth2009-10-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85074 91177308-0d34-0410-b5e6-96231b3b80d8
* Prune #includes from llvm/Linker.h and llvm/System/Path.h,Chris Lattner2009-08-23
| | | | | | | | | | | | | | | | | | | | forcing them down into various .cpp files. This change also: 1. Renames TimeValue::toString() and Path::toString() to ::str() for similarity with the STL. 2. Removes all stream insertion support for sys::Path, forcing clients to call .str(). 3. Removes a use of Config/alloca.h from bugpoint, using smallvector instead. 4. Weans llvm-db off <iostream> sys::Path really needs to be gutted, but I don't have the desire to do it at this point. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79869 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve sys::Path::makeAbsolute on Win32.Daniel Dunbar2009-07-12
| | | | | | | | | - Patch by Viktor Kutuzov! - Minor tweak by me to add llvm_unreachable calls on FIXMEd error paths. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75424 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix g++-4.4.0 warning, it was causing llvm-nm to fail on wrapped BC files:Torok Edwin2009-04-25
| | | | | | | | | | | | | | Path.cpp:59: warning: case label value exceeds maximum value for type magic[0] is a (signed) char, but some case values are unsigned (e.g. 0xde). When magic[0] was 0xde, the switch has taken the default branch instead of case 0xde branch. Apparently this was the behaviour with older versions of gcc too, but not with g++. Now g++-4.4 behaves as gcc, and ignores unsigned case values out of range signed range. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70038 91177308-0d34-0410-b5e6-96231b3b80d8
* Add sys::Path::makeAbsolute().Daniel Dunbar2009-04-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68663 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle bitcode wrappers.Devang Patel2008-07-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53924 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a little wrapper header that is put around bc files when emittingChris Lattner2008-07-09
| | | | | | | | | | | | | | | | | bc files for modules with a target triple that indicates they are for darwin. The reader unconditionally handles this, and the writer could turn this on for more targets if we care. This change has two benefits for darwin: 1) it allows us to encode the cpu type of the file in an easy to read place that doesn't require decoding the bc file. 2) it works around a bug (IMO) in darwin's AR where it is incapable of handling files that are not a multiple of 8 bytes long. BC files are only guaranteed to be multiples of 4 bytes long. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53275 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup for unitialized types. Patch by Jean-Daniel Dupas!Bill Wendling2008-06-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52775 91177308-0d34-0410-b5e6-96231b3b80d8
* "An improved Mach-O file type detection for sys::IdentifyFileType()Chris Lattner2008-06-26
| | | | | | | | | | | This patch add supports for single architecture mach-o files (the current implementation only support Universal Binary), and solve the signature conflict between java class and Universal Binary magics. Note that this function will always returned dynamic library for Universal Binaries (like the current implementation) because the binary type is not include in the file header." Patch by Jean-Daniel Dupas! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52766 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the sys::Path::getSuffix() implementation.Argyrios Kyrtzidis2008-06-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52288 91177308-0d34-0410-b5e6-96231b3b80d8
* Follow-up to the reverting of r51218. This puts the checks out-of-line. BecauseBill Wendling2008-05-21
| | | | | | | | | they aren't in the header file, systems with a <string> header file that isn't 64-bit clean shouldn't warn if #including Path.h and specifying -Wshorten-64-to-32. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51393 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix more -Wshorten-64-to-32 warnings.Evan Cheng2008-05-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50659 91177308-0d34-0410-b5e6-96231b3b80d8
* Make getDirnameSep a static method (not part of Path's interface).Ted Kremenek2008-04-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49354 91177308-0d34-0410-b5e6-96231b3b80d8
* Added method Path::getDirname().Ted Kremenek2008-04-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49352 91177308-0d34-0410-b5e6-96231b3b80d8
* Add path separator support, patch by Sam Bishop. Chris Lattner2008-02-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47662 91177308-0d34-0410-b5e6-96231b3b80d8
* Add convenient helper to get suffix of the fileAnton Korobeynikov2008-02-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47397 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix compile failures with g++-4.3.Duncan Sands2008-01-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45781 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45418 91177308-0d34-0410-b5e6-96231b3b80d8
* remove obviously dead uses of IncludeFile.Chris Lattner2007-12-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45165 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate residual cruft related to recognizing bytecodeGabor Greif2007-07-06
| | | | | | | | files. bitcode files are the only LLVM format left. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37945 91177308-0d34-0410-b5e6-96231b3b80d8
* pull some win32 code into common code, add bitcode identification support.Chris Lattner2007-05-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36846 91177308-0d34-0410-b5e6-96231b3b80d8
* silence annoying gcc 4.3 warningsChris Lattner2007-05-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36681 91177308-0d34-0410-b5e6-96231b3b80d8
* Hack to get sys::Path to recognize macho dylibs.Chris Lattner2007-04-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35878 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach sys::Path how to recognize different kinds of object files for ELFReid Spencer2007-04-11
| | | | | | | | and Mach-O systems. Additionally, correct the Mach-O logic code to look at byte 12 not byte 15. Hopefully this fixes the llvm-ld warning on Darwin. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35876 91177308-0d34-0410-b5e6-96231b3b80d8
* Make isDynamicLibrary detect more than just an ELF file.Reid Spencer2007-04-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35874 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1302:Reid Spencer2007-04-04
| | | | | | | Implement recognition of COFF, ELF and Mach-O object/shared lib files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35650 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR780:Reid Spencer2006-07-26
| | | | | | | | | | Put the rest of lib/System into LinkAllVMCore.h. This makes all of lib/System available to programs that #include LinkALlVMCore.h so that loadable modules linked into those programs can depend on all of lib/System being available. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29288 91177308-0d34-0410-b5e6-96231b3b80d8
* Move << method out of line.Chris Lattner2006-07-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29062 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR495:Reid Spencer2005-07-07
| | | | | | | | | | | | | | | | | | | | | | Get rid of the difference between file paths and directory paths. The Path class now simply stores a path that can refer to either a file or a directory. This required various changes in the implementation and interface of the class with the corresponding impact to its users. Doxygen comments were also updated to reflect these changes. Interface changes are: appendDirectory -> appendComponent appendFile -> appendComponent elideDirectory -> eraseComponent elideFile -> eraseComponent elideSuffix -> eraseSuffix renameFile -> rename setDirectory -> set setFile -> set Changes pass Dejagnu and llvm-test/SingleSource tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22349 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR495:Reid Spencer2005-07-07
| | | | | | | | | | | | Change interface to Path class: readable -> canRead writable -> canWrite executable -> canExecute More (incremental) changes coming to close 495. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22345 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove vim settings from source code; people should use llvm/utils/vim/vimrcMisha Brukman2005-05-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21704 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove trailing whitespaceMisha Brukman2005-04-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21422 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename Unix/*.cpp and Win32/*.cpp to have a *.inc suffix so that the sillyReid Spencer2005-01-09
| | | | | | | | gdb debugger doesn't get confused on which file it is reading (the one in lib/System or the one in lib/System/{Win32,Unix}) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19426 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR351:Reid Spencer2004-12-24
| | | | | | | | Use the LLVM_ON_UNIX and LLVM_ON_WIN32 #defines to include the implementation instead of relying upon the "platform" link git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19132 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix VC++ compilation errorsJeff Cohen2004-12-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18953 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR351:Reid Spencer2004-12-15
| | | | | | | | | | * Fix implementation and documentation about LLVMGCCDIR/bytecode-libs * Add the makeUnique method, replacement for getUniqueFilename in Support. * Add the sys::CopyFile function, replacement for CopyFile in Support. * Move GetLLVMConfigDir() into generic code area since its generic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18947 91177308-0d34-0410-b5e6-96231b3b80d8
* Genericize implementation of GetDLLSuffix now that we have LTDL_SHLIB_EXTReid Spencer2004-12-13
| | | | | | | available. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18904 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR351: \Reid Spencer2004-12-13
| | | | | | | | | * Move generic isArchive method here from Unix/Path.cpp \ * Implement isDynamicLibrary \ * Implement FindLibrary for Linker git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18861 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure IdentifyFileType is in the sys namespace.Reid Spencer2004-11-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17806 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing include.Alkis Evlogimenos2004-11-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17799 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement IdentifyFileType functionReid Spencer2004-11-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17776 91177308-0d34-0410-b5e6-96231b3b80d8