[llvm] r184431 - Rename fs::GetUniqueID to fs::getUniqueID to match the style guide.
Rafael Espindola
rafael.espindola at gmail.com
Thu Jun 20 08:06:35 PDT 2013
Author: rafael
Date: Thu Jun 20 10:06:35 2013
New Revision: 184431
URL: http://llvm.org/viewvc/llvm-project?rev=184431&view=rev
Log:
Rename fs::GetUniqueID to fs::getUniqueID to match the style guide.
Modified:
llvm/trunk/include/llvm/Support/FileSystem.h
llvm/trunk/lib/Support/Unix/PathV2.inc
llvm/trunk/lib/Support/Windows/PathV2.inc
llvm/trunk/unittests/Support/Path.cpp
Modified: llvm/trunk/include/llvm/Support/FileSystem.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/FileSystem.h?rev=184431&r1=184430&r2=184431&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/FileSystem.h (original)
+++ llvm/trunk/include/llvm/Support/FileSystem.h Thu Jun 20 10:06:35 2013
@@ -162,7 +162,7 @@ class file_status
#endif
friend bool equivalent(file_status A, file_status B);
friend error_code status(const Twine &path, file_status &result);
- friend error_code GetUniqueID(const Twine Path, uint64_t &Result);
+ friend error_code getUniqueID(const Twine Path, uint64_t &Result);
file_type Type;
perms Perms;
public:
@@ -563,7 +563,11 @@ file_magic identify_magic(StringRef magi
/// platform specific error_code.
error_code identify_magic(const Twine &path, file_magic &result);
-error_code GetUniqueID(const Twine Path, uint64_t &Result);
+error_code getUniqueID(const Twine Path, uint64_t &Result);
+
+inline error_code GetUniqueID(const Twine Path, uint64_t &Result) {
+ return getUniqueID(Path, Result);
+}
/// This class represents a memory mapped file. It is based on
/// boost::iostreams::mapped_file.
Modified: llvm/trunk/lib/Support/Unix/PathV2.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/PathV2.inc?rev=184431&r1=184430&r2=184431&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Unix/PathV2.inc (original)
+++ llvm/trunk/lib/Support/Unix/PathV2.inc Thu Jun 20 10:06:35 2013
@@ -356,7 +356,7 @@ error_code file_size(const Twine &path,
return error_code::success();
}
-error_code GetUniqueID(const Twine Path, uint64_t &Result) {
+error_code getUniqueID(const Twine Path, uint64_t &Result) {
SmallString<128> Storage;
StringRef P = Path.toNullTerminatedStringRef(Storage);
Modified: llvm/trunk/lib/Support/Windows/PathV2.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/PathV2.inc?rev=184431&r1=184430&r2=184431&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Windows/PathV2.inc (original)
+++ llvm/trunk/lib/Support/Windows/PathV2.inc Thu Jun 20 10:06:35 2013
@@ -425,7 +425,7 @@ error_code file_size(const Twine &path,
return error_code::success();
}
-error_code GetUniqueID(const Twine Path, uint64_t &Result) {
+error_code getUniqueID(const Twine Path, uint64_t &Result) {
file_status Status;
if (error_code E = status(Path, Status))
return E;
Modified: llvm/trunk/unittests/Support/Path.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/Path.cpp?rev=184431&r1=184430&r2=184431&view=diff
==============================================================================
--- llvm/trunk/unittests/Support/Path.cpp (original)
+++ llvm/trunk/unittests/Support/Path.cpp Thu Jun 20 10:06:35 2013
@@ -173,8 +173,8 @@ TEST_F(FileSystemTest, Unique) {
// The same file should return an identical unique id.
uint64_t F1, F2;
- ASSERT_NO_ERROR(fs::GetUniqueID(Twine(TempPath), F1));
- ASSERT_NO_ERROR(fs::GetUniqueID(Twine(TempPath), F2));
+ ASSERT_NO_ERROR(fs::getUniqueID(Twine(TempPath), F1));
+ ASSERT_NO_ERROR(fs::getUniqueID(Twine(TempPath), F2));
ASSERT_EQ(F1, F2);
// Different files should return different unique ids.
@@ -184,7 +184,7 @@ TEST_F(FileSystemTest, Unique) {
fs::unique_file("%%-%%-%%-%%.temp", FileDescriptor2, TempPath2));
uint64_t D;
- ASSERT_NO_ERROR(fs::GetUniqueID(Twine(TempPath2), D));
+ ASSERT_NO_ERROR(fs::getUniqueID(Twine(TempPath2), D));
ASSERT_NE(D, F1);
::close(FileDescriptor2);
@@ -194,7 +194,7 @@ TEST_F(FileSystemTest, Unique) {
// same unique id. We can test this by making a hard link.
ASSERT_NO_ERROR(fs::create_hard_link(Twine(TempPath), Twine(TempPath2)));
uint64_t D2;
- ASSERT_NO_ERROR(fs::GetUniqueID(Twine(TempPath2), D2));
+ ASSERT_NO_ERROR(fs::getUniqueID(Twine(TempPath2), D2));
ASSERT_EQ(D2, F1);
::close(FileDescriptor);
More information about the llvm-commits
mailing list