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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33226 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer 2007-01-15 02:40:33 +00:00
parent 42a7551725
commit 3d6cd1b149
3 changed files with 215 additions and 211 deletions

View File

@ -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

View File

@ -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