[PATCH] D19037: [llvm-c] Add the ability to create debug locations

whitequark via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 13 14:48:57 PDT 2016


whitequark added inline comments.

================
Comment at: include/llvm-c/Core.h:2790
@@ -2789,1 +2789,3 @@
 /* Metadata */
+LLVMValueRef LLVMCreateDebugLocation(LLVMContextRef C, unsigned Line,
+                                     unsigned Col, const LLVMValueRef Scope,
----------------
jketema wrote:
> AlexDenisov wrote:
> > Would not it be better to name it `LLVMCreateDILocation`? 
> > This way other methods from the DI family can be imported consistently.
> > Just a side note though :)
> I was trying to match the set and get functions below.
I second `LLVMCreateDILocation` suggestion

================
Comment at: lib/IR/Core.cpp:2315
@@ +2314,3 @@
+      Scope ? cast<MDNode>(unwrap<MetadataAsValue>(Scope)->getMetadata())
+            : nullptr;
+  MDNode *INode =
----------------
Factor out this cast, perhaps? I can see it happenning a lot.


http://reviews.llvm.org/D19037





More information about the llvm-commits mailing list