1 // Copyright 2020 the V8 project authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "include/cppgc/source-location.h" 6 7 namespace cppgc { 8 ToString() const9std::string SourceLocation::ToString() const { 10 if (!file_) { 11 return {}; 12 } 13 return std::string(function_) + "@" + file_ + ":" + std::to_string(line_); 14 } 15 16 } // namespace cppgc 17