[llvm] r210191 - tools: introduce StreamWriter::printBoolean
Saleem Abdulrasool
compnerd at compnerd.org
Wed Jun 4 08:47:11 PDT 2014
Author: compnerd
Date: Wed Jun 4 10:47:11 2014
New Revision: 210191
URL: http://llvm.org/viewvc/llvm-project?rev=210191&view=rev
Log:
tools: introduce StreamWriter::printBoolean
Add a helper print method to print a boolean value as "Yes" or "No". This is
intended to be used by the Windows ARM EH printer.
Modified:
llvm/trunk/tools/llvm-readobj/StreamWriter.h
Modified: llvm/trunk/tools/llvm-readobj/StreamWriter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/StreamWriter.h?rev=210191&r1=210190&r2=210191&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-readobj/StreamWriter.h (original)
+++ llvm/trunk/tools/llvm-readobj/StreamWriter.h Wed Jun 4 10:47:11 2014
@@ -169,6 +169,10 @@ public:
startLine() << Label << ": " << int(Value) << "\n";
}
+ void printBoolean(StringRef Label, bool Value) {
+ startLine() << Label << ": " << (Value ? "Yes" : "No") << '\n';
+ }
+
template <typename T_>
void printList(StringRef Label, const SmallVectorImpl<T_> &List) {
startLine() << Label << ": [";
More information about the llvm-commits
mailing list