@@ -110,13 +110,16 @@ static bool IsNullTerminatedString(const Constant *C) {
110
110
return false ;
111
111
}
112
112
113
- // / SectionKindForGlobal - This is a top-level target-independent classifier for
113
+ // / getKindForGlobal - This is a top-level target-independent classifier for
114
114
// / a global variable. Given an global variable and information from TM, it
115
115
// / classifies the global in a variety of ways that make various target
116
116
// / implementations simpler. The target implementation is free to ignore this
117
117
// / extra info of course.
118
- static SectionKind SectionKindForGlobal (const GlobalValue *GV,
119
- const TargetMachine &TM) {
118
+ SectionKind TargetLoweringObjectFile::getKindForGlobal (const GlobalValue *GV,
119
+ const TargetMachine &TM){
120
+ assert (!GV->isDeclaration () && !GV->hasAvailableExternallyLinkage () &&
121
+ " Can only be used for global definitions" );
122
+
120
123
Reloc::Model ReloModel = TM.getRelocationModel ();
121
124
122
125
// Early exit - functions should be always in text sections.
@@ -227,13 +230,8 @@ static SectionKind SectionKindForGlobal(const GlobalValue *GV,
227
230
// / the specified global variable or function definition. This should not
228
231
// / be passed external (or available externally) globals.
229
232
const MCSection *TargetLoweringObjectFile::
230
- SectionForGlobal (const GlobalValue *GV, Mangler *Mang,
233
+ SectionForGlobal (const GlobalValue *GV, SectionKind Kind, Mangler *Mang,
231
234
const TargetMachine &TM) const {
232
- assert (!GV->isDeclaration () && !GV->hasAvailableExternallyLinkage () &&
233
- " Can only be used for global definitions" );
234
-
235
- SectionKind Kind = SectionKindForGlobal (GV, TM);
236
-
237
235
// Select section name.
238
236
if (GV->hasSection ()) {
239
237
// If the target has special section hacks for specifically named globals,
@@ -254,6 +252,7 @@ SectionForGlobal(const GlobalValue *GV, Mangler *Mang,
254
252
return SelectSectionForGlobal (GV, Kind, Mang, TM);
255
253
}
256
254
255
+
257
256
// Lame default implementation. Calculate the section name for global.
258
257
const MCSection *
259
258
TargetLoweringObjectFile::SelectSectionForGlobal (const GlobalValue *GV,
0 commit comments