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

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

Issue 1475083002: [Refinery] Introduce TypePropagatorAnalyzer - pointer types. (Closed) Base URL: https://github.com/google/syzygy.git@master
Patch Set: Nits 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
Index: syzygy/refinery/types/type_repository.h
diff --git a/syzygy/refinery/types/type_repository.h b/syzygy/refinery/types/type_repository.h
index 1c49d294f5de963774f2ff2772a3d6faaad50f2e..858921c243d2e7279636d3a5f2dab09b803d4eb9 100644
--- a/syzygy/refinery/types/type_repository.h
+++ b/syzygy/refinery/types/type_repository.h
@@ -22,6 +22,7 @@
#include "base/macros.h"
#include "base/containers/hash_tables.h"
#include "base/memory/ref_counted.h"
+#include "syzygy/pe/pe_file.h"
namespace refinery {
@@ -36,6 +37,7 @@ class TypeRepository : public base::RefCounted<TypeRepository> {
class Iterator;
TypeRepository();
+ explicit TypeRepository(const pe::PEFile::Signature& signature);
Sigurður Ásgeirsson 2015/11/26 21:45:12 I think we want to abstract the module ID to somet
manzagop (departed) 2015/11/27 15:20:28 Yes, I was thinking we'd have a Signature interfac
// Retrieve a type by @p id.
TypePtr GetType(TypeId id) const;
@@ -49,6 +51,10 @@ class TypeRepository : public base::RefCounted<TypeRepository> {
// @returns true on success, failure typically means id is already taken.
bool AddTypeWithId(TypePtr type, TypeId id);
+
+ // Get the signature for the module this type represents.
+ bool GetModuleSignature(pe::PEFile::Signature* signature);
+
// @name Accessors.
// @{
size_t size() const;
@@ -60,6 +66,8 @@ class TypeRepository : public base::RefCounted<TypeRepository> {
friend class base::RefCounted<TypeRepository>;
~TypeRepository();
+ bool is_signature_set_;
+ pe::PEFile::Signature signature_;
base::hash_map<TypeId, TypePtr> types_;
DISALLOW_COPY_AND_ASSIGN(TypeRepository);

Powered by Google App Engine
This is Rietveld 408576698