[ThinLTO] Deduplicate function index loading into shared helper (NFC)
authorTeresa Johnson <tejohnson@google.com>
Mon, 23 Nov 2015 19:19:11 +0000 (19:19 +0000)
committerTeresa Johnson <tejohnson@google.com>
Mon, 23 Nov 2015 19:19:11 +0000 (19:19 +0000)
commit846661215edff55c46f0c3fad192289936e16e41
treecb0cc16b9bb66ed9aa65b1a66ff81d14b421d27e
parente03f5e5c4320addfb9816f4ea851ccc075721532
[ThinLTO] Deduplicate function index loading into shared helper (NFC)

Add a shared helper routine to read the function index from a file
and create/return the function index object. Use it in llvm-link and
llvm-lto.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253903 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Object/FunctionIndexObjectFile.h
lib/Object/FunctionIndexObjectFile.cpp
tools/llvm-link/llvm-link.cpp
tools/llvm-lto/llvm-lto.cpp