ilya-biryukov added a comment.
Submitted. Thanks for the change!
Repository:
rL LLVM
https://reviews.llvm.org/D51359
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL341366: Adding HardLink Support to VirtualFileSystem.
(authored by ibiryukov, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D51359?vs=163785&
ilya-biryukov added a comment.
In https://reviews.llvm.org/D51359#1222823, @usaxena95 wrote:
> I don't have commit access. Can you please submit this ?
Will do.
Repository:
rC Clang
https://reviews.llvm.org/D51359
___
cfe-commits mailing list
usaxena95 added a comment.
I don't have commit access. Can you please submit this ?
Repository:
rC Clang
https://reviews.llvm.org/D51359
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c
usaxena95 updated this revision to Diff 163785.
usaxena95 marked 9 inline comments as done.
usaxena95 added a comment.
- fixed the style issues
Repository:
rC Clang
https://reviews.llvm.org/D51359
Files:
include/clang/Basic/VirtualFileSystem.h
lib/Basic/VirtualFileSystem.cpp
unittests/
ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.
Thanks! LGTM with a last drop of NITs.
Do you already have commit access or do you want me to submit this change for
you?
Comment at: include/clang/Basic/Virtu
usaxena95 added a comment.
Applied the changes suggested.
Comment at: lib/Basic/VirtualFileSystem.cpp:677
+if (HardLinkTarget)
+ Child.reset(new detail::InMemoryHardLink(P.str(), *HardLinkTarget));
+else {
ilya-biryukov wrote:
> NIT: `.
usaxena95 updated this revision to Diff 163739.
usaxena95 marked 14 inline comments as done.
usaxena95 added a comment.
- applied changes
Repository:
rC Clang
https://reviews.llvm.org/D51359
Files:
include/clang/Basic/VirtualFileSystem.h
lib/Basic/VirtualFileSystem.cpp
unittests/Basic/
ilya-biryukov added inline comments.
Comment at: lib/Basic/VirtualFileSystem.cpp:478
+public:
+ InMemoryNode(const std::string& FileName, InMemoryNodeKind Kind)
+ : Kind(Kind), FileName(llvm::sys::path::filename(FileName.data())) {}
NIT: accept a parameter
usaxena95 updated this revision to Diff 163720.
usaxena95 added a comment.
- Moved helper function into anonymous namespace
Repository:
rC Clang
https://reviews.llvm.org/D51359
Files:
include/clang/Basic/VirtualFileSystem.h
lib/Basic/VirtualFileSystem.cpp
unittests/Basic/VirtualFileSys
usaxena95 updated this revision to Diff 163713.
usaxena95 marked 2 inline comments as done.
usaxena95 added a comment.
- applied suggested changes
Repository:
rC Clang
https://reviews.llvm.org/D51359
Files:
include/clang/Basic/VirtualFileSystem.h
lib/Basic/VirtualFileSystem.cpp
unittes
usaxena95 marked 16 inline comments as done.
usaxena95 added a comment.
Applied suggested changes.
Comment at: lib/Basic/VirtualFileSystem.cpp:653
+ // Cannot create HardLink from a directory.
+ if (HardLinkTarget && (!isa(HardLinkTarget) || Buffer))
+return false;
--
ilya-biryukov added a comment.
Thanks, the interface and implementation look good!
Last drop of nits and suggestions for code simplification.
Comment at: include/clang/Basic/VirtualFileSystem.h:359
+ public:
+ /// Add a HardLink to a File.
+ /// The To path must be an existi
usaxena95 added a comment.
Made the suggested changes.
Comment at: include/clang/Basic/VirtualFileSystem.h:359
+ public:
+ /// Add a HardLink to a File.
+ /// The To path must be an existing file or a hardlink. The From file must
not
ilya-biryukov wrote:
>
usaxena95 updated this revision to Diff 163549.
usaxena95 marked 15 inline comments as done.
usaxena95 added a comment.
- Made suggested changes.
Repository:
rC Clang
https://reviews.llvm.org/D51359
Files:
include/clang/Basic/VirtualFileSystem.h
lib/Basic/VirtualFileSystem.cpp
unittest
ilya-biryukov added inline comments.
Comment at: include/clang/Basic/VirtualFileSystem.h:359
+ /// Add a HardLink from one file to another.
+ /// Makes the UniqueID of To file same as that of From file. If CopyBuffer is
ilya-biryukov wrote:
> Maybe use the co
usaxena95 updated this revision to Diff 163330.
usaxena95 marked 3 inline comments as done.
usaxena95 added a comment.
- Moved Stat to the subclasses of InMemoryNode
Repository:
rC Clang
https://reviews.llvm.org/D51359
Files:
include/clang/Basic/VirtualFileSystem.h
lib/Basic/VirtualFileS
usaxena95 marked 7 inline comments as done.
usaxena95 added a comment.
> Could we try removing Status from the base class and move it into
> `InMemoryFile` and `InMemoryDir`?
Moved the Stat and **getStatus** into the subclasses. User of **getStatus** now
calls **getStatus** of individual subcla
ilya-biryukov added a comment.
Could we try removing `Status` from the base class and move it into
`InMemoryFile` and `InMemoryDir`?
It shouldn't be too much work and would give safer interfaces for our new
hierarchy.
Comment at: lib/Basic/VirtualFileSystem.cpp:470
-enum In
usaxena95 marked 8 inline comments as done.
usaxena95 added a comment.
Applied the suggested changes. Added InMemoryHardLink as a subclass of
InMemoryNode. Modified the tests accordingly.
Repository:
rC Clang
https://reviews.llvm.org/D51359
___
usaxena95 updated this revision to Diff 163128.
usaxena95 added a comment.
Created InMemoryHardLink Class which can handle the resolved InMemoryFile
Repository:
rC Clang
https://reviews.llvm.org/D51359
Files:
include/clang/Basic/VirtualFileSystem.h
lib/Basic/VirtualFileSystem.cpp
uni
ilya-biryukov added a comment.
Thanks for the change. Having something like this makes total sense.
Mutating existing in-memory nodes looks shaky and requires making `Status`
mutable, which also looks undesirable.
Maybe we could consider adding a new kind of `InMemoryNode` for hard links that
w
usaxena95 created this revision.
Herald added a subscriber: cfe-commits.
Added support of creating a hardlink from one file to another file.
After a hardlink is added between two files, both file will have the same:
1. UniqueID (inode)
2. Size
3. Buffer
This will bring replay of compilation clos
23 matches
Mail list logo