Skip to content

Commit c82c0f9

Browse files
antonio-cortes-pereznvoorhies
authored andcommitted
[docs] Update ExtendingLLVM.rst
Updated file paths and function signatures in section "Adding a new type". Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D88049
1 parent ae3f54c commit c82c0f9

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

llvm/docs/ExtendingLLVM.rst

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -246,11 +246,11 @@ Adding a fundamental type
246246

247247
add enum for the new type; add static ``Type*`` for this type
248248

249-
#. ``llvm/lib/IR/Type.cpp`` and ``llvm/lib/IR/ValueTypes.cpp``:
249+
#. ``llvm/lib/IR/Type.cpp`` and ``llvm/lib/CodeGen/ValueTypes.cpp``:
250250

251251
add mapping from ``TypeID`` => ``Type*``; initialize the static ``Type*``
252252

253-
#. ``llvm/llvm/llvm-c/Core.cpp``:
253+
#. ``llvm/include/llvm-c/Core.h`` and ``llvm/lib/IR/Core.cpp``:
254254

255255
add enum ``LLVMTypeKind`` and modify
256256
``LLVMTypeKind LLVMGetTypeKind(LLVMTypeRef Ty)`` for the new type
@@ -265,12 +265,11 @@ Adding a fundamental type
265265

266266
#. ``llvm/lib/Bitcode/Writer/BitcodeWriter.cpp``:
267267

268-
modify ``static void WriteTypeTable(const ValueEnumerator &VE,
269-
BitstreamWriter &Stream)`` to serialize your type
268+
modify ``void ModuleBitcodeWriter::writeTypeTable()`` to serialize your type
270269

271270
#. ``llvm/lib/Bitcode/Reader/BitcodeReader.cpp``:
272271

273-
modify ``bool BitcodeReader::ParseTypeType()`` to read your data type
272+
modify ``Error BitcodeReader::parseTypeTableBody()`` to read your data type
274273

275274
#. ``include/llvm/Bitcode/LLVMBitCodes.h``:
276275

@@ -288,11 +287,11 @@ Adding a derived type
288287
add new class to represent new class in the hierarchy; add forward
289288
declaration to the TypeMap value type
290289

291-
#. ``llvm/lib/IR/Type.cpp`` and ``llvm/lib/IR/ValueTypes.cpp``:
290+
#. ``llvm/lib/IR/Type.cpp`` and ``llvm/lib/CodeGen/ValueTypes.cpp``:
292291

293292
add support for derived type, notably `enum TypeID` and `is`, `get` methods.
294293

295-
#. ``llvm/llvm/llvm-c/Core.cpp``:
294+
#. ``llvm/include/llvm-c/Core.h`` and ``llvm/lib/IR/Core.cpp``:
296295

297296
add enum ``LLVMTypeKind`` and modify
298297
`LLVMTypeKind LLVMGetTypeKind(LLVMTypeRef Ty)` for the new type
@@ -304,12 +303,11 @@ Adding a derived type
304303

305304
#. ``llvm/lib/Bitcode/Writer/BitcodeWriter.cpp``:
306305

307-
modify ``static void WriteTypeTable(const ValueEnumerator &VE,
308-
BitstreamWriter &Stream)`` to serialize your type
306+
modify ``void ModuleBitcodeWriter::writeTypeTable()`` to serialize your type
309307

310308
#. ``llvm/lib/Bitcode/Reader/BitcodeReader.cpp``:
311309

312-
modify ``bool BitcodeReader::ParseTypeType()`` to read your data type
310+
modify ``Error BitcodeReader::parseTypeTableBody()`` to read your data type
313311

314312
#. ``include/llvm/Bitcode/LLVMBitCodes.h``:
315313

0 commit comments

Comments
 (0)