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 | |
| parent | 3af97225291fe0c74ece7e15d6b45773a2a60007 (diff) | |
| download | bcm5719-llvm-e1d1294853f88f663639f0d5582eec5b0ad8f9ff.tar.gz bcm5719-llvm-e1d1294853f88f663639f0d5582eec5b0ad8f9ff.zip | |
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')
| -rw-r--r-- | llvm/tools/llvm-cov/CoverageSummary.cpp | 2 | ||||
| -rw-r--r-- | llvm/tools/llvm-readobj/StreamWriter.h | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/llvm/tools/llvm-cov/CoverageSummary.cpp b/llvm/tools/llvm-cov/CoverageSummary.cpp index e32f3412cad..62684547d40 100644 --- a/llvm/tools/llvm-cov/CoverageSummary.cpp +++ b/llvm/tools/llvm-cov/CoverageSummary.cpp @@ -88,5 +88,5 @@ FileCoverageSummary CoverageSummary::getCombinedFileSummaries() { "TOTAL", RegionCoverageInfo(CoveredRegions, NumRegions), LineCoverageInfo(CoveredLines, NonCodeLines, NumLines), FunctionCoverageInfo(NumFunctionsCovered, NumFunctions), - ArrayRef<FunctionCoverageSummary>()); + None); } diff --git a/llvm/tools/llvm-readobj/StreamWriter.h b/llvm/tools/llvm-readobj/StreamWriter.h index 64ff430d853..2fc53eeeec4 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); } |

