[llvm] [llvm-c] Add bindings for DbgRecord (PR #166383)
Orlando Cazalet-Hyams via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 6 07:22:47 PST 2025
================
@@ -3036,6 +3036,40 @@ LLVMDbgRecordRef LLVMGetPreviousDbgRecord(LLVMDbgRecordRef Rec) {
return wrap(&*--I);
}
+LLVMMetadataRef LLVMDbgRecordGetDebugLoc(LLVMDbgRecordRef Rec) {
+ return wrap(unwrap<DbgRecord>(Rec)->getDebugLoc().getAsMDNode());
+}
+
+LLVMDbgRecordKind LLVMDbgRecordGetKind(LLVMDbgRecordRef Rec) {
+ DbgRecord *Record = unwrap<DbgRecord>(Rec);
+ if (isa<DbgLabelRecord>(Record)) {
----------------
OCHyams wrote:
boring nit pick: please can we drop the braces on the single-line ifs? ([style guide](https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements))
https://github.com/llvm/llvm-project/pull/166383
More information about the llvm-commits
mailing list