LLVM API Documentation

LinkArchives.cpp File Reference

#include "llvm/Linker.h"
#include "llvm/Module.h"
#include "llvm/ModuleProvider.h"
#include "llvm/ADT/SetOperations.h"
#include "llvm/Bitcode/Archive.h"
#include "llvm/Config/config.h"
#include <memory>
#include <set>

Include dependency graph for LinkArchives.cpp:

Go to the source code of this file.

Functions

static void GetAllUndefinedSymbols (Module *M, std::set< std::string > &UndefinedSymbols)


Function Documentation

static void GetAllUndefinedSymbols ( Module *  M,
std::set< std::string > &  UndefinedSymbols 
) [static]

GetAllUndefinedSymbols - calculates the set of undefined symbols that still exist in an LLVM module. This is a bit tricky because there may be two symbols with the same name but different LLVM types that will be resolved to each other but aren't currently (thus we need to treat it as resolved).

Inputs: M - The module in which to find undefined symbols.

Outputs: UndefinedSymbols - A set of C++ strings containing the name of all undefined symbols.

Definition at line 38 of file LinkArchives.cpp.

References llvm::Module::alias_begin(), llvm::Module::alias_end(), llvm::Module::begin(), E, llvm::Module::end(), llvm::Module::getFunction(), llvm::Module::global_begin(), llvm::Module::global_end(), and llvm::Function::isDeclaration().

Referenced by llvm::Linker::LinkInArchive().