diff options
Diffstat (limited to 'llvm/tools/llvm-upgrade/ParserInternals.h')
| -rw-r--r-- | llvm/tools/llvm-upgrade/ParserInternals.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/llvm/tools/llvm-upgrade/ParserInternals.h b/llvm/tools/llvm-upgrade/ParserInternals.h index 7487a581601..85182c5dc19 100644 --- a/llvm/tools/llvm-upgrade/ParserInternals.h +++ b/llvm/tools/llvm-upgrade/ParserInternals.h @@ -28,7 +28,8 @@ extern std::istream* LexInput; void UpgradeAssembly( - const std::string & infile, std::istream& in, std::ostream &out, bool debug); + const std::string & infile, std::istream& in, std::ostream &out, bool debug, + bool addAttrs); // Globals exported by the parser... extern char* Upgradetext; @@ -42,8 +43,8 @@ int yyerror(const char *ErrorMsg) ; /// signed instructions with signless operands. enum Types { BoolTy, SByteTy, UByteTy, ShortTy, UShortTy, IntTy, UIntTy, LongTy, ULongTy, - FloatTy, DoubleTy, PointerTy, PackedTy, ArrayTy, StructTy, OpaqueTy, VoidTy, - LabelTy, FunctionTy, UnresolvedTy, NumericTy + FloatTy, DoubleTy, PointerTy, PackedTy, ArrayTy, StructTy, PackedStructTy, + OpaqueTy, VoidTy, LabelTy, FunctionTy, UnresolvedTy, NumericTy }; /// This type is used to keep track of the signedness of the obsolete @@ -91,6 +92,10 @@ struct TypeInfo { bool isOther() const { return !isPacked() && !isPointer() && !isFloatingPoint() && !isIntegral(); } + bool isAttributeCandidate() const { + return isIntegral() && getBitWidth() < 32; + } + unsigned getBitWidth() const { switch (oldTy) { case LabelTy: |

