[PATCH] C API: implement LLVM{Get,Set}InstructionAlignment

Anders Waldenborg anders at 0x63.nu
Sun Oct 27 12:31:16 PDT 2013


  Looks good. Some nitpicking inline.


================
Comment at: lib/IR/Core.cpp:1812
@@ +1811,3 @@
+  Value *P = unwrap<Value>(V);
+  if (GlobalValue* GV = dyn_cast<GlobalValue>(P))
+    return GV->getAlignment();
----------------
Placement of * is inconsistent.

================
Comment at: include/llvm-c/Core.h:2348
@@ +2347,3 @@
+ * Obtain the preferred alignment of the value.
+ */
+unsigned LLVMGetAlignment(LLVMValueRef V);
----------------
documentation, nice!

Most other doxygen comments refer to the c++ methods, e.g: "@see llvm::CallInst::setCallingConv()"

================
Comment at: lib/IR/Core.cpp:1824
@@ +1823,3 @@
+  Value *P = unwrap<Value>(V);
+  if (GlobalValue* GV = dyn_cast<GlobalValue>(P))
+    GV->setAlignment(Bytes);
----------------
*


http://llvm-reviews.chandlerc.com/D1910



More information about the llvm-commits mailing list