Hide implied extensions for arithmetic ops

This commit is contained in:
caheckman 2019-05-09 17:35:57 -04:00
parent 706960a139
commit 8860979785
6 changed files with 139 additions and 56 deletions

View file

@ -62,6 +62,7 @@ struct PartialSymbolEntry {
/// - etc.
class PrintC : public PrintLanguage {
protected:
static OpToken hidden; ///< Hidden functional (that may force parentheses)
static OpToken scope; ///< The sub-scope/namespace operator
static OpToken object_member; ///< The \e member operator
static OpToken pointer_member; ///< The \e points \e to \e member operator
@ -116,6 +117,7 @@ protected:
bool option_convention; ///< Set to \b true if we should print calling convention
bool option_nocasts; ///< Don't print a cast if \b true
bool option_unplaced; ///< Set to \b true if we should display unplaced comments
bool option_hide_exts; ///< Set to \b true if we should hide implied extension operations
string nullToken; ///< Token to use for 'null'
CommentSorter commsorter; ///< Container/organizer for comments in the current function
@ -154,6 +156,7 @@ protected:
void emitCommentFuncHeader(const Funcdata *fd); ///< Emit comments in the given function's header
void opFunc(const PcodeOp *op); ///< Push a \e functional expression based on the given p-code op to the RPN stack
void opTypeCast(const PcodeOp *op); ///< Push the given p-code op using type-cast syntax to the RPN stack
void opHiddenFunc(const PcodeOp *op); ///< Push the given p-code op as a hidden token
static bool hasCharTerminator(uint1 *buffer,int4 size,int4 charsize);
bool printCharacterConstant(ostream &s,const Address &addr,int4 charsize) const;
bool isExtensionCastImplied(const PcodeOp *op) const;
@ -196,6 +199,7 @@ public:
void setCStyleComments(void) { setCommentDelimeter("/* "," */",false); } ///< Set c-style "/* */" comment delimiters
void setCPlusPlusStyleComments(void) { setCommentDelimeter("// ","",true); } ///< Set c++-style "//" comment delimiters
void setDisplayUnplaced(bool val) { option_unplaced = val; } ///< Toggle whether \e unplaced comments are displayed in the header
void setHideImpliedExts(bool val) { option_hide_exts = val; } ///< Toggle whether implied extensions are hidden
virtual ~PrintC(void) {}
virtual void adjustTypeOperators(void);
virtual void setCommentStyle(const string &nm);