[PATCH] D24954: [ToolChains] Disable OpenSUSE rules for SLES10

Michał Górny via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 10 14:20:47 PDT 2016


mgorny added inline comments.


================
Comment at: lib/Driver/ToolChains.cpp:3915
 
-  if (D.getVFS().exists("/etc/SuSE-release"))
-    return OpenSUSE;
+  File = llvm::MemoryBuffer::getFile("/etc/SuSE-release");
+  if (File)
----------------
bruno wrote:
> You should keep using the VFS to obtain the file.  You probably also want to add a comment here to describe what you mentioned in the patch Summary.
Hmm, this method is consistent with all the other distributions in the method. It seems that `getVFS()` is only used for `exists()` checks there. Are you sure I should change this, without touching the other reads first?


https://reviews.llvm.org/D24954





More information about the cfe-commits mailing list