[LLVMdev] A question about Module::getGlobalVariable()
lizhuo
aqex at bsv.com.cn
Sat Mar 25 16:40:13 PST 2006
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 ?
thanks
More information about the llvm-dev
mailing list