To be a better me via llvm-dev
2017-Jun-30 08:41 UTC
[llvm-dev] The doubt to LLVM.org-How to add the new type?
Hello: Looking at your official website, I have a little doubt. I would be very happy if I could get your help.. I'm adding a new type for LLVM, the Bit type.In the sixth step in the steps of adding a primitive type to the website. what does it mean to add a token for that type? Can you explain it for me or send me a relevant example? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170630/e879d63e/attachment.html>
陳韋任 via llvm-dev
2017-Jun-30 12:55 UTC
[llvm-dev] The doubt to LLVM.org-How to add the new type?
> I'm adding a new type for LLVM, the Bit type.In the sixth step in > the steps of adding a primitive type to the website. what does it mean to > add a token for that type? Can you explain it for me or send me a relevant > example?I believe you're reading [1], right? The step you're asking about is making tool like `llvm-as` be able to recognize and parser the type you added, just like original LLVM primitive type i8, float, void, ... etc. Please search Type in LLLexer.cpp/LLLexer.h and LLParser.cpp/LLParser.h. For example, take look on LLParser::ParseType. [1] http://llvm.org/docs/ExtendingLLVM.html#adding-a-fundamental-type HTH, chenwj -- Wei-Ren Chen (陳韋任) Homepage: https://people.cs.nctu.edu.tw/~chenwj