[PATCH] D19448: Introducing LLVMMetadataRef

Jakob Bornecrantz via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 25 14:50:27 PDT 2016


Wallbraker added a comment.

So they are completely redoing[1] the debug info interface which this is a precursor for, so I dunno how much benefit this will give us right now.

I do like this commit otherwise, some small nitpicks.

[1] http://lists.llvm.org/pipermail/llvm-dev/2016-March/097773.html


================
Comment at: include/llvm/IR/Value.h:793
@@ -792,4 +792,3 @@
 
-/* Specialized opaque value conversions.
- */
+// Specialized opaque value conversions.
 inline Value **unwrap(LLVMValueRef *Vals) {
----------------
Unrelated NFC.

================
Comment at: lib/IR/Core.cpp:770
@@ -769,4 +769,3 @@
 LLVMValueRef LLVMConstPointerNull(LLVMTypeRef Ty) {
-  return
-      wrap(ConstantPointerNull::get(unwrap<PointerType>(Ty)));
+  return wrap(ConstantPointerNull::get(unwrap<PointerType>(Ty)));
 }
----------------
Unrelated NFC.

================
Comment at: lib/IR/Core.cpp:818
@@ +817,3 @@
+LLVMValueRef LLVMMetadataAsValue(LLVMContextRef C, LLVMMetadataRef MD) {
+  return wrap(MetadataAsValue::get(*unwrap(C), unwrap(MD)));
+}
----------------
Shouldn't we do a similar smart unwrap that we do with ValueAsMetadata, turning constants into real constants?


http://reviews.llvm.org/D19448





More information about the llvm-commits mailing list