A question about Module::getGlobalVariable()

I want to find a global variable by name in some module ,
I find LLVM function Module::getGlobalVariable(string name,Type* ty);

My question is , is it necessary to specify the global variable type (second param) ?
Why not just
getGlobalVariable(string name).

I look up the source , and find that it depend on SymbolTable.find()
and SymbolTable only support find with type .is it True ? or I make something wrong ?


If you are using LLVM CVS, you can use Module::getNamedGlobal(string name), which doesn't take a type.