summaryrefslogtreecommitdiffstats
path: root/llvm/tools
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2014-06-04 15:47:11 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2014-06-04 15:47:11 +0000
commit6ba36dc1323e88b05fea9eea42964e0d6650990c (patch)
tree1e76d27d3ff70573ccb3206d45b4d9e5e89129c0 /llvm/tools
parent3b293a1dd55aaa45280eb847909188ba57f0ea49 (diff)
downloadbcm5719-llvm-6ba36dc1323e88b05fea9eea42964e0d6650990c.tar.gz
bcm5719-llvm-6ba36dc1323e88b05fea9eea42964e0d6650990c.zip
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. llvm-svn: 210191
Diffstat (limited to 'llvm/tools')
-rw-r--r--llvm/tools/llvm-readobj/StreamWriter.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/tools/llvm-readobj/StreamWriter.h b/llvm/tools/llvm-readobj/StreamWriter.h
index 9282dcc91a8..04b38fbe25e 100644
--- a/llvm/tools/llvm-readobj/StreamWriter.h
+++ b/llvm/tools/llvm-readobj/StreamWriter.h
@@ -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 << ": [";
OpenPOWER on IntegriCloud