diff options
| author | 2016-01-07 11:45:11 +0000 | |
|---|---|---|
| committer | 2016-01-07 11:45:11 +0000 | |
| commit | 7ede3dd40e2f7da3e3073cc355312021c31820b3 (patch) | |
| tree | 8ecf4374076c710a128bd47d3fa48e60a1a253e8 /runtime/utils.cc | |
| parent | a90d8bc3a3772877f4490d0509d53053069e5b55 (diff) | |
| parent | 5e2b971e468ca73a8e10a120730b3b6f17fad408 (diff) | |
Merge "Assume the profile file was created before saving."
Diffstat (limited to 'runtime/utils.cc')
| -rw-r--r-- | runtime/utils.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/utils.cc b/runtime/utils.cc index ff6b4c0d20..1e1c7e7098 100644 --- a/runtime/utils.cc +++ b/runtime/utils.cc @@ -1446,6 +1446,11 @@ bool Exec(std::vector<std::string>& arg_vector, std::string* error_msg) { return true; } +bool FileExists(const std::string& filename) { + struct stat buffer; + return stat(filename.c_str(), &buffer) == 0; +} + std::string PrettyDescriptor(Primitive::Type type) { return PrettyDescriptor(Primitive::Descriptor(type)); } |