From fa74752298602e0b74fb60ce3f0e76d0c461d3d8 Mon Sep 17 00:00:00 2001 From: Peter Zotov Date: Fri, 15 Nov 2013 02:51:12 +0000 Subject: [PATCH] [llvm-c] Add missing const qualifiers to LLVMCreateTargetMachine git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194770 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm-c/TargetMachine.h | 6 +++--- lib/Target/TargetMachineC.cpp | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/llvm-c/TargetMachine.h b/include/llvm-c/TargetMachine.h index 15d664f54cf..e1594113949 100644 --- a/include/llvm-c/TargetMachine.h +++ b/include/llvm-c/TargetMachine.h @@ -89,9 +89,9 @@ LLVMBool LLVMTargetHasAsmBackend(LLVMTargetRef T); /*===-- Target Machine ----------------------------------------------------===*/ /** Creates a new llvm::TargetMachine. See llvm::Target::createTargetMachine */ -LLVMTargetMachineRef LLVMCreateTargetMachine(LLVMTargetRef T, char *Triple, - char *CPU, char *Features, LLVMCodeGenOptLevel Level, LLVMRelocMode Reloc, - LLVMCodeModel CodeModel); +LLVMTargetMachineRef LLVMCreateTargetMachine(LLVMTargetRef T, + const char *Triple, const char *CPU, const char *Features, + LLVMCodeGenOptLevel Level, LLVMRelocMode Reloc, LLVMCodeModel CodeModel); /** Dispose the LLVMTargetMachineRef instance generated by LLVMCreateTargetMachine. */ diff --git a/lib/Target/TargetMachineC.cpp b/lib/Target/TargetMachineC.cpp index 061d0e9e189..e111380c628 100644 --- a/lib/Target/TargetMachineC.cpp +++ b/lib/Target/TargetMachineC.cpp @@ -118,9 +118,10 @@ LLVMBool LLVMTargetHasAsmBackend(LLVMTargetRef T) { return unwrap(T)->hasMCAsmBackend(); } -LLVMTargetMachineRef LLVMCreateTargetMachine(LLVMTargetRef T, char* Triple, - char* CPU, char* Features, LLVMCodeGenOptLevel Level, LLVMRelocMode Reloc, - LLVMCodeModel CodeModel) { +LLVMTargetMachineRef LLVMCreateTargetMachine(LLVMTargetRef T, + const char* Triple, const char* CPU, const char* Features, + LLVMCodeGenOptLevel Level, LLVMRelocMode Reloc, + LLVMCodeModel CodeModel) { Reloc::Model RM; switch (Reloc){ case LLVMRelocStatic: