OSDN Git Service

ARM: properly lower dllimport'ed global values
authorSaleem Abdulrasool <compnerd@compnerd.org>
Mon, 7 Jul 2014 05:18:35 +0000 (05:18 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Mon, 7 Jul 2014 05:18:35 +0000 (05:18 +0000)
commit682e019983ba91576ecf02a0dd93edfde0d705f3
tree29460e435a060462a440b81cb0296c0ec0f852b0
parentecacffa1478fb8cd647469b6032bba0b4fa3644c
ARM: properly lower dllimport'ed global values

This completes the handling for DLL import storage symbols when lowering
instructions.  A DLL import storage symbol must have an additional load
performed prior to use.  This is applicable to variables and functions.

This is particularly important for non-function symbols as it is possible to
handle function references by emitting a thunk which performs the translation
from the unprefixed __imp_ symbol to the proper symbol (although, this is a
non-optimal lowering).  For a variable symbol, no such thunk can be
accommodated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212431 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMISelLowering.cpp
test/CodeGen/ARM/Windows/dllimport.ll [new file with mode: 0644]