summaryrefslogtreecommitdiffstats
path: root/llvm/lib/System/Path.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge System into Support.Michael J. Spencer2010-11-291-297/+0
| | | | llvm-svn: 120298
* Fix typo: Exectuable -> ExecutablePeter Collingbourne2010-11-171-1/+1
| | | | llvm-svn: 119433
* appendSuffix: don't append a dot when the suffix is empty.Mikhail Glushenkov2010-11-021-0/+15
| | | | | | | Additionally, move the implementation of appendSuffix to Path.cpp: it is platform-independent. llvm-svn: 118089
* GetDLLSuffix: Remove the leading dot from LTDL_SHLIB_EXT.Mikhail Glushenkov2010-11-021-1/+1
| | | | | | This allows using GetDLLSuffix() with appendSuffix(). llvm-svn: 118051
* System/Path: Add x86-64 COFF to IdentifyFileType.Michael J. Spencer2010-09-151-0/+4
| | | | llvm-svn: 114037
* System/Path: Add isObjectFile().Michael J. Spencer2010-09-151-0/+14
| | | | llvm-svn: 114032
* Cleanup Whitespace.Michael J. Spencer2010-08-311-20/+20
| | | | llvm-svn: 112587
* Don't bother checking canRead() before calling getMagicNumber();Dan Gohman2010-05-271-16/+13
| | | | | | getMagicNumber() does its own error checking. llvm-svn: 104851
* Make Path use StringRef instead of std::string where possible.Jeffrey Yasskin2009-12-171-10/+11
| | | | llvm-svn: 91620
* Remove unused includes.Chandler Carruth2009-10-251-1/+0
| | | | llvm-svn: 85074
* Prune #includes from llvm/Linker.h and llvm/System/Path.h,Chris Lattner2009-08-231-9/+0
| | | | | | | | | | | | | | | | | | 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. llvm-svn: 79869
* Improve sys::Path::makeAbsolute on Win32.Daniel Dunbar2009-07-121-12/+1
| | | | | | | | - Patch by Viktor Kutuzov! - Minor tweak by me to add llvm_unreachable calls on FIXMEd error paths. llvm-svn: 75424
* Fix g++-4.4.0 warning, it was causing llvm-nm to fail on wrapped BC files:Torok Edwin2009-04-251-1/+1
| | | | | | | | | | | | 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. llvm-svn: 70038
* Add sys::Path::makeAbsolute().Daniel Dunbar2009-04-091-0/+12
| | | | llvm-svn: 68663
* Handle bitcode wrappers.Devang Patel2008-07-221-1/+4
| | | | llvm-svn: 53924
* Add a little wrapper header that is put around bc files when emittingChris Lattner2008-07-091-1/+6
| | | | | | | | | | | | | | | | 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. llvm-svn: 53275
* Cleanup for unitialized types. Patch by Jean-Daniel Dupas!Bill Wendling2008-06-261-4/+4
| | | | llvm-svn: 52775
* "An improved Mach-O file type detection for sys::IdentifyFileType()Chris Lattner2008-06-261-18/+32
| | | | | | | | | | 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! llvm-svn: 52766
* Fix the sys::Path::getSuffix() implementation.Argyrios Kyrtzidis2008-06-151-5/+0
| | | | llvm-svn: 52288
* Follow-up to the reverting of r51218. This puts the checks out-of-line. BecauseBill Wendling2008-05-211-0/+12
| | | | | | | | 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. llvm-svn: 51393
* Fix more -Wshorten-64-to-32 warnings.Evan Cheng2008-05-051-3/+4
| | | | llvm-svn: 50659
* Make getDirnameSep a static method (not part of Path's interface).Ted Kremenek2008-04-071-1/+1
| | | | llvm-svn: 49354
* Added method Path::getDirname().Ted Kremenek2008-04-071-0/+39
| | | | llvm-svn: 49352
* Add path separator support, patch by Sam Bishop. Chris Lattner2008-02-271-0/+19
| | | | llvm-svn: 47662
* Add convenient helper to get suffix of the fileAnton Korobeynikov2008-02-201-1/+4
| | | | llvm-svn: 47397
* Fix compile failures with g++-4.3.Duncan Sands2008-01-091-0/+1
| | | | llvm-svn: 45781
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* remove obviously dead uses of IncludeFile.Chris Lattner2007-12-181-1/+0
| | | | llvm-svn: 45165
* eliminate residual cruft related to recognizing bytecodeGabor Greif2007-07-061-16/+0
| | | | | | | files. bitcode files are the only LLVM format left. llvm-svn: 37945
* pull some win32 code into common code, add bitcode identification support.Chris Lattner2007-05-061-0/+29
| | | | llvm-svn: 36846
* silence annoying gcc 4.3 warningsChris Lattner2007-05-031-2/+4
| | | | llvm-svn: 36681
* Hack to get sys::Path to recognize macho dylibs.Chris Lattner2007-04-111-4/+7
| | | | llvm-svn: 35878
* Teach sys::Path how to recognize different kinds of object files for ELFReid Spencer2007-04-111-7/+25
| | | | | | | 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. llvm-svn: 35876
* Make isDynamicLibrary detect more than just an ELF file.Reid Spencer2007-04-111-2/+10
| | | | llvm-svn: 35874
* For PR1302:Reid Spencer2007-04-041-9/+38
| | | | | | Implement recognition of COFF, ELF and Mach-O object/shared lib files. llvm-svn: 35650
* For PR780:Reid Spencer2006-07-261-0/+2
| | | | | | | | | 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. llvm-svn: 29288
* Move << method out of line.Chris Lattner2006-07-071-8/+8
| | | | llvm-svn: 29062
* For PR495:Reid Spencer2005-07-071-3/+3
| | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 22349
* For PR495:Reid Spencer2005-07-071-2/+2
| | | | | | | | | | | Change interface to Path class: readable -> canRead writable -> canWrite executable -> canExecute More (incremental) changes coming to close 495. llvm-svn: 22345
* Remove vim settings from source code; people should use llvm/utils/vim/vimrcMisha Brukman2005-05-051-1/+0
| | | | llvm-svn: 21704
* Remove trailing whitespaceMisha Brukman2005-04-211-6/+6
| | | | llvm-svn: 21422
* Rename Unix/*.cpp and Win32/*.cpp to have a *.inc suffix so that the sillyReid Spencer2005-01-091-2/+2
| | | | | | | 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}) llvm-svn: 19426
* For PR351:Reid Spencer2004-12-241-1/+7
| | | | | | | Use the LLVM_ON_UNIX and LLVM_ON_WIN32 #defines to include the implementation instead of relying upon the "platform" link llvm-svn: 19132
* Fix VC++ compilation errorsJeff Cohen2004-12-151-0/+2
| | | | llvm-svn: 18953
* For PR351:Reid Spencer2004-12-151-0/+8
| | | | | | | | | * 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. llvm-svn: 18947
* Genericize implementation of GetDLLSuffix now that we have LTDL_SHLIB_EXTReid Spencer2004-12-131-0/+6
| | | | | | available. llvm-svn: 18904
* For PR351: \Reid Spencer2004-12-131-0/+31
| | | | | | | | * Move generic isArchive method here from Unix/Path.cpp \ * Implement isDynamicLibrary \ * Implement FindLibrary for Linker llvm-svn: 18861
* Make sure IdentifyFileType is in the sys namespace.Reid Spencer2004-11-141-1/+1
| | | | llvm-svn: 17806
* Add missing include.Alkis Evlogimenos2004-11-141-0/+1
| | | | llvm-svn: 17799
* Implement IdentifyFileType functionReid Spencer2004-11-141-0/+27
| | | | llvm-svn: 17776
OpenPOWER on IntegriCloud