klee
ModuleUtil.h
Go to the documentation of this file.
1//===-- ModuleUtil.h --------------------------------------------*- C++ -*-===//
2//
3// The KLEE Symbolic Virtual Machine
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#ifndef KLEE_MODULEUTIL_H
11#define KLEE_MODULEUTIL_H
12
13#include "klee/Config/Version.h"
14
15#if LLVM_VERSION_CODE >= LLVM_VERSION(8, 0)
16#include "llvm/IR/InstrTypes.h"
17#else
18#include "llvm/IR/CallSite.h"
19#endif
20#include "llvm/IR/Module.h"
21
22#include <memory>
23#include <string>
24#include <vector>
25
26namespace klee {
27
38std::unique_ptr<llvm::Module>
39linkModules(std::vector<std::unique_ptr<llvm::Module>> &modules,
40 llvm::StringRef entryFunction, std::string &errorMsg);
41
51llvm::Function *getDirectCallTarget(
53 const llvm::CallBase &cb,
54#else
55 const llvm::CallSite &cs,
56#endif
57 bool moduleIsFullyLinked);
58
62bool functionEscapes(const llvm::Function *f);
63
76bool loadFile(const std::string &libraryName, llvm::LLVMContext &context,
77 std::vector<std::unique_ptr<llvm::Module>> &modules,
78 std::string &errorMsg);
79}
80
81#endif /* KLEE_MODULEUTIL_H */
#define LLVM_VERSION_CODE
Definition: Version.h:16
#define LLVM_VERSION(major, minor)
Definition: Version.h:15
Definition: main.cpp:291
std::unique_ptr< llvm::Module > linkModules(std::vector< std::unique_ptr< llvm::Module > > &modules, llvm::StringRef entryFunction, std::string &errorMsg)
Definition: ModuleUtil.cpp:146
bool loadFile(const std::string &libraryName, llvm::LLVMContext &context, std::vector< std::unique_ptr< llvm::Module > > &modules, std::string &errorMsg)
bool functionEscapes(const llvm::Function *f)
llvm::Function * getDirectCallTarget(const llvm::CallBase &cb, bool moduleIsFullyLinked)