Skip to content

Commit

Permalink
Remove non-portable constructors
Browse files Browse the repository at this point in the history
Since we're breaking ABI here, these constructors need to go. Manually
setting the size to `sizeof(int)` is non-portable as the
BPatch::createEnum may be used to modify a binary that doesn't have the
same `int` representation as the host on which Dyninst was compiled.
  • Loading branch information
Tim Haines committed Nov 24, 2021
1 parent e08e39d commit 414ef75
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
2 changes: 0 additions & 2 deletions symtabAPI/h/Type.h
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,6 @@ class SYMTAB_EXPORT typeEnum : public derivedType {
public:
struct scoped_t final {};
typeEnum() = default;
typeEnum(typeId_t ID, std::string name = "");
typeEnum(std::string name);
typeEnum(boost::shared_ptr<Type> underlying_type, std::string name);
typeEnum(boost::shared_ptr<Type> underlying_type, std::string name, typeId_t ID);
typeEnum(boost::shared_ptr<Type> underlying_type, std::string name, typeId_t ID, scoped_t) :
Expand Down
6 changes: 0 additions & 6 deletions symtabAPI/src/Type.C
Original file line number Diff line number Diff line change
Expand Up @@ -296,12 +296,6 @@ bool Type::isCompatible(Type * /*oType*/)
/*
* ENUM
*/
typeEnum::typeEnum(int ID, std::string name)
: derivedType(name, ID, sizeof(int), dataEnum){}

typeEnum::typeEnum(std::string name)
: derivedType(name, ::getUniqueTypeId(), sizeof(int), dataEnum) {}

typeEnum::typeEnum(boost::shared_ptr<Type> underlying_type, std::string name, typeId_t ID) :
derivedType(name, ID, underlying_type->getSize(), dataEnum) {
baseType_ = underlying_type;
Expand Down

0 comments on commit 414ef75

Please sign in to comment.