/// Load a function index if requested by the -functionindex option.
static ErrorOr<std::unique_ptr<FunctionInfoIndex>>
-loadIndex(LLVMContext &Context, const Module *ExportingModule = nullptr) {
+loadIndex(const Module *ExportingModule = nullptr) {
assert(!FunctionIndex.empty());
ErrorOr<std::unique_ptr<MemoryBuffer>> FileOrErr =
MemoryBuffer::getFileOrSTDIN(FunctionIndex);
std::unique_ptr<FunctionInfoIndex> Index;
if (!FunctionIndex.empty()) {
- ErrorOr<std::unique_ptr<FunctionInfoIndex>> IndexOrErr =
- loadIndex(Context);
+ ErrorOr<std::unique_ptr<FunctionInfoIndex>> IndexOrErr = loadIndex();
std::error_code EC = IndexOrErr.getError();
if (EC) {
errs() << EC.message() << '\n';
// local functions/variables as exported and promote if necessary.
std::unique_ptr<FunctionInfoIndex> Index;
if (!FunctionIndex.empty()) {
- ErrorOr<std::unique_ptr<FunctionInfoIndex>> IndexOrErr =
- loadIndex(Context, &*M);
+ ErrorOr<std::unique_ptr<FunctionInfoIndex>> IndexOrErr = loadIndex(&*M);
std::error_code EC = IndexOrErr.getError();
if (EC) {
errs() << EC.message() << '\n';