diff options
author | Craig Topper <craig.topper@gmail.com> | 2014-08-27 05:25:25 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2014-08-27 05:25:25 +0000 |
commit | e1d1294853f88f663639f0d5582eec5b0ad8f9ff (patch) | |
tree | 5bd7b736dc5a2637df5b1cf458986af8e40915ff /llvm/tools/llvm-readobj/StreamWriter.h | |
parent | 3af97225291fe0c74ece7e15d6b45773a2a60007 (diff) | |
download | llvm-e1d1294853f88f663639f0d5582eec5b0ad8f9ff.zip llvm-e1d1294853f88f663639f0d5582eec5b0ad8f9ff.tar.gz llvm-e1d1294853f88f663639f0d5582eec5b0ad8f9ff.tar.bz2 |
Simplify creation of a bunch of ArrayRefs by using None, makeArrayRef or just letting them be implicitly created.
llvm-svn: 216525
Diffstat (limited to 'llvm/tools/llvm-readobj/StreamWriter.h')
-rw-r--r-- | llvm/tools/llvm-readobj/StreamWriter.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/tools/llvm-readobj/StreamWriter.h b/llvm/tools/llvm-readobj/StreamWriter.h index 64ff430..2fc53ee 100644 --- a/llvm/tools/llvm-readobj/StreamWriter.h +++ b/llvm/tools/llvm-readobj/StreamWriter.h @@ -214,8 +214,8 @@ public: } void printBinary(StringRef Label, StringRef Str, ArrayRef<char> Value) { - ArrayRef<uint8_t> V(reinterpret_cast<const uint8_t*>(Value.data()), - Value.size()); + auto V = makeArrayRef(reinterpret_cast<const uint8_t*>(Value.data()), + Value.size()); printBinaryImpl(Label, Str, V, false); } @@ -224,20 +224,20 @@ public: } void printBinary(StringRef Label, ArrayRef<char> Value) { - ArrayRef<uint8_t> V(reinterpret_cast<const uint8_t*>(Value.data()), - Value.size()); + auto V = makeArrayRef(reinterpret_cast<const uint8_t*>(Value.data()), + Value.size()); printBinaryImpl(Label, StringRef(), V, false); } void printBinary(StringRef Label, StringRef Value) { - ArrayRef<uint8_t> V(reinterpret_cast<const uint8_t*>(Value.data()), - Value.size()); + auto V = makeArrayRef(reinterpret_cast<const uint8_t*>(Value.data()), + Value.size()); printBinaryImpl(Label, StringRef(), V, false); } void printBinaryBlock(StringRef Label, StringRef Value) { - ArrayRef<uint8_t> V(reinterpret_cast<const uint8_t*>(Value.data()), - Value.size()); + auto V = makeArrayRef(reinterpret_cast<const uint8_t*>(Value.data()), + Value.size()); printBinaryImpl(Label, StringRef(), V, true); } |