[llvm-dev] The doubt to LLVM.org-How to add the new type?

陳韋任 via llvm-dev llvm-dev at lists.llvm.org
Fri Jun 30 05:55:00 PDT 2017


>       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


More information about the llvm-dev mailing list