summaryrefslogtreecommitdiff
path: root/compiler/profile_assistant.cc
diff options
context:
space:
mode:
author Calin Juravle <calin@google.com> 2016-01-20 04:03:25 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2016-01-20 04:03:25 +0000
commit111035a0a625a786dec2af293b2aaf4a1f4f02a0 (patch)
treea7a5d0ff7d7f0e6e462240d24f209c045cdfcb76 /compiler/profile_assistant.cc
parent4ca3850acc5e7d24cc623b796fd5d83c7e9aea1a (diff)
parent47c83eac0644a4b6092d956dd3a6824bccb7263a (diff)
Merge "Make sure that OfflineCompilationInfo is set to nullptr when needed."
Diffstat (limited to 'compiler/profile_assistant.cc')
-rw-r--r--compiler/profile_assistant.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/profile_assistant.cc b/compiler/profile_assistant.cc
index 0871722440..85335efcc4 100644
--- a/compiler/profile_assistant.cc
+++ b/compiler/profile_assistant.cc
@@ -31,6 +31,7 @@ bool ProfileAssistant::ProcessProfilesInternal(
DCHECK(!profile_files.empty());
DCHECK(!reference_profile_files.empty() ||
(profile_files.size() == reference_profile_files.size()));
+
std::vector<ProfileCompilationInfo> new_info(profile_files.size());
bool should_compile = false;
// Read the main profile files.
@@ -44,7 +45,6 @@ bool ProfileAssistant::ProcessProfilesInternal(
}
if (!should_compile) {
- *profile_compilation_info = nullptr;
return true;
}
@@ -124,6 +124,8 @@ bool ProfileAssistant::ProcessProfiles(
const std::vector<uint32_t>& profile_files_fd,
const std::vector<uint32_t>& reference_profile_files_fd,
/*out*/ ProfileCompilationInfo** profile_compilation_info) {
+ *profile_compilation_info = nullptr;
+
std::string error;
ScopedCollectionFlock profile_files_flocks(profile_files_fd.size());
if (!profile_files_flocks.Init(profile_files_fd, &error)) {
@@ -145,6 +147,8 @@ bool ProfileAssistant::ProcessProfiles(
const std::vector<std::string>& profile_files,
const std::vector<std::string>& reference_profile_files,
/*out*/ ProfileCompilationInfo** profile_compilation_info) {
+ *profile_compilation_info = nullptr;
+
std::string error;
ScopedCollectionFlock profile_files_flocks(profile_files.size());
if (!profile_files_flocks.Init(profile_files, &error)) {