Index: bindings/ocaml/transforms/scalar/scalar_opts_ocaml.c =================================================================== --- bindings/ocaml/transforms/scalar/scalar_opts_ocaml.c +++ bindings/ocaml/transforms/scalar/scalar_opts_ocaml.c @@ -106,7 +106,7 @@ /* [ unit */ CAMLprim value llvm_add_memory_to_register_demotion(LLVMPassManagerRef PM) { - LLVMAddDemoteMemoryToRegisterPass(PM); + LLVMAddDemoteRegisterToMemoryPass(PM); return Val_unit; } Index: include/llvm-c/Transforms/Scalar.h =================================================================== --- include/llvm-c/Transforms/Scalar.h +++ include/llvm-c/Transforms/Scalar.h @@ -105,8 +105,8 @@ /** See llvm::createConstantPropagationPass function. */ void LLVMAddConstantPropagationPass(LLVMPassManagerRef PM); -/** See llvm::demotePromoteMemoryToRegisterPass function. */ -void LLVMAddDemoteMemoryToRegisterPass(LLVMPassManagerRef PM); +/** See llvm::createDemoteRegisterToMemoryPass function. */ +void LLVMAddDemoteRegisterToMemoryPass(LLVMPassManagerRef PM); /** See llvm::createVerifierPass function. */ void LLVMAddVerifierPass(LLVMPassManagerRef PM); Index: lib/Transforms/Scalar/Scalar.cpp =================================================================== --- lib/Transforms/Scalar/Scalar.cpp +++ lib/Transforms/Scalar/Scalar.cpp @@ -164,7 +164,7 @@ unwrap(PM)->add(createConstantPropagationPass()); } -void LLVMAddDemoteMemoryToRegisterPass(LLVMPassManagerRef PM) { +void LLVMAddDemoteRegisterToMemoryPass(LLVMPassManagerRef PM) { unwrap(PM)->add(createDemoteRegisterToMemoryPass()); }