github.com/llir/llvm@v0.3.6/howto_update_llvm.md (about)

     1  # How to update `llir/llvm` to support newer versions of LLVM
     2  
     3  This document aims to describe the approach taken to update `llir/llvm` to support newer versions of the official LLVM release, as in, how to update from LLVM 8.0 to LLVM 9.0.
     4  
     5  For now, we collect links to issues, PR and comments which describe the actions taken, and given example commits for adding new enums, updating the grammar, translating the AST to IR, updating the test cases, etc.
     6  
     7  ## Test cases
     8  
     9  To ensure `llir/llvm` is following the LLVM specification, we rely on the test cases of the official LLVM distribution. To update these test cases when a new version of LLVM is released, do as described in [this comment of issue #105](https://github.com/llir/llvm/issues/105#issuecomment-548619916).
    10  
    11  ## How to compare ASM update
    12  
    13  ```sh
    14  $ wget https://github.com/llvm/llvm-project/archive/llvmorg-10.0.0.tar.gz
    15  $ wget https://github.com/llvm/llvm-project/archive/llvmorg-11.0.0.tar.gz
    16  $ tar zxf llvmorg-10.0.0.tar.gz
    17  $ tar zxf llvmorg-11.0.0.tar.gz
    18  $ git diff llvm-project-llvmorg-10.0.0/llvm/lib/AsmParser llvm-project-llvmorg-11.0.0/llvm/lib/AsmParser
    19  ```
    20  
    21  ## API Mapping
    22  
    23  | c++                | go(llir/llvm)      |
    24  | ------------------ | ------------------ |
    25  | MDField            | Field              |
    26  | MDSignedOrMDField  | FieldOrInt         |
    27  | MDSignedField      | int64              |
    28  | APSIntField        | uint64             |
    29  | LineField          | int64              |
    30  | MDBoolField        | bool               |
    31  | MDStringField      | string             |
    32  | NameTableKindField | enum.NameTableKind |
    33  | DwarfTagField      | enum.DwarfTag      |