[llvm-dev] How to pass StringRef or std::string type to external function
SANGEETA CHOWDHARY via llvm-dev
llvm-dev at lists.llvm.org
Thu Jul 26 19:54:42 PDT 2018
Hi,
I am trying to pass name of the file to external function but I am not able
to figure out how I can do it. Below is the code -
auto *Scope = cast<DIScope>(Loc->getScope());
StringRef fileName = Scope->getFilename();
errs()<<"fileName:"<<fileName<<"\n";
Finish = M->getOrInsertFunction("finish", VoidTy);
IRB.CreateCall(Finish, {});
How should I pass fileName to “finish” call?
Regards,
Sangeeta
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180726/8947bbeb/attachment.html>
More information about the llvm-dev
mailing list