Commit Graph

46 Commits

Author SHA1 Message Date
Chris Lattner
8dcd5483bc 200.sixtrack prints FP numbers with a very strange notation that uses D
instead of E for exponentials (e.g. 1.234D-43).  Add support for this
notation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22574 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-02 00:11:53 +00:00
Misha Brukman
f976c856fc Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21422 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 22:55:34 +00:00
Chris Lattner
c0d0e77042 Fix a bug where we would consider " .99" and "1.0" different because of the
leading whitespace.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20647 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-17 04:49:04 +00:00
Chris Lattner
2ee51cbeb8 Instead of doing a manual comparison loop, just use memcmp, thanks to JohnC
for the suggestion! :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20203 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-15 22:12:10 +00:00
Chris Lattner
e4b6a86852 Make this more efficient now that we know both files are the same length.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20202 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-15 22:01:43 +00:00
Misha Brukman
1e1a99fffa Fix spelling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20201 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-15 21:59:53 +00:00
Reid Spencer
45d55641fa Adjust DiffFilesWithTolerance to help poor cygwin's mmap facility by
handling zero length files a little more intelligently. If both files are
zero length then we return 0 (true) indicating a match. If only one of the
files is zero length then we return 1 (false) indicating that the files
differ. If the files don't agree in length then they can't match so we
skip the first loop that looks for a quick match.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20200 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-15 21:47:02 +00:00
Chris Lattner
da7e70e058 Fix crash comparing empty file against nonempty file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19782 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-23 06:02:40 +00:00
Chris Lattner
cc1b90b0e7 Make DiffFilesWithTolerance take sys::Path's instead of std::strings
Delete dead functions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19771 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-23 03:31:02 +00:00
Chris Lattner
c95b5604e0 Fix a bug in previous checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19769 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-23 03:19:13 +00:00
Chris Lattner
4454253923 Add a new method, refactored out of fpcmp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19766 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-23 03:13:43 +00:00
Jeff Cohen
5fb6ed4ae6 Use binary mode for reading/writing bytecode files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19751 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-22 17:36:17 +00:00
Reid Spencer
772192cf36 For PR351:
Move non-portable FDHandle class to its only user: lib/Debugger


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19106 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-22 10:24:43 +00:00
Reid Spencer
a2f7ed7035 For PR351:
* Remove the "removeFile" function, now implemented by the
  sys::Path::destroyFile method.
* Make the FileRemove work with a sys::Path instead of a std::string


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18999 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-16 23:00:05 +00:00
Reid Spencer
67f6d3ad30 For PR351:
Remove getUniqueFilename and CopyFile. These are now implemented by
sys::Path::makeUnique and sys::CopyFile, respectively.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18946 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 01:46:54 +00:00
Reid Spencer
2356f8612e For PR351:
Remove the MakeFileReadable and MakeFileExecutable functions which are no
longer present in LLVM. They have been replaced with the sys::Path methods
makeReadable and makeExecutable, respectively.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18910 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 20:08:14 +00:00
Reid Spencer
2923f34533 For PR351:
The ReadFileIntoAddressSpace and UnmapFileFromAddressSpace functions are no
longer used by LLVM. Remove them. Replacement functionality for both
functions is now encapsulated in the sys::MappedFile class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18903 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 18:28:59 +00:00
Reid Spencer
9d88d1aaab For PR351: \
The getFileTimestamp and getFileSize functions have been removed from  \
FileUtilities.{h,cpp}. They are replaced by Path::getTimestamp and  \
Path::getSize,respectively.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18892 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 17:01:53 +00:00
Reid Spencer
d99eaa3c1f For PR351:Remove the file type checking methods (now in sys::Path)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18846 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 02:57:41 +00:00
Misha Brukman
336e56e67d Handle headers for compressed bytecode files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17634 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-08 22:03:32 +00:00
Reid Spencer
d232438f54 Put in a #error in the event that we don't have an mmap that can map a file
into memor. This is just a reminder that the ReadFileIntoAddressSpace
function needs to be properly converted to lib/System and implemented via
read/write if there's no mmap of file support.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16428 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-20 04:13:43 +00:00
Reid Spencer
551ccae044 Changes For Bug 352
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-01 22:55:40 +00:00
Chris Lattner
fa5fe7c8b8 Make all of this functionality work directly on win32. Properly conditionalize
system specific stuff on HAVE_MKSTEMP


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14051 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-07 19:37:24 +00:00
Alkis Evlogimenos
8868e84614 Include cerrno.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14041 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-05 08:59:43 +00:00
Chris Lattner
5bfac5d2ed Implement the new CopyFile function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13945 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-02 00:52:22 +00:00
Chris Lattner
e53477e56c Add support for zero length files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13866 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-28 00:34:42 +00:00
Chris Lattner
eb08299518 Add a pair of functions to hide system specific details of mapping a file in for reading.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13863 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-28 00:23:48 +00:00
Chris Lattner
81a085a259 Add new function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10664 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-31 06:15:37 +00:00
Chris Lattner
316cb083d6 Add new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10649 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-30 07:36:14 +00:00
Chris Lattner
9899ae3ae8 Further revisions of the FDHandle idea. In this version we use ownership
semantics that are the same as those used by std::auto_ptr.  This allows
copying of FDHandle's, but copying transfers ownership.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10646 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-30 02:45:16 +00:00
Chris Lattner
9b448b703f Add trivial exception specs to produce better code since the methods cannot
be inlined.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10643 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-29 21:43:58 +00:00
Chris Lattner
2d6481cc2a Factor FDHandle out of the bytecode reader into the FileUtilities.h support
routines.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10642 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-29 21:35:05 +00:00
Chris Lattner
2cdd21c2e4 Finegrainify namespacification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10464 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-14 21:35:53 +00:00
Misha Brukman
971a7b88b5 Fix copy-pasto.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10197 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-24 05:36:38 +00:00
Misha Brukman
17cca96735 Add ability to query if a file is a legitimate ELF shared object.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10193 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-24 05:28:12 +00:00
Brian Gaeke
d0fde30ce8 Put all LLVM code into the llvm namespace, as per bug 109.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 22:41:34 +00:00
Brian Gaeke
a2302ffe78 Move IsArchive and IsBytecode here from gccld. Refactor into CheckMagic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9901 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 21:53:50 +00:00
Brian Gaeke
56be7ffe58 Add implementation of FileOpenable().
Refactor MakeFileExecutable() & MakeFileExecutable() into AddPermissionsBits().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9892 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 18:27:21 +00:00
John Criswell
b576c94c15 Added LLVM project notice to the top of every C++ source file.
Header files will be on the way.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9298 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 19:43:21 +00:00
Misha Brukman
950971dfe6 Fixed spelling & grammar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8559 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-16 15:31:46 +00:00
John Criswell
66622be46a Added the MakeFileReadable() method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8327 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-02 21:09:30 +00:00
John Criswell
9adeccc552 Added a description of the algorithm.
Return failure if the chmod() fails.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8326 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-02 20:30:16 +00:00
John Criswell
6991a03753 Added the MakeFileExecutable() method. This method takes a filename and
gives it execute access while respecting the user's umask.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8324 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-02 20:14:57 +00:00
Misha Brukman
da81eca4bb close() requires "unistd.h" .
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7695 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-07 21:35:41 +00:00
Misha Brukman
3d1b0c7331 Moved removeFile() and getUniqueFilename() into FileUtilities.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7691 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-07 21:28:50 +00:00
Chris Lattner
7a6ff2b98e Check in the implementation of the FileUtilities!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7487 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-01 21:16:14 +00:00