@@ -70,7 +70,9 @@ namespace llvm {
70
70
71
71
typedef MCAsmInfo *(*MCAsmInfoCtorFnTy)(const Target &T,
72
72
StringRef TT);
73
- typedef MCCodeGenInfo *(*MCCodeGenInfoCtorFnTy)(StringRef TT, Reloc::Model M);
73
+ typedef MCCodeGenInfo *(*MCCodeGenInfoCtorFnTy)(StringRef TT,
74
+ Reloc::Model RM,
75
+ CodeModel::Model CM);
74
76
typedef MCInstrInfo *(*MCInstrInfoCtorFnTy)(void );
75
77
typedef MCRegisterInfo *(*MCRegInfoCtorFnTy)(StringRef TT);
76
78
typedef MCSubtargetInfo *(*MCSubtargetInfoCtorFnTy)(StringRef TT,
@@ -80,7 +82,8 @@ namespace llvm {
80
82
StringRef TT,
81
83
StringRef CPU,
82
84
StringRef Features,
83
- Reloc::Model RM);
85
+ Reloc::Model RM,
86
+ CodeModel::Model CM);
84
87
typedef AsmPrinter *(*AsmPrinterCtorTy)(TargetMachine &TM,
85
88
MCStreamer &Streamer);
86
89
typedef TargetAsmBackend *(*AsmBackendCtorTy)(const Target &T,
@@ -263,10 +266,11 @@ namespace llvm {
263
266
264
267
// / createMCCodeGenInfo - Create a MCCodeGenInfo implementation.
265
268
// /
266
- MCCodeGenInfo *createMCCodeGenInfo (StringRef Triple, Reloc::Model M) const {
269
+ MCCodeGenInfo *createMCCodeGenInfo (StringRef Triple, Reloc::Model RM,
270
+ CodeModel::Model CM) const {
267
271
if (!MCCodeGenInfoCtorFn)
268
272
return 0 ;
269
- return MCCodeGenInfoCtorFn (Triple, M );
273
+ return MCCodeGenInfoCtorFn (Triple, RM, CM );
270
274
}
271
275
272
276
// / createMCInstrInfo - Create a MCInstrInfo implementation.
@@ -309,11 +313,12 @@ namespace llvm {
309
313
// / either the target triple from the module, or the target triple of the
310
314
// / host if that does not exist.
311
315
TargetMachine *createTargetMachine (StringRef Triple, StringRef CPU,
312
- StringRef Features,
313
- Reloc::Model RM = Reloc::Default) const {
316
+ StringRef Features,
317
+ Reloc::Model RM = Reloc::Default,
318
+ CodeModel::Model CM = CodeModel::Default) const {
314
319
if (!TargetMachineCtorFn)
315
320
return 0 ;
316
- return TargetMachineCtorFn (*this , Triple, CPU, Features, RM);
321
+ return TargetMachineCtorFn (*this , Triple, CPU, Features, RM, CM );
317
322
}
318
323
319
324
// / createAsmBackend - Create a target specific assembly parser.
@@ -802,7 +807,8 @@ namespace llvm {
802
807
TargetRegistry::RegisterMCCodeGenInfo (T, &Allocator);
803
808
}
804
809
private:
805
- static MCCodeGenInfo *Allocator (StringRef TT, Reloc::Model M) {
810
+ static MCCodeGenInfo *Allocator (StringRef TT,
811
+ Reloc::Model RM, CodeModel::Model CM) {
806
812
return new MCCodeGenInfoImpl ();
807
813
}
808
814
};
@@ -938,8 +944,9 @@ namespace llvm {
938
944
private:
939
945
static TargetMachine *Allocator (const Target &T, StringRef TT,
940
946
StringRef CPU, StringRef FS,
941
- Reloc::Model RM) {
942
- return new TargetMachineImpl (T, TT, CPU, FS, RM);
947
+ Reloc::Model RM,
948
+ CodeModel::Model CM) {
949
+ return new TargetMachineImpl (T, TT, CPU, FS, RM, CM);
943
950
}
944
951
};
945
952
0 commit comments