Add new -d option to tblgen. It writes a make(1)-style dependency file.
[oota-llvm.git] / include / llvm / Support / PathV1.h
index fdf9084b5b3059a97110aad4f315d88110a16c9d..024bb39cedc22a19ebbcbe4a1f698c51b9c691c0 100644 (file)
@@ -21,7 +21,7 @@
 #include <string>
 #include <vector>
 
-#define LLVMV_PATH_DEPRECATED_MSG(replacement) \
+#define LLVM_PATH_DEPRECATED_MSG(replacement) \
   "PathV1 has been deprecated and will be removed as soon as all LLVM and" \
   " Clang clients have been moved over to PathV2. Please use `" #replacement \
   "` from PathV2 instead."
@@ -99,7 +99,7 @@ namespace sys {
       /// what the root directory is or none at all. In that case, a consistent
       /// default root directory will be used.
       LLVM_ATTRIBUTE_DEPRECATED(static Path GetRootDirectory(),
-        LLVMV_PATH_DEPRECATED_MSG(NOTHING));
+        LLVM_PATH_DEPRECATED_MSG(NOTHING));
 
       /// Construct a path to a unique temporary directory that is created in
       /// a "standard" place for the operating system. The directory is
@@ -268,7 +268,7 @@ namespace sys {
       /// @brief Returns the last component of the path name.
       LLVM_ATTRIBUTE_DEPRECATED(
         StringRef getLast() const,
-        LLVMV_PATH_DEPRECATED_MSG(path::filename));
+        LLVM_PATH_DEPRECATED_MSG(path::filename));
 
       /// This function strips off the path and suffix of the file or directory
       /// name and returns just the basename. For example /a/foo.bar would cause
@@ -276,12 +276,12 @@ namespace sys {
       /// @returns StringRef containing the basename of the path
       /// @brief Get the base name of the path
       LLVM_ATTRIBUTE_DEPRECATED(StringRef getBasename() const,
-        LLVMV_PATH_DEPRECATED_MSG(path::stem));
+        LLVM_PATH_DEPRECATED_MSG(path::stem));
 
       /// This function strips off the suffix of the path beginning with the
       /// path separator ('/' on Unix, '\' on Windows) and returns the result.
       LLVM_ATTRIBUTE_DEPRECATED(StringRef getDirname() const,
-        LLVMV_PATH_DEPRECATED_MSG(path::parent_path));
+        LLVM_PATH_DEPRECATED_MSG(path::parent_path));
 
       /// This function strips off the path and basename(up to and
       /// including the last dot) of the file or directory name and
@@ -290,7 +290,7 @@ namespace sys {
       /// @returns StringRef containing the suffix of the path
       /// @brief Get the suffix of the path
       LLVM_ATTRIBUTE_DEPRECATED(StringRef getSuffix() const,
-        LLVMV_PATH_DEPRECATED_MSG(path::extension));
+        LLVM_PATH_DEPRECATED_MSG(path::extension));
 
       /// Obtain a 'C' string for the path name.
       /// @returns a 'C' string containing the path name.
@@ -312,16 +312,16 @@ namespace sys {
       /// This function determines if the path name is absolute, as opposed to
       /// relative.
       /// @brief Determine if the path is absolute.
-//FIXME:      LLVM_ATTRIBUTE_DEPRECATED(
-      bool isAbsolute() const;
-//FIXME:      LLVMV_PATH_DEPRECATED_MSG(path::is_absolute));
+      LLVM_ATTRIBUTE_DEPRECATED(
+        bool isAbsolute() const,
+        LLVM_PATH_DEPRECATED_MSG(path::is_absolute));
 
       /// This function determines if the path name is absolute, as opposed to
       /// relative.
       /// @brief Determine if the path is absolute.
       LLVM_ATTRIBUTE_DEPRECATED(
         static bool isAbsolute(const char *NameStart, unsigned NameLen),
-        LLVMV_PATH_DEPRECATED_MSG(path::is_absolute));
+        LLVM_PATH_DEPRECATED_MSG(path::is_absolute));
 
       /// This function opens the file associated with the path name provided by
       /// the Path object and reads its magic number. If the magic number at the
@@ -329,7 +329,8 @@ namespace sys {
       /// cases (file not found, file not accessible, etc.) it returns false.
       /// @returns true if the magic number of the file matches \p magic.
       /// @brief Determine if file has a specific magic number
-      bool hasMagicNumber(StringRef magic) const;
+      LLVM_ATTRIBUTE_DEPRECATED(bool hasMagicNumber(StringRef magic) const,
+        LLVM_PATH_DEPRECATED_MSG(fs::has_magic));
 
       /// This function retrieves the first \p len bytes of the file associated
       /// with \p this. These bytes are returned as the "magic number" in the
@@ -379,19 +380,22 @@ namespace sys {
       /// directory.
       /// @brief Determines if the path is a file or directory in
       /// the file system.
-      bool exists() const;
+      LLVM_ATTRIBUTE_DEPRECATED(bool exists() const,
+        LLVM_PATH_DEPRECATED_MSG(fs::exists));
 
       /// This function determines if the path name references an
       /// existing directory.
       /// @returns true if the pathname references an existing directory.
       /// @brief Determines if the path is a directory in the file system.
-      bool isDirectory() const;
+      LLVM_ATTRIBUTE_DEPRECATED(bool isDirectory() const,
+        LLVM_PATH_DEPRECATED_MSG(fs::is_directory));
 
       /// This function determines if the path name references an
       /// existing symbolic link.
       /// @returns true if the pathname references an existing symlink.
       /// @brief Determines if the path is a symlink in the file system.
-      bool isSymLink() const;
+      LLVM_ATTRIBUTE_DEPRECATED(bool isSymLink() const,
+        LLVM_PATH_DEPRECATED_MSG(fs::is_symlink));
 
       /// This function determines if the path name references a readable file
       /// or directory in the file system. This function checks for
@@ -497,7 +501,7 @@ namespace sys {
       /// current working directory if necessary.
       LLVM_ATTRIBUTE_DEPRECATED(
         void makeAbsolute(),
-        LLVMV_PATH_DEPRECATED_MSG(fs::make_absolute));
+        LLVM_PATH_DEPRECATED_MSG(fs::make_absolute));
 
     /// @}
     /// @name Disk Mutators
@@ -604,14 +608,15 @@ namespace sys {
       ///
       /// This API is not intended for general use, clients should use
       /// MemoryBuffer::getFile instead.
-      static const char *MapInFilePages(int FD, uint64_t FileSize);
+      static const char *MapInFilePages(int FD, size_t FileSize,
+                                        off_t Offset);
 
       /// UnMapFilePages - Free pages mapped into the current process by
       /// MapInFilePages.
       ///
       /// This API is not intended for general use, clients should use
       /// MemoryBuffer::getFile instead.
-      static void UnMapFilePages(const char *Base, uint64_t FileSize);
+      static void UnMapFilePages(const char *Base, size_t FileSize);
 
     /// @}
     /// @name Data
@@ -629,7 +634,7 @@ namespace sys {
   /// efficiency. First, the file status requires additional space and the space
   /// is incorporated directly into PathWithStatus without an additional malloc.
   /// Second, obtaining status information is an expensive operation on most
-  /// operating systems so we want to be careful and explicity about where we
+  /// operating systems so we want to be careful and explicit about where we
   /// allow this operation in LLVM.
   /// @brief Path with file status class.
   class PathWithStatus : public Path {