Project import generated by Copybara. (#13)
PiperOrigin-RevId: 160971937
diff --git a/builder.h b/builder.h
index 035d18b..30d3357 100644
--- a/builder.h
+++ b/builder.h
@@ -1,32 +1,12 @@
/*
* Copyright (c) 2016, Google Inc.
* All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Google Inc. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL Google Inc. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
*/
-#ifndef PERFTOOLS_PROFILES_BUILDER_H_
-#define PERFTOOLS_PROFILES_BUILDER_H_
+#ifndef PERFTOOLS_PROFILES_PROTO_BUILDER_H_
+#define PERFTOOLS_PROFILES_PROTO_BUILDER_H_
#include <stddef.h>
#include <algorithm>
@@ -34,13 +14,20 @@
#include <string>
#include <tuple>
#include <unordered_map>
+namespace perftools {
+namespace profiles {
-#include "int_compat.h"
+typedef int64_t int64;
+typedef uint64_t uint64;
+typedef std::string string;
+
+}
+}
#include "profile.pb.h"
-#include "string_compat.h"
namespace perftools {
namespace profiles {
+
// Provides mechanisms to facilitate the generation of profiles
// on a compressed protobuf:
// - Manages the creation of the string table.
@@ -59,8 +46,8 @@
// Adds a function with these attributes to the profile function
// table, if not already present. Returns a unique integer id for
// this function.
- uint64 FunctionId(const char *name, const char *system_name, const char *file,
- int64 start_line);
+ uint64 FunctionId(const char *name, const char *system_name,
+ const char *file, int64 start_line);
// Adds mappings for the currently running binary to the profile.
void AddCurrentMappings();
@@ -130,4 +117,4 @@
} // namespace profiles
} // namespace perftools
-#endif // PERFTOOLS_PROFILES_BUILDER_H_
+#endif // PERFTOOLS_PROFILES_PROTO_BUILDER_H_