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)
commitc11ae185aa417bf261af83f0bbe6cea14a8e9c01
treecae8a701289acfe060ae1795532dc2ad6f49d40b
parent53713c0e1aee218fbad02827cc3ad3c598ef157e
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
llvm/lib/AsmParser/LLParser.cpp
llvm/lib/AsmParser/LLParser.h
llvm/test/Assembler/call-nonzero-program-addrspace-2.ll [new file with mode: 0644]
llvm/test/Assembler/call-nonzero-program-addrspace.ll [new file with mode: 0644]
llvm/test/Assembler/invoke-nonzero-program-addrspace.ll [new file with mode: 0644]