summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-06-20 15:06:35 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-06-20 15:06:35 +0000
commit7cf7c51cc4b0f5b2cce74f6177e766d81ecdeb1d (patch)
tree84f07bb9346840673ff4b88cd00bb37c766be38c
parent03ec9545f5199aeb5931fc6e7d402664c1677fa3 (diff)
downloadbcm5719-llvm-7cf7c51cc4b0f5b2cce74f6177e766d81ecdeb1d.tar.gz
bcm5719-llvm-7cf7c51cc4b0f5b2cce74f6177e766d81ecdeb1d.zip
Rename fs::GetUniqueID to fs::getUniqueID to match the style guide.
llvm-svn: 184431
-rw-r--r--llvm/include/llvm/Support/FileSystem.h8
-rw-r--r--llvm/lib/Support/Unix/PathV2.inc2
-rw-r--r--llvm/lib/Support/Windows/PathV2.inc2
-rw-r--r--llvm/unittests/Support/Path.cpp8
4 files changed, 12 insertions, 8 deletions
diff --git a/llvm/include/llvm/Support/FileSystem.h b/llvm/include/llvm/Support/FileSystem.h
index 9497e4de1db..c1e11c0052b 100644
--- a/llvm/include/llvm/Support/FileSystem.h
+++ b/llvm/include/llvm/Support/FileSystem.h
@@ -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 magic);
/// 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.
diff --git a/llvm/lib/Support/Unix/PathV2.inc b/llvm/lib/Support/Unix/PathV2.inc
index a806083b193..9602daad08f 100644
--- a/llvm/lib/Support/Unix/PathV2.inc
+++ b/llvm/lib/Support/Unix/PathV2.inc
@@ -356,7 +356,7 @@ error_code file_size(const Twine &path, uint64_t &result) {
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);
diff --git a/llvm/lib/Support/Windows/PathV2.inc b/llvm/lib/Support/Windows/PathV2.inc
index e6888f93e68..8815b0ec2f7 100644
--- a/llvm/lib/Support/Windows/PathV2.inc
+++ b/llvm/lib/Support/Windows/PathV2.inc
@@ -425,7 +425,7 @@ error_code file_size(const Twine &path, uint64_t &result) {
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;
diff --git a/llvm/unittests/Support/Path.cpp b/llvm/unittests/Support/Path.cpp
index 4f9d146c460..d5591ea1bdc 100644
--- a/llvm/unittests/Support/Path.cpp
+++ b/llvm/unittests/Support/Path.cpp
@@ -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);
OpenPOWER on IntegriCloud