class Instruction;
class Constant;
class GlobalValue;
- class MetadataBase;
class MDString;
class MDNode;
+ class UnionType;
/// ValID - Represents a reference of a definition of some sort with no type.
/// There are several cases where we have to parse the value but where the
bool ParseOptionalVisibility(unsigned &Visibility);
bool ParseOptionalCallingConv(CallingConv::ID &CC);
bool ParseOptionalAlignment(unsigned &Alignment);
+ bool ParseOptionalStackAlignment(unsigned &Alignment);
bool ParseInstructionMetadata(SmallVectorImpl<std::pair<unsigned,
MDNode *> > &);
bool ParseOptionalCommaAlign(unsigned &Alignment, bool &AteExtraComma);
}
bool ParseTypeRec(PATypeHolder &H);
bool ParseStructType(PATypeHolder &H, bool Packed);
+ bool ParseUnionType(PATypeHolder &H);
bool ParseArrayVectorType(PATypeHolder &H, bool isVector);
bool ParseFunctionType(PATypeHolder &Result);
PATypeHolder HandleUpRefs(const Type *Ty);
- // Constants.
- bool ParseValID(ValID &ID);
- bool ConvertGlobalValIDToValue(const Type *Ty, ValID &ID, Constant *&V);
- bool ConvertGlobalOrMetadataValIDToValue(const Type *Ty, ValID &ID,
- Value *&V);
- bool ParseGlobalValue(const Type *Ty, Constant *&V);
- bool ParseGlobalTypeAndValue(Constant *&V);
- bool ParseGlobalValueVector(SmallVectorImpl<Constant*> &Elts);
- bool ParseMDNodeVector(SmallVectorImpl<Value*> &);
-
-
// Function Semantic Analysis.
class PerFunctionState {
LLParser &P;
};
bool ConvertValIDToValue(const Type *Ty, ValID &ID, Value *&V,
- PerFunctionState &PFS);
+ PerFunctionState *PFS);
bool ParseValue(const Type *Ty, Value *&V, PerFunctionState &PFS);
bool ParseValue(const Type *Ty, Value *&V, LocTy &Loc,
return ParseTypeAndBasicBlock(BB, Loc, PFS);
}
+ bool ParseUnionValue(const UnionType* utype, ValID &ID, Value *&V);
+
struct ParamInfo {
LocTy Loc;
Value *V;
bool ParseParameterList(SmallVectorImpl<ParamInfo> &ArgList,
PerFunctionState &PFS);
+ // Constant Parsing.
+ bool ParseValID(ValID &ID, PerFunctionState *PFS = NULL);
+ bool ParseGlobalValue(const Type *Ty, Constant *&V);
+ bool ParseGlobalTypeAndValue(Constant *&V);
+ bool ParseGlobalValueVector(SmallVectorImpl<Constant*> &Elts);
+ bool ParseMDNodeVector(SmallVectorImpl<Value*> &, PerFunctionState *PFS);
+
// Function Parsing.
struct ArgInfo {
LocTy Loc;