Skip to content

Commit 65f81df

Browse files
authored
[Docs][DebugInfo] Summarise what people need to do for RemoveDIs now (#124725)
Replace the "what I need to do" section of the RemoveDIs docs with a paragraph about preserving start-of-block iterators. Hopefully this is concise enough to remain in peoples heads going forwards!
1 parent 8017ca1 commit 65f81df

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

llvm/docs/RemoveDIsDebugInfo.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,13 @@ The debug records are not instructions, do not appear in the instruction list, a
2424

2525
# Great, what do I need to do!
2626

27-
Very little -- we've already instrumented all of LLVM to handle these new records ("`DbgRecords`") and behave identically to past LLVM behaviour. This is currently being turned on by default, so that `DbgRecords` will be used by default in memory, IR, and bitcode.
27+
We've largely completed the migration. The remaining rough edge is that going forwards, instructions must be inserted into basic blocks using iterators rather than instruction pointers. In almost all circumstances you can just call `getIterator` on an instruction pointer -- however, if you call a function that returns the start of a basic block, such as:
28+
29+
1. BasicBlock::begin
30+
2. BasicBlock::getFirstNonPHIIt
31+
3. BasicBlock::getFirstInsertionPt
32+
33+
Then you must past that iterator into the insertion function without modification (the iterator carries a debug-info bit). That's all! Read on for a more detailed explanation.
2834

2935
## API Changes
3036

0 commit comments

Comments
 (0)