Displaying 1 result from an estimated 1 matches for "functioninsert".
2012 Feb 01
1
[LLVMdev] Function Insertion Error
...
#include "llvm/Pass.h"
#include "llvm/Function.h"
#include "llvm/Module.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Support/IRBuilder.h"
using namespace llvm;
namespace {
struct FunctionInsert : public ModulePass {
static char ID;
FunctionInsert() : ModulePass(ID) {}
};
virtual bool runOnModule(Module &M) {
FunctionType* ty=FunctionType::get(Type::getInt32Ty(M.getContext()),false);
Function *func = cast<Function>(M.getOrInsertFunction(&q...