diff options
author | Rong Xu <xur@google.com> | 2016-03-30 16:56:31 +0000 |
---|---|---|
committer | Rong Xu <xur@google.com> | 2016-03-30 16:56:31 +0000 |
commit | 311ada11f8c738dfcd27d219f7e4c2ff52ab6c08 (patch) | |
tree | 7c69f188e194831207186e7595e322da933fd896 /llvm/unittests/ProfileData/InstrProfTest.cpp | |
parent | 38dc83417b860e510bc376dbad4c4194df2e883c (diff) | |
download | llvm-311ada11f8c738dfcd27d219f7e4c2ff52ab6c08.zip llvm-311ada11f8c738dfcd27d219f7e4c2ff52ab6c08.tar.gz llvm-311ada11f8c738dfcd27d219f7e4c2ff52ab6c08.tar.bz2 |
[PGO] Use ArrayRef in annotateValueSite()
Using ArrayRef in annotateValueSite's parameter instead of using an array
and it's size.
Differential Revision: http://reviews.llvm.org/D18568
llvm-svn: 264879
Diffstat (limited to 'llvm/unittests/ProfileData/InstrProfTest.cpp')
-rw-r--r-- | llvm/unittests/ProfileData/InstrProfTest.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/unittests/ProfileData/InstrProfTest.cpp b/llvm/unittests/ProfileData/InstrProfTest.cpp index 7dd072c..3b51485 100644 --- a/llvm/unittests/ProfileData/InstrProfTest.cpp +++ b/llvm/unittests/ProfileData/InstrProfTest.cpp @@ -330,7 +330,8 @@ TEST_P(MaybeSparseInstrProfTest, annotate_vp_data) { // Annotate with 4 records. InstrProfValueData VD0Sorted[] = {{1000, 6}, {2000, 5}, {3000, 4}, {4000, 3}, {5000, 2}, {6000, 1}}; - annotateValueSite(*M, *Inst, &VD0Sorted[2], 4, 10, IPVK_IndirectCallTarget, 5); + annotateValueSite(*M, *Inst, makeArrayRef(VD0Sorted).slice(2), 10, + IPVK_IndirectCallTarget, 5); Res = getValueProfDataFromInst(*Inst, IPVK_IndirectCallTarget, 5, ValueData, N, T); ASSERT_TRUE(Res); |