-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Álvaro Castro wrote:
Hello!
I'm trying LLVM for generating code and I found something I cannot figure
out or find in the documentation:
I'm doing something like this to call "sin" from std:
std::vector<const Type*> params;
params.push_back( Type::FloatTy );
FunctionType *FT = FunctionType::get( Type::FloatTy, params, false);
Function *F = new Function( FT, Function::ExternalLinkage, "sin", M );
CallInst *CallExternal = new CallInst( F, SomeValue, "external_call", BB );
I can make some calls to functions like glclear() as I'm using opengl:
...
Function *F = new Function( FT, Function::ExternalLinkage, "glclear", M );
...
But if I want to call any function inside a C++ namespace I don't find the
way to do it. Imagine you want to call
othernamespace::globalFunction()
See this older message:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2007-December/011616.html