r308604 - [vfs] Assert that the status is known in equivalent().
Benjamin Kramer via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 20 04:57:02 PDT 2017
Author: d0k
Date: Thu Jul 20 04:57:02 2017
New Revision: 308604
URL: http://llvm.org/viewvc/llvm-project?rev=308604&view=rev
Log:
[vfs] Assert that the status is known in equivalent().
Otherwise we'd silently compare uninitialized data.
Modified:
cfe/trunk/lib/Basic/VirtualFileSystem.cpp
Modified: cfe/trunk/lib/Basic/VirtualFileSystem.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/VirtualFileSystem.cpp?rev=308604&r1=308603&r2=308604&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/VirtualFileSystem.cpp (original)
+++ cfe/trunk/lib/Basic/VirtualFileSystem.cpp Thu Jul 20 04:57:02 2017
@@ -59,6 +59,7 @@ Status Status::copyWithNewName(const fil
}
bool Status::equivalent(const Status &Other) const {
+ assert(isStatusKnown() && Other.isStatusKnown());
return getUniqueID() == Other.getUniqueID();
}
bool Status::isDirectory() const {
More information about the cfe-commits
mailing list