Arnamoy Bhattacharyya
2012-Sep-07 05:03 UTC
[LLVMdev] Get the filename on which a pass is running?
Hi; I was wondering how can I get the name of the bitcode file on which I am running the pass. I am making my pass as a loadable module. And if I run my pass like this - opt -S -loops -load /home/arnie/llvm-clang/llvm/Release+Asserts/lib/XYZ.so -xyz <b.bc> b1.bc I want to get b.bc in the pass. Thank you; -- Arnamoy Bhattacharyya Athabasca Hall 143 Department of Computing Science - University of Alberta Edmonton, Alberta, Canada, T6G 2E8 587-710-7073 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120906/5152ad42/attachment.html>
Tobias von Koch
2012-Sep-07 10:25 UTC
[LLVMdev] Get the filename on which a pass is running?
Hi Arnamoy, Since you're piping the bitcode into opt, there's no way of getting the file name because opt just reads from STDIN. Would it perhaps make more sense to ensure that your bitcode has debug information embedded (!dbg metadata) and use that to store a file name? Tobias On 07/09/2012 06:03, Arnamoy Bhattacharyya wrote:> Hi; > > I was wondering how can I get the name of the bitcode file on which I am > running the pass. I am making my pass as a loadable module. And if I > run my pass like this - > > opt -S -loops -load > /home/arnie/llvm-clang/llvm/Release+Asserts/lib/XYZ.so -xyz <b.bc> b1.bc > > I want to get b.bc in the pass. > > Thank you; > -- > Arnamoy Bhattacharyya > Athabasca Hall 143 > Department of Computing Science - University of Alberta > Edmonton, Alberta, Canada, T6G 2E8 > 587-710-7073 > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
Maybe Matching Threads
- [LLVMdev] "symbol lookup error" while running a Simple Loop Pass
- [LLVMdev] "symbol lookup error" while running a Simple Loop Pass
- [LLVMdev] Error While Inserting New Instruction to LLVM IR
- [LLVMdev] "symbol lookup error" while running a Simple Loop Pass
- [LLVMdev] llvm::ConstantArray::get(llvm::LLVMContext&, llvm::StringRef, bool) deprecated?