Add support for handling ifuncs to GlobalValue::getBaseObject
authorTeresa Johnson <tejohnson@google.com>
Mon, 15 May 2017 18:28:29 +0000 (18:28 +0000)
committerTeresa Johnson <tejohnson@google.com>
Mon, 15 May 2017 18:28:29 +0000 (18:28 +0000)
commit41db92f9ae038a62fa0c8994746ad951e1ab0295
tree4ffe0196a34d86017b586d89ffef3f718d258e90
parentce4b17fdf3912e955e9ace443a687b9df4e16a7d
Add support for handling ifuncs to GlobalValue::getBaseObject

Summary:
All GlobalIndirectSymbol types (not just GlobalAlias) should return
their base object.

Without this patch LTO would warn "Unable to determine comdat of
alias!" for an ifunc.

Reviewers: pcc

Subscribers: mehdi_amini, inglorion, llvm-commits

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

llvm-svn: 303096
llvm/lib/IR/Globals.cpp
llvm/test/LTO/Resolution/X86/ifunc.ll [new file with mode: 0644]
llvm/test/Object/X86/nm-ir.ll