How to get the module handle of a .bc file??

Hi all,
I want to run a function pass on a certain .bc file. In the process, the pass will insert a check function into the .bc file.

I know the .bc file is regarded as a module in LLVM. So, there are two basic steps needed to be done,
1, Use the "getOrInsertFunction"API to add a declaration of the extern “check function”.
2, Use the "insertBefore"API to insert the CallInst into the right position.

My problem is about the step 1. How can I get the handle of the .bc file (Probably is a Module*)? so I can
declare the extern function like
// insert the " i32 @fib(i32 )" to the module M
Function *FibF =
cast(M->getOrInsertFunction(“fib”, Type::getInt32Ty(Context),
(Type *)0));
How can I get the “M” of the .bc file???

Any help~

Objects that form the IR (functions, basic blocks, instructions) have
the getParent() method that returns their paren (module for a
function, basic block for a single instruction etc.)
BTW, LLVM Doxygen is really helpful. It's usually the first result
when you search for "LLVM <classname> class reference"

Oh, I see.
Also, I also tried a module pass(the short source code is as follow). I intended to run the module pass on the .bc file declaring the check function to the module’s symbol table. Then I go for the function pass to insert the CallInst instruction. Does that make sense?
Thank you!!
#include “llvm/Pass.h”
#include “llvm/Support/raw_ostream.h”
#include “llvm/Module.h”
#include “llvm/Function.h”
#include “llvm/LLVMContext.h”
#include “llvm/DerivedTypes.h”
#include “llvm/Constants.h”
#include “llvm/Instructions.h”
#include “llvm/Analysis/Verifier.h”
#include “llvm/ExecutionEngine/JIT.h”
#include “llvm/ExecutionEngine/Interpreter.h”
#include “llvm/ExecutionEngine/GenericValue.h”
#include “llvm/Support/TargetSelect.h”
using namespace llvm;

namespace {
struct Hello2 : public ModulePass {

static char ID;
Hello2() : ModulePass(ID) {}

virtual bool runOnModule(Module &M) {
errs() << "Hello: " << ‘\n’ << ‘\n’;
//errs().write_escaped(F.getName()) << ‘\n’;
Function *check =
(Type *)0));
errs()<<“declare succeeded!”<<‘\n’;
return true;