This also fixes the condition in the assertion in DwarfCompileUnit::getLabelBegin() because it checked something unrelated to the returned value.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
| llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h | ||
|---|---|---|
| 302 | can you add an && "some meaningful message" to hint at what went wrong? | |
| llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h | ||
|---|---|---|
| 60 | Is this used before its initialization - generally nice not to prematurely initiliaze things, because it thwarts checking like msan that might find bugs if this isn't intended to be used until after some other initialization. | |
| llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h | ||
|---|---|---|
| 60 | LabelBegin is initialized under a condition, not in the constructor, thus, it can be left uninitialized. If we rely on MSan, the assert in getLabelBegin() is useless and vice versa. | |
| 302 | Nothing more meaningful than "LabelBegin is not initialized" comes to me, but that would be a tautology. Any suggestions? | |
| llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h | ||
|---|---|---|
| 60 | Fair enough - thanks for the explanation! | |
Is this used before its initialization - generally nice not to prematurely initiliaze things, because it thwarts checking like msan that might find bugs if this isn't intended to be used until after some other initialization.