aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Support/FileSystem.h
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2011-01-15 18:52:33 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2011-01-15 18:52:33 +0000
commitd6cdf1d3cb0263c413684aa20cb8aa91f9e128de (patch)
tree4290d11cb57b0225d12eb808779d7ec766261c1d /include/llvm/Support/FileSystem.h
parentcd7f0a1a7f216418856812f6417faf4fe5e72046 (diff)
Support/PathV2: Implement get_magic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123544 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/FileSystem.h')
-rw-r--r--include/llvm/Support/FileSystem.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/llvm/Support/FileSystem.h b/include/llvm/Support/FileSystem.h
index 960875e989..12f6d9b1d7 100644
--- a/include/llvm/Support/FileSystem.h
+++ b/include/llvm/Support/FileSystem.h
@@ -455,9 +455,11 @@ error_code has_magic(const Twine &path, const Twine &magic, bool &result);
/// @param path Input path.
/// @param len Number of magic bytes to get.
/// @param result Set to the first \a len bytes in the file pointed to by
-/// \a path.
-/// @results errc::success if result has been successfully set, otherwise a
-/// platform specific error_code.
+/// \a path. Or the entire file if file_size(path) < len, in which
+/// case result.size() returns the size of the file.
+/// @results errc::success if result has been successfully set,
+/// errc::value_too_large if len is larger then the file pointed to by
+/// \a path, otherwise a platform specific error_code.
error_code get_magic(const Twine &path, uint32_t len,
SmallVectorImpl<char> &result);