diff options
Diffstat (limited to 'deps/v8/src/heap/cppgc/source-location.cc')
-rw-r--r-- | deps/v8/src/heap/cppgc/source-location.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/deps/v8/src/heap/cppgc/source-location.cc b/deps/v8/src/heap/cppgc/source-location.cc new file mode 100644 index 00000000000..95154cf6d5d --- /dev/null +++ b/deps/v8/src/heap/cppgc/source-location.cc @@ -0,0 +1,16 @@ +// Copyright 2020 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "include/cppgc/source-location.h" + +namespace cppgc { + +std::string SourceLocation::ToString() const { + if (!file_) { + return {}; + } + return std::string(function_) + "@" + file_ + ":" + std::to_string(line_); +} + +} // namespace cppgc |