Code view debug info type records are emitted as a set of directives. Comments describing these records were previously emitted all together for each record at the end of the record. With this change, every directive representing a sub-field of a type record is augmented with a comment describing the sub field.
Details
Diff Detail
- Repository
- rLLDB LLDB
Event Timeline
llvm/include/llvm/DebugInfo/CodeView/CodeViewRecordIO.h | ||
---|---|---|
63 | Is it possible to change these all to accept const Twine &Comment = ""? I think string literals are meant to be implicitly convertible to Twine. Generally in LLVM StringRef is preferred over const char *. We have some documentation for this here: I think for this API where the string length is unlikely to be used at all, Twine makes sense, but across LLVM C strings are generally avoided if possible. |
String parameter passing is done using Twine instead of using C strings, as suggested in the review
llvm/include/llvm/DebugInfo/CodeView/CodeViewRecordIO.h | ||
---|---|---|
63 | Got it. Have made the changes & updated the patch. |
Corrected comments for codeview type record from "NumAttributes" to "AccessSpecifier"
Is it possible to change these all to accept const Twine &Comment = ""? I think string literals are meant to be implicitly convertible to Twine.
Generally in LLVM StringRef is preferred over const char *. We have some documentation for this here:
https://llvm.org/docs/ProgrammersManual.html#passing-strings-the-stringref-and-twine-classes
I think for this API where the string length is unlikely to be used at all, Twine makes sense, but across LLVM C strings are generally avoided if possible.