[llvm] r194770 - [llvm-c] Add missing const qualifiers to LLVMCreateTargetMachine

Peter Zotov whitequark at whitequark.org
Thu Nov 14 18:51:12 PST 2013


Author: whitequark
Date: Thu Nov 14 20:51:12 2013
New Revision: 194770

URL: http://llvm.org/viewvc/llvm-project?rev=194770&view=rev
Log:
[llvm-c] Add missing const qualifiers to LLVMCreateTargetMachine

Modified:
    llvm/trunk/include/llvm-c/TargetMachine.h
    llvm/trunk/lib/Target/TargetMachineC.cpp

Modified: llvm/trunk/include/llvm-c/TargetMachine.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/TargetMachine.h?rev=194770&r1=194769&r2=194770&view=diff
==============================================================================
--- llvm/trunk/include/llvm-c/TargetMachine.h (original)
+++ llvm/trunk/include/llvm-c/TargetMachine.h Thu Nov 14 20:51:12 2013
@@ -89,9 +89,9 @@ LLVMBool LLVMTargetHasAsmBackend(LLVMTar
 
 /*===-- 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. */

Modified: llvm/trunk/lib/Target/TargetMachineC.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetMachineC.cpp?rev=194770&r1=194769&r2=194770&view=diff
==============================================================================
--- llvm/trunk/lib/Target/TargetMachineC.cpp (original)
+++ llvm/trunk/lib/Target/TargetMachineC.cpp Thu Nov 14 20:51:12 2013
@@ -118,9 +118,10 @@ LLVMBool LLVMTargetHasAsmBackend(LLVMTar
   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:





More information about the llvm-commits mailing list