For PR1113:
Increment the counter after the second use, not after the first use. This fixes PR1113. Also, rename some classes for simplicity and to more naturally be reminscient of LLVM 1.9. This in preparation for additional classes that will provide a scaled down model of the LLVM 1.9 IR. llvm-svn: 33226
This commit is contained in:
parent
03c4953cdd
commit
8307a54baa
|
@ -42,23 +42,24 @@ int yyerror(const char *ErrorMsg) ;
|
|||
/// This enum is used to keep track of the original (1.9) type used to form
|
||||
/// a type. These are needed for type upgrades and to determine how to upgrade
|
||||
/// signed instructions with signless operands. The Lexer uses thse in its
|
||||
/// calls to getTypeInfo
|
||||
enum Types {
|
||||
/// calls to getType
|
||||
enum TypeIDs {
|
||||
BoolTy, SByteTy, UByteTy, ShortTy, UShortTy, IntTy, UIntTy, LongTy, ULongTy,
|
||||
FloatTy, DoubleTy, PointerTy, PackedTy, ArrayTy, StructTy, PackedStructTy,
|
||||
OpaqueTy, VoidTy, LabelTy, FunctionTy, UnresolvedTy, UpRefTy
|
||||
};
|
||||
|
||||
namespace {
|
||||
class TypeInfo;
|
||||
class ValueInfo;
|
||||
class ConstInfo;
|
||||
class Type;
|
||||
class Value;
|
||||
class Constant;
|
||||
class Instruction;
|
||||
}
|
||||
|
||||
typedef std::vector<const TypeInfo*> TypeList;
|
||||
typedef std::vector<ValueInfo*> ValueList;
|
||||
typedef std::vector<const Type*> TypeList;
|
||||
typedef std::vector<Value*> ValueList;
|
||||
|
||||
/// A function to create a TypeInfo* used in the Lexer.
|
||||
extern const TypeInfo* getTypeInfo(const std::string& newTy, Types oldTy);
|
||||
/// A function to create a Typeo* used in the Lexer.
|
||||
extern const Type* getType(const std::string& newTy, TypeIDs oldTy);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
return sym
|
||||
|
||||
#define RET_TY(sym,OldTY,NewTY,sign) \
|
||||
Upgradelval.Type = getTypeInfo(NewTY, OldTY); \
|
||||
Upgradelval.Ty = getType(NewTY, OldTY); \
|
||||
return sym
|
||||
|
||||
#define YY_NEVER_INTERACTIVE 1
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue