klee
ModuleUtil.cpp File Reference
#include "klee/Support/ModuleUtil.h"
#include "klee/Config/Version.h"
#include "klee/Support/Debug.h"
#include "klee/Support/ErrorHandling.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/BinaryFormat/Magic.h"
#include "llvm/Bitcode/BitcodeReader.h"
#include "llvm/IR/AssemblyAnnotationWriter.h"
#include "llvm/IR/DiagnosticInfo.h"
#include "llvm/IR/DiagnosticPrinter.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/ValueSymbolTable.h"
#include "llvm/IRReader/IRReader.h"
#include "llvm/Linker/Linker.h"
#include "llvm/Object/Archive.h"
#include "llvm/Object/Error.h"
#include "llvm/Object/ObjectFile.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Support/SourceMgr.h"
#include <algorithm>
#include <fstream>
#include <map>
#include <set>
#include <sstream>
#include <string>
Include dependency graph for ModuleUtil.cpp:

Go to the source code of this file.

Functions

static void GetAllUndefinedSymbols (Module *M, std::set< std::string > &UndefinedSymbols)
 
static bool linkTwoModules (llvm::Module *Dest, std::unique_ptr< llvm::Module > Src, std::string &errorMsg)
 
static bool valueIsOnlyCalled (const Value *v)
 

Function Documentation

◆ GetAllUndefinedSymbols()

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

Based on GetAllUndefinedSymbols() from LLVM3.2

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 65 of file ModuleUtil.cpp.

Referenced by klee::linkModules().

Here is the caller graph for this function:

◆ linkTwoModules()

static bool linkTwoModules ( llvm::Module *  Dest,
std::unique_ptr< llvm::Module >  Src,
std::string &  errorMsg 
)
static

Definition at line 135 of file ModuleUtil.cpp.

References klee::linkModules().

Referenced by klee::linkModules().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ valueIsOnlyCalled()

static bool valueIsOnlyCalled ( const Value *  v)
static

Definition at line 319 of file ModuleUtil.cpp.

References klee::functionEscapes(), klee::klee_error(), klee::loadFile(), and valueIsOnlyCalled().

Referenced by valueIsOnlyCalled().

Here is the call graph for this function:
Here is the caller graph for this function: