[AArch64] Add support for dllimport of values and functions
commitd9b28e17d8d13e78af77d8a37f389d737132b9b4
authorMartin Storsjo <martin@martin.st>
Wed, 25 Oct 2017 07:25:18 +0000 (25 07:25 +0000)
committerMartin Storsjo <martin@martin.st>
Wed, 25 Oct 2017 07:25:18 +0000 (25 07:25 +0000)
treea253fa455e6c15e24a609404de86a66a2f07c5ab
parent839fe1671c30014c9e26b45b8d4a309adc5c39d4
[AArch64] Add support for dllimport of values and functions

Previously, the dllimport attribute did the right thing in terms
of treating it as a pointer to a value, but this makes sure the
names get mangled properly, and calls to such functions load the
function from the __imp_ pointer.

This is based on SVN r212431 and r212430 where the same was
implemented for ARM.

Differential Revision: https://reviews.llvm.org/D38530

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316555 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64ISelLowering.cpp
lib/Target/AArch64/AArch64ISelLowering.h
lib/Target/AArch64/AArch64MCInstLower.cpp
lib/Target/AArch64/Utils/AArch64BaseInfo.h
test/CodeGen/AArch64/dllimport.ll [new file with mode: 0644]