Skip to content

Commit fc8cb88

Browse files
cblichmanncopybara-github
authored andcommitted
Update metadata, clang-format
PiperOrigin-RevId: 499202863 Change-Id: I821b5409a6afa28f6fbf790bf4e6d4b665c9912e
1 parent cd591f1 commit fc8cb88

124 files changed

Lines changed: 169 additions & 200 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2011-2022 Google LLC
1+
# Copyright 2011-2023 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

README.md

Lines changed: 1 addition & 1 deletion

address_references.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2011-2022 Google LLC
1+
// Copyright 2011-2023 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

address_references.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2011-2022 Google LLC
1+
// Copyright 2011-2023 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

architectures.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2011-2022 Google LLC
1+
// Copyright 2011-2023 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

base_types.cc

Lines changed: 17 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2011-2022 Google LLC
1+
// Copyright 2011-2023 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -45,42 +45,27 @@ void BaseType::SetName(const std::string& name) { name_ = name; }
4545

4646
const std::string& BaseType::GetName() const { return name_; }
4747

48-
void BaseType::SetSize(size_t size) {
49-
size_ = size;
50-
}
48+
void BaseType::SetSize(size_t size) { size_ = size; }
5149

52-
size_t BaseType::GetSize() const {
53-
return size_;
54-
}
50+
size_t BaseType::GetSize() const { return size_; }
5551

56-
void BaseType::SetSigned(bool is_signed) {
57-
is_signed_ = is_signed;
58-
}
52+
void BaseType::SetSigned(bool is_signed) { is_signed_ = is_signed; }
5953

60-
bool BaseType::IsSigned() const {
61-
return is_signed_;
62-
}
54+
bool BaseType::IsSigned() const { return is_signed_; }
6355

64-
void BaseType::SetPointer(const BaseType* pointer) {
65-
pointer_ = pointer;
66-
}
56+
void BaseType::SetPointer(const BaseType* pointer) { pointer_ = pointer; }
6757

68-
const BaseType* BaseType::GetPointer() const {
69-
return pointer_;
70-
}
58+
const BaseType* BaseType::GetPointer() const { return pointer_; }
7159

7260
void BaseType::AddMember(MemberType* member) {
73-
members_.insert(std::lower_bound(members_.begin(),
74-
members_.end(), member, &SortMemberTypes), member);
61+
members_.insert(std::lower_bound(members_.begin(), members_.end(), member,
62+
&SortMemberTypes),
63+
member);
7564
}
7665

77-
const BaseType::MemberTypes& BaseType::GetMembers() const {
78-
return members_;
79-
}
66+
const BaseType::MemberTypes& BaseType::GetMembers() const { return members_; }
8067

81-
void BaseType::SetCategory(TypeCategory category) {
82-
category_ = category;
83-
}
68+
void BaseType::SetCategory(TypeCategory category) { category_ = category; }
8469

8570
std::string BaseType::GetCategoryString() const {
8671
switch (category_) {
@@ -103,8 +88,8 @@ std::string BaseType::GetCategoryString() const {
10388
}
10489

10590
bool IsWithinMember(const MemberType* member, int offset) {
106-
return offset >= member->offset
107-
&& offset < member->offset + member->type->GetSize();
91+
return offset >= member->offset &&
92+
offset < member->offset + member->type->GetSize();
10893
}
10994

11095
// Finds the member x in the struct that occupies space in the range
@@ -118,11 +103,9 @@ const MemberType* BaseType::ResolveMember(const BaseType* base_type,
118103

119104
MemberType search_member;
120105
search_member.offset = offset;
121-
MemberTypes::const_iterator cit =
122-
std::lower_bound(base_type->GetMembers().begin(),
123-
base_type->GetMembers().end(),
124-
&search_member,
125-
&SortMemberTypes);
106+
MemberTypes::const_iterator cit = std::lower_bound(
107+
base_type->GetMembers().begin(), base_type->GetMembers().end(),
108+
&search_member, &SortMemberTypes);
126109
// We might have found the subsequent member (since lower bound gives us the
127110
// first member that is greater or equal regarding our search offset).
128111
if (cit == base_type->GetMembers().end() || !IsWithinMember(*cit, offset)) {

base_types.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2011-2022 Google LLC
1+
// Copyright 2011-2023 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -42,10 +42,7 @@ class BaseType {
4242
kFunctionPrototype
4343
};
4444

45-
BaseType()
46-
: id_(NextTypeId()),
47-
pointer_(nullptr),
48-
category_(kAtomic) {}
45+
BaseType() : id_(NextTypeId()), pointer_(nullptr), category_(kAtomic) {}
4946

5047
using BaseTypes = std::vector<const BaseType*>;
5148
using MemberTypes = std::vector<MemberType*>;

basic_block.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2011-2022 Google LLC
1+
// Copyright 2011-2023 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

basic_block.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2011-2022 Google LLC
1+
// Copyright 2011-2023 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -17,8 +17,8 @@
1717

1818
#include <forward_list>
1919
#include <iosfwd>
20-
#include <memory>
2120
#include <map>
21+
#include <memory>
2222
#include <vector>
2323
#undef max
2424

binexport.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2011-2022 Google LLC
1+
// Copyright 2011-2023 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)