summaryrefslogtreecommitdiff
path: root/bindings
diff options
context:
space:
mode:
authorTorok Edwin <edwintorok@gmail.com>2011-10-14 20:37:42 +0000
committerTorok Edwin <edwintorok@gmail.com>2011-10-14 20:37:42 +0000
commit31116410de16f435d8c76c53e3d6b95fa812cd2c (patch)
tree1936682739324df5681ab7843c53f6a77e7fa7b7 /bindings
parentb10946a5a938a433ca4d7301b8b5ff5a8c11a7ff (diff)
downloadllvm-31116410de16f435d8c76c53e3d6b95fa812cd2c.tar.gz
llvm-31116410de16f435d8c76c53e3d6b95fa812cd2c.tar.bz2
llvm-31116410de16f435d8c76c53e3d6b95fa812cd2c.tar.xz
bindings: tab and indentation fixes of my previous commits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141989 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'bindings')
-rw-r--r--bindings/ocaml/llvm/llvm_ocaml.c62
1 files changed, 31 insertions, 31 deletions
diff --git a/bindings/ocaml/llvm/llvm_ocaml.c b/bindings/ocaml/llvm/llvm_ocaml.c
index dd8cb16544..21519d474d 100644
--- a/bindings/ocaml/llvm/llvm_ocaml.c
+++ b/bindings/ocaml/llvm/llvm_ocaml.c
@@ -295,15 +295,15 @@ CAMLprim LLVMTypeRef llvm_packed_struct_type(LLVMContextRef C,
/* lltype -> string option */
CAMLprim value llvm_struct_name(LLVMTypeRef Ty)
{
- CAMLparam0();
- const char *C = LLVMGetStructName(Ty);
- if (C) {
- CAMLlocal1(result);
- result = caml_alloc_small(1, 0);
- Store_field(result, 0, caml_copy_string(C));
- CAMLreturn(result);
- }
- CAMLreturn(Val_int(0));
+ CAMLparam0();
+ const char *C = LLVMGetStructName(Ty);
+ if (C) {
+ CAMLlocal1(result);
+ result = caml_alloc_small(1, 0);
+ Store_field(result, 0, caml_copy_string(C));
+ CAMLreturn(result);
+ }
+ CAMLreturn(Val_int(0));
}
/* lltype -> lltype array */
@@ -475,20 +475,20 @@ CAMLprim LLVMValueRef llvm_mdnode(LLVMContextRef C, value ElementVals) {
/* llvalue -> string option */
CAMLprim value llvm_get_mdstring(LLVMValueRef V) {
- CAMLparam0();
- const char *S;
- unsigned Len;
-
- if ((S = LLVMGetMDString(V, &Len))) {
- CAMLlocal2(Option, Str);
-
- Str = caml_alloc_string(Len);
- memcpy(String_val(Str), S, Len);
- Option = alloc(1,0);
- Store_field(Option, 0, Str);
- CAMLreturn(Option);
- }
- CAMLreturn(Val_int(0));
+ CAMLparam0();
+ const char *S;
+ unsigned Len;
+
+ if ((S = LLVMGetMDString(V, &Len))) {
+ CAMLlocal2(Option, Str);
+
+ Str = caml_alloc_string(Len);
+ memcpy(String_val(Str), S, Len);
+ Option = alloc(1,0);
+ Store_field(Option, 0, Str);
+ CAMLreturn(Option);
+ }
+ CAMLreturn(Val_int(0));
}
CAMLprim value llvm_get_namedmd(LLVMModuleRef M, value name)
@@ -1016,14 +1016,14 @@ DEFINE_ITERATORS(instr, Instruction, LLVMBasicBlockRef, LLVMValueRef,
/* llvalue -> ICmp.t */
CAMLprim value llvm_instr_icmp_predicate(LLVMValueRef Val) {
- CAMLparam0();
- int x = LLVMGetICmpPredicate(Val);
- if (x) {
- value Option = alloc(1, 0);
- Field(Option, 0) = Val_int(x - LLVMIntEQ);
- CAMLreturn(Option);
- }
- CAMLreturn(Val_int(0));
+ CAMLparam0();
+ int x = LLVMGetICmpPredicate(Val);
+ if (x) {
+ value Option = alloc(1, 0);
+ Field(Option, 0) = Val_int(x - LLVMIntEQ);
+ CAMLreturn(Option);
+ }
+ CAMLreturn(Val_int(0));
}