Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Unified Diff: syzygy/refinery/types/type_repository.cc

Issue 1475083002: [Refinery] Introduce TypePropagatorAnalyzer - pointer types. (Closed) Base URL: https://github.com/google/syzygy.git@master
Patch Set: Final nit Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « syzygy/refinery/types/type_repository.h ('k') | syzygy/refinery/types/type_repository_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: syzygy/refinery/types/type_repository.cc
diff --git a/syzygy/refinery/types/type_repository.cc b/syzygy/refinery/types/type_repository.cc
index ca89e5e2c2d013dbb2d75a5db9baecfc2f145e70..1a1adff03c0397b6772079d7bd5357c640224ba2 100644
--- a/syzygy/refinery/types/type_repository.cc
+++ b/syzygy/refinery/types/type_repository.cc
@@ -19,7 +19,11 @@
namespace refinery {
-TypeRepository::TypeRepository() {
+TypeRepository::TypeRepository() : is_signature_set_(false) {
+}
+
+TypeRepository::TypeRepository(const pe::PEFile::Signature& signature)
+ : is_signature_set_(true), signature_(signature) {
}
TypeRepository::~TypeRepository() {
@@ -57,6 +61,15 @@ bool TypeRepository::AddTypeWithId(TypePtr type, TypeId id) {
return true;
}
+bool TypeRepository::GetModuleSignature(pe::PEFile::Signature* signature) {
+ DCHECK(signature);
+
+ if (!is_signature_set_)
+ return false;
+ *signature = signature_;
+ return true;
+}
+
size_t TypeRepository::size() const {
return types_.size();
}
« no previous file with comments | « syzygy/refinery/types/type_repository.h ('k') | syzygy/refinery/types/type_repository_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698