JDevlieghere added inline comments.

================
Comment at: source/Host/common/FileSystem.cpp:253
+static int GetOpenFlags(uint32_t options) {
+  const bool read = options & File::OpenOptions::eOpenOptionRead;
+  const bool write = options & File::OpenOptions::eOpenOptionWrite;
----------------
labath wrote:
> `File::eOpenOptionRead` should be sufficient, no?
Sorry, I don't know what you mean?


================
Comment at: source/Host/posix/FileSystem.cpp:74-79
+FILE *FileSystem::Fopen(const char *path, const char *mode) const {
   return ::fopen(path, mode);
 }
 
-int FileSystem::Open(const char *path, int flags, int mode) {
+int FileSystem::Open(const char *path, int flags, int mode) const {
   return ::open(path, flags, mode);
----------------
labath wrote:
> Why are these two `const`? It seems that at least with 
> `eOpenOptionCanCreate`, one can create a new file, which is definitely not a 
> "const" operation.
Depends on what you consider const, the real filesystem or the class. But yeah, 
the `const` doesn't add much so I can un-const this. 


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D54020



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to