Displaying 3 results from an estimated 3 matches for "getfilemanager".
2014 Jul 22
2
[LLVMdev] How to get the symbols from a .so file?
Hello all,
I develop a project based on Clang where I need to read all symbols from a library. For symbols libraries (.a/.lib) I use the following code:
auto &FM = C->getFileManager();
...
auto Buffer = FM.getBufferForFile(FileEntry);
...
auto Object = llvm::object::ObjectFile::createObjectFile(Buffer);
This code crashes at the last line if the file in question is a shared object (.so). Apparently I need to use different code to parse a shared object but I...
2013 Feb 19
0
[LLVMdev] LLVM/Clang 3.1: Add a new include path in a clang C++ based parser
...0);
TargetOptions TO;
TO.Triple = llvm::sys::getDefaultTargetTriple();
TargetInfo *TI =
TargetInfo::CreateTargetInfo(TheCompInst->getDiagnostics(), TO);
TheCompInst->setTarget(TI);
TheCompInst->createFileManager();
FileManager &FileMgr = TheCompInst->getFileManager();
TheCompInst->createSourceManager(FileMgr);
SourceManager &SourceMgr = TheCompInst->getSourceManager();
TheCompInst->createPreprocessor();
TheCompInst->createASTContext();
Rewriter TheRewriter;
TheRewriter.setSourceMgr(SourceMgr, TheCompInst->get...
2013 Feb 19
0
[LLVMdev] LLVM/Clang 3.1: Add a new include path in a clang C++ based parser
...0);
TargetOptions TO;
TO.Triple = llvm::sys::getDefaultTargetTriple();
TargetInfo *TI =
TargetInfo::CreateTargetInfo(TheCompInst->getDiagnostics(), TO);
TheCompInst->setTarget(TI);
TheCompInst->createFileManager();
FileManager &FileMgr = TheCompInst->getFileManager();
TheCompInst->createSourceManager(FileMgr);
SourceManager &SourceMgr = TheCompInst->getSourceManager();
TheCompInst->createPreprocessor();
TheCompInst->createASTContext();
Rewriter TheRewriter;
TheRewriter.setSourceMgr(SourceMgr, TheCompInst->get...