From e4259da0ff2e12d416abb2f3e227ff16488e1f01 Mon Sep 17 00:00:00 2001 From: Jason Hiser <jdhiser@gmail.com> Date: Wed, 13 Feb 2019 12:41:23 -0500 Subject: [PATCH] minor formatting tweaks --- .gitignore | 1 + include/private-include/zipr.h | 25 ++++++++++++++----------- include/private-include/zipr_plugin.h | 16 ++++++++-------- 3 files changed, 23 insertions(+), 19 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1377554 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.swp diff --git a/include/private-include/zipr.h b/include/private-include/zipr.h index fe4aa63..95fc13c 100644 --- a/include/private-include/zipr.h +++ b/include/private-include/zipr.h @@ -11,36 +11,39 @@ namespace Zipr_SDK class Zipr_t { + protected: + Zipr_t() { } + Zipr_t(const Zipr_t& copy) = delete; public: /* * These are public functions that the SDK user way want to use. */ virtual size_t determineDollopEntrySize( DollopEntry_t*, - bool account_for_fallthrough) = 0; + bool account_for_fallthrough) = 0; virtual RangeAddress_t plopDollopEntry( DollopEntry_t *, RangeAddress_t = 0, - RangeAddress_t = 0) = 0; + RangeAddress_t = 0) = 0; virtual RangeAddress_t plopDollopEntryWithTarget( DollopEntry_t *, RangeAddress_t = 0, - RangeAddress_t = 0) = 0; + RangeAddress_t = 0) = 0; virtual RangeAddress_t plopDollopEntryWithCallback( DollopEntry_t *, - RangeAddress_t = 0) = 0; - - virtual MemorySpace_t *getMemorySpace()=0; - virtual IRDB_SDK::FileIR_t *getFileIR()=0; - virtual InstructionLocationMap_t *getLocationMap()=0; - virtual DollopManager_t *getDollopManager()=0; - virtual PlacementQueue_t* getPlacementQueue()=0; + RangeAddress_t = 0) = 0; virtual void applyPatch( RangeAddress_t from_addr, - RangeAddress_t to_addr)=0; + RangeAddress_t to_addr) = 0; + + virtual MemorySpace_t* getMemorySpace() = 0; + virtual IRDB_SDK::FileIR_t* getFileIR() = 0; + virtual InstructionLocationMap_t* getLocationMap() = 0; + virtual DollopManager_t* getDollopManager() = 0; + virtual PlacementQueue_t* getPlacementQueue() = 0; }; diff --git a/include/private-include/zipr_plugin.h b/include/private-include/zipr_plugin.h index 01d67aa..77e5db0 100644 --- a/include/private-include/zipr_plugin.h +++ b/include/private-include/zipr_plugin.h @@ -6,11 +6,11 @@ namespace Zipr_SDK using InstructionLocationMap_t = map<Instruction_t*,RangeAddress_t>; - enum ZiprPreference - { - None, - Must, - }; + using ZiprPreference_t = enum ZiprPreference + { + None, + Must, + }; class ZiprPluginInterface_t { @@ -22,7 +22,7 @@ namespace Zipr_SDK virtual void doCallbackLinkingBegin() { } virtual void doCallbackLinkingEnd() { } - virtual ZiprPreference addressDollop(const Dollop_t *dollop, const RangeAddress_t &source, Range_t &place, bool &coalesce, bool &fallthrough_ok) + virtual ZiprPreference_t addressDollop(const Dollop_t *dollop, const RangeAddress_t &source, Range_t &place, bool &coalesce, bool &fallthrough_ok) { return None; } virtual bool willPluginPlop(Instruction_t*) @@ -88,10 +88,10 @@ namespace Zipr_SDK virtual ZiprOptionsNamespace_t *registerOptions(ZiprOptionsNamespace_t *) { return new ZiprOptionsNamespace_t(""); } - virtual ZiprPreference retargetPin(const RangeAddress_t &, const Dollop_t *, RangeAddress_t &) + virtual ZiprPreference_t retargetPin(const RangeAddress_t &, const Dollop_t *, RangeAddress_t &) { return None; } - virtual ZiprPreference retargetCallback(const RangeAddress_t &, const DollopEntry_t *, RangeAddress_t &) + virtual ZiprPreference_t retargetCallback(const RangeAddress_t &, const DollopEntry_t *, RangeAddress_t &) { return None; } virtual RangeAddress_t doPlaceScoopsBegin(const RangeAddress_t max_addr) -- GitLab