OSDN Git Service

Make the LLParser accept call instructions of variables in the program AS
authorAlexander Richardson <arichardson.kde@gmail.com>
Tue, 27 Feb 2018 11:15:11 +0000 (11:15 +0000)
committerAlexander Richardson <arichardson.kde@gmail.com>
Tue, 27 Feb 2018 11:15:11 +0000 (11:15 +0000)
commitb0b9884d4b3047c6361b31269c4482a42a040e50
treeae2c28a8ebca18a45f71c343f6e40560312234ca
parenta886e2f85a0ffd5dfeec7a451dddabf5d176a546
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@326188 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AsmParser/LLParser.cpp
lib/AsmParser/LLParser.h
test/Assembler/call-nonzero-program-addrspace-2.ll [new file with mode: 0644]
test/Assembler/call-nonzero-program-addrspace.ll [new file with mode: 0644]
test/Assembler/invoke-nonzero-program-addrspace.ll [new file with mode: 0644]