llvm.org GIT mirror llvm / 21a996a
MC: MCCodeGenInfo naming update. NFC. s/InitMCCodeGenInfo/initMCCodeGenInfo/ git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237471 91177308-0d34-0410-b5e6-96231b3b80d8 Jim Grosbach 4 years ago
17 changed file(s) with 18 addition(s) and 18 deletion(s). Raw diff Collapse all Expand all
3232 CodeGenOpt::Level OptLevel;
3333
3434 public:
35 void InitMCCodeGenInfo(Reloc::Model RM = Reloc::Default,
35 void initMCCodeGenInfo(Reloc::Model RM = Reloc::Default,
3636 CodeModel::Model CM = CodeModel::Default,
3737 CodeGenOpt::Level OL = CodeGenOpt::Default);
3838
2424 RawSymbol->getDataBytes(bytes);
2525 }
2626
27 void PDBSymbolCustom::dump(PDBSymDumper &Dumper) const { Dumper.dump(*this); }
27 void PDBSymbolCustom::dump(PDBSymDumper &Dumper) const { Dumper.dump(*this); }
2323 return Session.getSymbolById(getTypeId());
2424 }
2525
26 void PDBSymbolData::dump(PDBSymDumper &Dumper) const { Dumper.dump(*this); }
26 void PDBSymbolData::dump(PDBSymDumper &Dumper) const { Dumper.dump(*this); }
1414 #include "llvm/MC/MCCodeGenInfo.h"
1515 using namespace llvm;
1616
17 void MCCodeGenInfo::InitMCCodeGenInfo(Reloc::Model RM, CodeModel::Model CM,
17 void MCCodeGenInfo::initMCCodeGenInfo(Reloc::Model RM, CodeModel::Model CM,
1818 CodeGenOpt::Level OL) {
1919 RelocationModel = RM;
2020 CMModel = CM;
104104 RM = Reloc::Static;
105105
106106 MCCodeGenInfo *X = new MCCodeGenInfo();
107 X->InitMCCodeGenInfo(RM, CM, OL);
107 X->initMCCodeGenInfo(RM, CM, OL);
108108 return X;
109109 }
110110
304304 // Default relocation model on Darwin is PIC, not DynamicNoPIC.
305305 RM = TheTriple.isOSDarwin() ? Reloc::PIC_ : Reloc::DynamicNoPIC;
306306 }
307 X->InitMCCodeGenInfo(RM, CM, OL);
307 X->initMCCodeGenInfo(RM, CM, OL);
308308 return X;
309309 }
310310
5656 CodeModel::Model CM,
5757 CodeGenOpt::Level OL) {
5858 MCCodeGenInfo *X = new MCCodeGenInfo();
59 X->InitMCCodeGenInfo(RM, CM, OL);
59 X->initMCCodeGenInfo(RM, CM, OL);
6060 return X;
6161 }
6262
7171 MCCodeGenInfo *X = new MCCodeGenInfo();
7272 // For the time being, use static relocations, since there's really no
7373 // support for PIC yet.
74 X->InitMCCodeGenInfo(Reloc::Static, CM, OL);
74 X->initMCCodeGenInfo(Reloc::Static, CM, OL);
7575 return X;
7676 }
7777
5353 CodeModel::Model CM,
5454 CodeGenOpt::Level OL) {
5555 MCCodeGenInfo *X = new MCCodeGenInfo();
56 X->InitMCCodeGenInfo(RM, CM, OL);
56 X->initMCCodeGenInfo(RM, CM, OL);
5757 return X;
5858 }
5959
9292 RM = Reloc::Static;
9393 else if (RM == Reloc::Default)
9494 RM = Reloc::PIC_;
95 X->InitMCCodeGenInfo(RM, CM, OL);
95 X->initMCCodeGenInfo(RM, CM, OL);
9696 return X;
9797 }
9898
5353 static MCCodeGenInfo *createNVPTXMCCodeGenInfo(
5454 StringRef TT, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL) {
5555 MCCodeGenInfo *X = new MCCodeGenInfo();
56 X->InitMCCodeGenInfo(RM, CM, OL);
56 X->initMCCodeGenInfo(RM, CM, OL);
5757 return X;
5858 }
5959
107107 (T.getArch() == Triple::ppc64 || T.getArch() == Triple::ppc64le))
108108 CM = CodeModel::Medium;
109109 }
110 X->InitMCCodeGenInfo(RM, CM, OL);
110 X->initMCCodeGenInfo(RM, CM, OL);
111111 return X;
112112 }
113113
5959 CodeModel::Model CM,
6060 CodeGenOpt::Level OL) {
6161 MCCodeGenInfo *X = new MCCodeGenInfo();
62 X->InitMCCodeGenInfo(RM, CM, OL);
62 X->initMCCodeGenInfo(RM, CM, OL);
6363 return X;
6464 }
6565
9696 case CodeModel::JITDefault: CM = CodeModel::Small; break;
9797 }
9898
99 X->InitMCCodeGenInfo(RM, CM, OL);
99 X->initMCCodeGenInfo(RM, CM, OL);
100100 return X;
101101 }
102102
117117 break;
118118 }
119119
120 X->InitMCCodeGenInfo(RM, CM, OL);
120 X->initMCCodeGenInfo(RM, CM, OL);
121121 return X;
122122 }
123123
203203 CM = CodeModel::Small;
204204 else if (CM == CodeModel::JITDefault)
205205 CM = RM == Reloc::PIC_ ? CodeModel::Small : CodeModel::Medium;
206 X->InitMCCodeGenInfo(RM, CM, OL);
206 X->initMCCodeGenInfo(RM, CM, OL);
207207 return X;
208208 }
209209
202202 // 64-bit JIT places everything in the same buffer except external funcs.
203203 CM = is64Bit ? CodeModel::Large : CodeModel::Small;
204204
205 X->InitMCCodeGenInfo(RM, CM, OL);
205 X->initMCCodeGenInfo(RM, CM, OL);
206206 return X;
207207 }
208208
7676 if (CM != CodeModel::Small && CM != CodeModel::Large)
7777 report_fatal_error("Target only supports CodeModel Small or Large");
7878
79 X->InitMCCodeGenInfo(RM, CM, OL);
79 X->initMCCodeGenInfo(RM, CM, OL);
8080 return X;
8181 }
8282