diff options
Diffstat (limited to 'llvm/lib/AsmParser/LLParser.h')
-rw-r--r-- | llvm/lib/AsmParser/LLParser.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/llvm/lib/AsmParser/LLParser.h b/llvm/lib/AsmParser/LLParser.h index 811f96418fa..cec1a8e8f7e 100644 --- a/llvm/lib/AsmParser/LLParser.h +++ b/llvm/lib/AsmParser/LLParser.h @@ -202,8 +202,9 @@ namespace llvm { /// GetGlobalVal - Get a value with the specified name or ID, creating a /// forward reference record if needed. This can return null if the value /// exists but does not have the right type. - GlobalValue *GetGlobalVal(const std::string &Name, Type *Ty, LocTy Loc); - GlobalValue *GetGlobalVal(unsigned ID, Type *Ty, LocTy Loc); + GlobalValue *GetGlobalVal(const std::string &N, Type *Ty, LocTy Loc, + bool IsCall); + GlobalValue *GetGlobalVal(unsigned ID, Type *Ty, LocTy Loc, bool IsCall); /// Get a Comdat with the specified name, creating a forward reference /// record if needed. @@ -267,7 +268,11 @@ namespace llvm { bool ParseTLSModel(GlobalVariable::ThreadLocalMode &TLM); bool ParseOptionalThreadLocal(GlobalVariable::ThreadLocalMode &TLM); bool ParseOptionalUnnamedAddr(GlobalVariable::UnnamedAddr &UnnamedAddr); - bool ParseOptionalAddrSpace(unsigned &AddrSpace); + bool ParseOptionalAddrSpace(unsigned &AddrSpace, unsigned DefaultAS = 0); + bool ParseOptionalProgramAddrSpace(unsigned &AddrSpace) { + return ParseOptionalAddrSpace( + AddrSpace, M->getDataLayout().getProgramAddressSpace()); + }; bool ParseOptionalParamAttrs(AttrBuilder &B); bool ParseOptionalReturnAttrs(AttrBuilder &B); bool ParseOptionalLinkage(unsigned &Res, bool &HasLinkage, @@ -448,6 +453,9 @@ namespace llvm { bool ConvertValIDToValue(Type *Ty, ValID &ID, Value *&V, PerFunctionState *PFS, bool IsCall); + Value *checkValidVariableType(LocTy Loc, const Twine &Name, Type *Ty, + Value *Val, bool IsCall); + bool parseConstantValue(Type *Ty, Constant *&C); bool ParseValue(Type *Ty, Value *&V, PerFunctionState *PFS); bool ParseValue(Type *Ty, Value *&V, PerFunctionState &PFS) { |