[PATCH] D52239: [OCaml] Add OCaml APIs to access DebugLoc info
Josh Berdine via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 9 10:47:19 PDT 2019
jberdine added a comment.
I have investigated trying to use LLVMGetMetadata instead of adding LLVMGetDebugLoc* functions, which is my understanding of @CodaFi's question. To summarize my (perhaps incorrect) understanding, on the one hand LLVMGetMetadata calls Instruction::getMetadata which returns Instruction::DbgLoc, a DILocation, cast to MDNode. On the other hand, LLVMGetDebugLocLine calls Instruction::getDebugLoc, a DILocation, and calls DILocation::getLine, which returns DILocation::SubclassData32. It does not seem possible to access that field using the MDNode api. To access such fields would seem to require exposing the class hierarchy below MDNode in LLVM-C. Does that align with your understanding?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D52239/new/
https://reviews.llvm.org/D52239
More information about the llvm-commits
mailing list