[PATCH] Additional features for the C API
Peter Zotov
whitequark at whitequark.org
Tue Oct 29 14:27:13 PDT 2013
================
Comment at: lib/Target/TargetMachineC.cpp:287
@@ +286,3 @@
+
+void LLVMSetTargetMachineASMVerbosity(LLVMTargetMachineRef Machine,
+ int Boolean) {
----------------
Doesn't match the prototype (ASM/Asm)
================
Comment at: include/llvm-c/TargetMachine.h:141
@@ +140,3 @@
+/** Create a new triple object from a string. */
+LLVMTripleRef LLVMCreateTriple(const char* String);
+
----------------
There's no corresponding deallocation function for a triple, if I'm not mistaken.
================
Comment at: include/llvm-c/TargetMachine.h:76
@@ +75,3 @@
+/** Returns the target corresponding to the given triple. */
+LLVMTargetRef LLVMGetTargetFromTriple(LLVMTripleRef Triple,
+ char **ErrorMessage);
----------------
Extra space after LLVMTargetRef
================
Comment at: include/llvm-c/TargetMachine.h:137
@@ +136,3 @@
+void LLVMSetTargetMachineAsmVerbosity(LLVMTargetMachineRef Machine,
+ int Boolean);
+
----------------
Perhaps LLVMBool instead of int?
================
Comment at: lib/Target/TargetMachineC.cpp:288
@@ +287,3 @@
+void LLVMSetTargetMachineASMVerbosity(LLVMTargetMachineRef Machine,
+ int Boolean) {
+ unwrap(Machine)->setAsmVerbosityDefault(Boolean);
----------------
See above about LLVMBool
================
Comment at: include/llvm-c/Core.h:1209
@@ +1208,3 @@
+ */
+void LLVMPrintValue(LLVMValueRef Val, int FD);
+
----------------
Sorry to repeat myself, but why not LLVMPrintValueToFD? That would be much more consistent with other similar functions.
http://llvm-reviews.chandlerc.com/D1960
More information about the llvm-commits
mailing list