[llvm-commits] [poolalloc] r114462 - /poolalloc/trunk/lib/DSA/DSTest.cpp
Will Dietz
wdietz2 at illinois.edu
Tue Sep 21 11:49:55 PDT 2010
Author: wdietz2
Date: Tue Sep 21 13:49:55 2010
New Revision: 114462
URL: http://llvm.org/viewvc/llvm-project?rev=114462&view=rev
Log:
DSTest: Add more verbose failure message when verify-flags check fails.
Modified:
poolalloc/trunk/lib/DSA/DSTest.cpp
Modified: poolalloc/trunk/lib/DSA/DSTest.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/DSTest.cpp?rev=114462&r1=114461&r2=114462&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/DSTest.cpp (original)
+++ poolalloc/trunk/lib/DSA/DSTest.cpp Tue Sep 21 13:49:55 2010
@@ -511,12 +511,14 @@
std::string ActualFlags = getFlags(NV.getNode());
for (std::string::iterator I = FlagsListed.begin(), E = FlagsListed.end();
I != E; ++I ) {
- if (shouldHaveFlag)
- assert((ActualFlags.find(*I) != std::string::npos)
- && "Node doesn't have flag it should!");
- else
- assert((ActualFlags.find(*I) == std::string::npos)
- && "Node has flag it shouldn't!");
+ if (shouldHaveFlag == (ActualFlags.find(*I) == std::string::npos))
+ {
+ errs() << "ERROR: Verify flags for: \t" <<
+ NodeFlagOption << "\n";
+ errs() << " But found these flags:\t" <<
+ ActualFlags << "\n";
+ assert(0 && "Flag verification failed!");
+ }
}
More information about the llvm-commits
mailing list