diff options
author | Alexander Richardson <arichardson.kde@gmail.com> | 2018-02-27 11:15:11 +0000 |
---|---|---|
committer | Alexander Richardson <arichardson.kde@gmail.com> | 2018-02-27 11:15:11 +0000 |
commit | c11ae185aa417bf261af83f0bbe6cea14a8e9c01 (patch) | |
tree | cae8a701289acfe060ae1795532dc2ad6f49d40b /llvm/lib/AsmParser/LLParser.h | |
parent | 53713c0e1aee218fbad02827cc3ad3c598ef157e (diff) | |
download | bcm5719-llvm-c11ae185aa417bf261af83f0bbe6cea14a8e9c01.tar.gz bcm5719-llvm-c11ae185aa417bf261af83f0bbe6cea14a8e9c01.zip |
Make the LLParser accept call instructions of variables in the program AS
Summary:
Since r325479 the DataLayout includes a program address space. However, it
is not possible to use `call %foo` if foo is a `i8(...) addrspace(200)` and
the DataLayout specifies address space 200 as the address space for functions.
With this change the IR parser will still accept variables in the program
address space as well as address space 0 for call and invoke functions.
Reviewers: pcc, arsenm, bjope, dylanmckay, theraven
Reviewed By: dylanmckay
Subscribers: wdng, llvm-commits
Differential Revision: https://reviews.llvm.org/D43645
llvm-svn: 326188
Diffstat (limited to 'llvm/lib/AsmParser/LLParser.h')
-rw-r--r-- | llvm/lib/AsmParser/LLParser.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/AsmParser/LLParser.h b/llvm/lib/AsmParser/LLParser.h index a3252ff5f19..79428d4b703 100644 --- a/llvm/lib/AsmParser/LLParser.h +++ b/llvm/lib/AsmParser/LLParser.h @@ -358,8 +358,8 @@ namespace llvm { /// GetVal - 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. - Value *GetVal(const std::string &Name, Type *Ty, LocTy Loc); - Value *GetVal(unsigned ID, Type *Ty, LocTy Loc); + Value *GetVal(const std::string &Name, Type *Ty, LocTy Loc, bool IsCall); + Value *GetVal(unsigned ID, Type *Ty, LocTy Loc, bool IsCall); /// SetInstName - After an instruction is parsed and inserted into its /// basic block, this installs its name. @@ -381,7 +381,7 @@ namespace llvm { }; bool ConvertValIDToValue(Type *Ty, ValID &ID, Value *&V, - PerFunctionState *PFS); + PerFunctionState *PFS, bool IsCall); bool parseConstantValue(Type *Ty, Constant *&C); bool ParseValue(Type *Ty, Value *&V, PerFunctionState *PFS); |