[Lldb-commits] [PATCH] D12971: Remove unused modules from module cache
Zachary Turner via lldb-commits
lldb-commits at lists.llvm.org
Fri Sep 18 10:18:01 PDT 2015
zturner added inline comments.
================
Comment at: source/Host/windows/FileSystem.cpp:130
@@ +129,3 @@
+ HANDLE file_handle = ::CreateFile(file_spec.GetCString(),
+ GENERIC_READ,
+ FILE_SHARE_READ,
----------------
`GENERIC_READ` is too strong if all you want to do is call `GetFileInformationByHandle`. I think all you need is `FILE_READ_ATTRIBUTES`. Can you try with `FILE_READ_ATTRIBUTES` and see if `GetFileInformationByHandle` succeeds? If so, just use that.
================
Comment at: source/Utility/ModuleCache.cpp:110
@@ +109,3 @@
+
+ if (link_count > 2) // module is referred by other hosts.
+ return;
----------------
Shouldn't this be >= 2?
http://reviews.llvm.org/D12971
More information about the lldb-commits
mailing list