diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2014-03-10 17:55:02 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2014-03-10 17:55:02 +0000 |
commit | 3f755aa7a8e74920c65e4805e35824b03ca2945d (patch) | |
tree | cb6ae73e131101a22b0a059fbc87800d4237e8d0 /clang/lib/Basic/VirtualFileSystem.cpp | |
parent | e655754d572f8c7ad995acd29075f5c10594476c (diff) | |
download | llvm-3f755aa7a8e74920c65e4805e35824b03ca2945d.zip llvm-3f755aa7a8e74920c65e4805e35824b03ca2945d.tar.gz llvm-3f755aa7a8e74920c65e4805e35824b03ca2945d.tar.bz2 |
[C++11] Avoid implicit conversion of ArrayRef to std::vector and use move semantics where appropriate.
llvm-svn: 203477
Diffstat (limited to 'clang/lib/Basic/VirtualFileSystem.cpp')
-rw-r--r-- | clang/lib/Basic/VirtualFileSystem.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/clang/lib/Basic/VirtualFileSystem.cpp b/clang/lib/Basic/VirtualFileSystem.cpp index bfc2db7..9a88cfd 100644 --- a/clang/lib/Basic/VirtualFileSystem.cpp +++ b/clang/lib/Basic/VirtualFileSystem.cpp @@ -253,13 +253,9 @@ class DirectoryEntry : public Entry { public: virtual ~DirectoryEntry(); -#if LLVM_HAS_RVALUE_REFERENCES DirectoryEntry(StringRef Name, std::vector<Entry *> Contents, Status S) : Entry(EK_Directory, Name), Contents(std::move(Contents)), S(std::move(S)) {} -#endif - DirectoryEntry(StringRef Name, ArrayRef<Entry *> Contents, const Status &S) - : Entry(EK_Directory, Name), Contents(Contents), S(S) {} Status getStatus() { return S; } typedef std::vector<Entry *>::iterator iterator; iterator contents_begin() { return Contents.begin(); } @@ -612,7 +608,7 @@ class VFSFromYAMLParser { for (sys::path::reverse_iterator I = sys::path::rbegin(Parent), E = sys::path::rend(Parent); I != E; ++I) { - Result = new DirectoryEntry(*I, Result, + Result = new DirectoryEntry(*I, llvm::makeArrayRef(Result), Status("", "", getNextVirtualUniqueID(), sys::TimeValue::now(), 0, 0, 0, file_type::directory_file, sys::fs::all_all)); } |