Carl-Philip Hänsch
2011-Sep-25 11:20 UTC
[LLVMdev] Placeholders in the target data layout
Hello, I have to use the target data layout for my compiler to make the native linker work. But the target data layout is target specific. My bitcode file should not be. The only critical thing in the layout is the pointer size: "p:32:32" vs "p:64:64". Is there a way to use placeholders to insert the bit width of a pointer at a very late stage? It would be uncool when the platform independence of a bitcode file fails at _one_ single line. Cheers -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110925/04131c3a/attachment.html>
Hi Carl-Philip,> I have to use the target data layout for my compiler to make the native linker > work. But the target data layout is target specific.so is the native linker, presumably. What are you trying to do exactly? My bitcode file should not> be. The only critical thing in the layout is the pointer size: "p:32:32" vs > "p:64:64". Is there a way to use placeholders to insert the bit width of a > pointer at a very late stage?You can simply not provide a target layout initially, and add it when you are about to do something target specific (see setDataLayout and setTargetTriple in Module.h). Ciao, Duncan. It would be uncool when the platform independence> of a bitcode file fails at _one_ single line. > > Cheers > > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev