llvm.org GIT mirror llvm / 6c2f9e1
eliminate AsmPrinter::SwitchToSection and just have clients talk to the MCStreamer directly instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79405 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 11 years ago
19 changed file(s) with 168 addition(s) and 139 deletion(s). Raw diff Collapse all Expand all
157157 ///
158158 bool isVerbose() const { return VerboseAsm; }
159159
160 /// SwitchToSection - Switch to the specified section of the executable if
161 /// we are not already in it!
162 void SwitchToSection(const MCSection *NS);
163
164160 /// getGlobalLinkName - Returns the asm/link name of of the specified
165161 /// global variable. Should be overridden by each target asm printer to
166162 /// generate the appropriate value.
7979 return TM.getTargetLowering()->getObjFileLowering();
8080 }
8181
82 /// SwitchToSection - Switch to the specified section of the executable if we
83 /// are not already in it!
84 void AsmPrinter::SwitchToSection(const MCSection *NS) {
85 assert(NS != 0 && "Must specify a section to switch to");
86 OutStreamer.SwitchSection(NS);
87 }
88
8982 /// getCurrentSection() - Return the current section we are emitting to.
9083 const MCSection *AsmPrinter::getCurrentSection() const {
9184 return OutStreamer.getCurrentSection();
299292
300293 // Now print stuff into the calculated sections.
301294 for (unsigned i = 0, e = CPSections.size(); i != e; ++i) {
302 SwitchToSection(CPSections[i].S);
295 OutStreamer.SwitchSection(CPSections[i].S);
303296 EmitAlignment(Log2_32(CPSections[i].Alignment));
304297
305298 unsigned Offset = 0;
353346 // function body itself, otherwise the label differences won't make sense.
354347 // We should also do if the section name is NULL or function is declared in
355348 // discardable section.
356 SwitchToSection(getObjFileLowering().SectionForGlobal(F, Mang, TM));
349 OutStreamer.SwitchSection(getObjFileLowering().SectionForGlobal(F, Mang,
350 TM));
357351 } else {
358352 // Otherwise, drop it in the readonly section.
359353 const MCSection *ReadOnlySection =
360354 getObjFileLowering().getSectionForConstant(SectionKind::getReadOnly());
361 SwitchToSection(ReadOnlySection);
355 OutStreamer.SwitchSection(ReadOnlySection);
362356 JTInDiffSection = true;
363357 }
364358
457451 const TargetData *TD = TM.getTargetData();
458452 unsigned Align = Log2_32(TD->getPointerPrefAlignment());
459453 if (GV->getName() == "llvm.global_ctors") {
460 SwitchToSection(getObjFileLowering().getStaticCtorSection());
454 OutStreamer.SwitchSection(getObjFileLowering().getStaticCtorSection());
461455 EmitAlignment(Align, 0);
462456 EmitXXStructorList(GV->getInitializer());
463457 return true;
464458 }
465459
466460 if (GV->getName() == "llvm.global_dtors") {
467 SwitchToSection(getObjFileLowering().getStaticDtorSection());
461 OutStreamer.SwitchSection(getObjFileLowering().getStaticDtorSection());
468462 EmitAlignment(Align, 0);
469463 EmitXXStructorList(GV->getInitializer());
470464 return true;
1414 #include "llvm/Module.h"
1515 #include "llvm/CodeGen/MachineModuleInfo.h"
1616 #include "llvm/MC/MCSection.h"
17 #include "llvm/MC/MCStreamer.h"
1718 #include "llvm/Target/TargetAsmInfo.h"
1819 #include "llvm/Target/TargetData.h"
1920 #include "llvm/Target/TargetFrameInfo.h"
786787 std::string LinkageName;
787788 GV.getLinkageName(LinkageName);
788789 if (!LinkageName.empty()) {
789 // Skip special LLVM prefix that is used to inform the asm printer to not emit
790 // usual symbol prefix before the symbol name. This happens for Objective-C
791 // symbol names and symbol whose name is replaced using GCC's __asm__ attribute.
790 // Skip special LLVM prefix that is used to inform the asm printer to not
791 // emit usual symbol prefix before the symbol name. This happens for
792 // Objective-C symbol names and symbol whose name is replaced using GCC's
793 // __asm__ attribute.
792794 if (LinkageName[0] == 1)
793795 LinkageName = &LinkageName[1];
794796 AddString(GVDie, dwarf::DW_AT_MIPS_linkage_name, dwarf::DW_FORM_string,
13611363 DebugTimer->startTimer();
13621364
13631365 // Standard sections final addresses.
1364 Asm->SwitchToSection(Asm->getObjFileLowering().getTextSection());
1366 Asm->OutStreamer.SwitchSection(Asm->getObjFileLowering().getTextSection());
13651367 EmitLabel("text_end", 0);
1366 Asm->SwitchToSection(Asm->getObjFileLowering().getDataSection());
1368 Asm->OutStreamer.SwitchSection(Asm->getObjFileLowering().getDataSection());
13671369 EmitLabel("data_end", 0);
13681370
13691371 // End text sections.
13701372 for (unsigned i = 1, N = SectionMap.size(); i <= N; ++i) {
1371 Asm->SwitchToSection(SectionMap[i]);
1373 Asm->OutStreamer.SwitchSection(SectionMap[i]);
13721374 EmitLabel("section_end", i);
13731375 }
13741376
18621864 if (didInitial) return;
18631865 didInitial = true;
18641866
1867 const TargetLoweringObjectFile &TLOF = Asm->getObjFileLowering();
1868
18651869 // Dwarf sections base addresses.
18661870 if (TAI->doesDwarfRequireFrameSection()) {
1867 Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfFrameSection());
1871 Asm->OutStreamer.SwitchSection(TLOF.getDwarfFrameSection());
18681872 EmitLabel("section_debug_frame", 0);
18691873 }
18701874
1871 Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfInfoSection());
1875 Asm->OutStreamer.SwitchSection(TLOF.getDwarfInfoSection());
18721876 EmitLabel("section_info", 0);
1873 Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfAbbrevSection());
1877 Asm->OutStreamer.SwitchSection(TLOF.getDwarfAbbrevSection());
18741878 EmitLabel("section_abbrev", 0);
1875 Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfARangesSection());
1879 Asm->OutStreamer.SwitchSection(TLOF.getDwarfARangesSection());
18761880 EmitLabel("section_aranges", 0);
18771881
1878 if (const MCSection *LineInfoDirective =
1879 Asm->getObjFileLowering().getDwarfMacroInfoSection()) {
1880 Asm->SwitchToSection(LineInfoDirective);
1882 if (const MCSection *LineInfoDirective = TLOF.getDwarfMacroInfoSection()) {
1883 Asm->OutStreamer.SwitchSection(LineInfoDirective);
18811884 EmitLabel("section_macinfo", 0);
18821885 }
18831886
1884 Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfLineSection());
1887 Asm->OutStreamer.SwitchSection(TLOF.getDwarfLineSection());
18851888 EmitLabel("section_line", 0);
1886 Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfLocSection());
1889 Asm->OutStreamer.SwitchSection(TLOF.getDwarfLocSection());
18871890 EmitLabel("section_loc", 0);
1888 Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfPubNamesSection());
1891 Asm->OutStreamer.SwitchSection(TLOF.getDwarfPubNamesSection());
18891892 EmitLabel("section_pubnames", 0);
1890 Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfStrSection());
1893 Asm->OutStreamer.SwitchSection(TLOF.getDwarfStrSection());
18911894 EmitLabel("section_str", 0);
1892 Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfRangesSection());
1895 Asm->OutStreamer.SwitchSection(TLOF.getDwarfRangesSection());
18931896 EmitLabel("section_ranges", 0);
18941897
1895 Asm->SwitchToSection(Asm->getObjFileLowering().getTextSection());
1898 Asm->OutStreamer.SwitchSection(TLOF.getTextSection());
18961899 EmitLabel("text_begin", 0);
1897 Asm->SwitchToSection(Asm->getObjFileLowering().getDataSection());
1900 Asm->OutStreamer.SwitchSection(TLOF.getDataSection());
18981901 EmitLabel("data_begin", 0);
18991902 }
19001903
19961999
19972000 void DwarfDebug::EmitDebugInfo() {
19982001 // Start debug info section.
1999 Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfInfoSection());
2002 Asm->OutStreamer.SwitchSection(
2003 Asm->getObjFileLowering().getDwarfInfoSection());
20002004
20012005 EmitDebugInfoPerCU(ModuleCU);
20022006 }
20072011 // Check to see if it is worth the effort.
20082012 if (!Abbreviations.empty()) {
20092013 // Start the debug abbrev section.
2010 Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfAbbrevSection());
2014 Asm->OutStreamer.SwitchSection(
2015 Asm->getObjFileLowering().getDwarfAbbrevSection());
20112016
20122017 EmitLabel("abbrev_begin", 0);
20132018
20642069 const int MaxLineDelta = 255 + MinLineDelta;
20652070
20662071 // Start the dwarf line section.
2067 Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfLineSection());
2072 Asm->OutStreamer.SwitchSection(
2073 Asm->getObjFileLowering().getDwarfLineSection());
20682074
20692075 // Construct the section header.
20702076 EmitDifference("line_end", 0, "line_begin", 0, true);
22232229 TD->getPointerSize() : -TD->getPointerSize();
22242230
22252231 // Start the dwarf frame section.
2226 Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfFrameSection());
2232 Asm->OutStreamer.SwitchSection(
2233 Asm->getObjFileLowering().getDwarfFrameSection());
22272234
22282235 EmitLabel("debug_frame_common", 0);
22292236 EmitDifference("debug_frame_common_end", 0,
22632270 return;
22642271
22652272 // Start the dwarf frame section.
2266 Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfFrameSection());
2273 Asm->OutStreamer.SwitchSection(
2274 Asm->getObjFileLowering().getDwarfFrameSection());
22672275
22682276 EmitDifference("debug_frame_end", DebugFrameInfo.Number,
22692277 "debug_frame_begin", DebugFrameInfo.Number, true);
23272335 ///
23282336 void DwarfDebug::EmitDebugPubNames() {
23292337 // Start the dwarf pubnames section.
2330 Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfPubNamesSection());
2338 Asm->OutStreamer.SwitchSection(
2339 Asm->getObjFileLowering().getDwarfPubNamesSection());
23312340
23322341 EmitDebugPubNamesPerCU(ModuleCU);
23332342 }
23382347 // Check to see if it is worth the effort.
23392348 if (!StringPool.empty()) {
23402349 // Start the dwarf str section.
2341 Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfStrSection());
2350 Asm->OutStreamer.SwitchSection(
2351 Asm->getObjFileLowering().getDwarfStrSection());
23422352
23432353 // For each of strings in the string pool.
23442354 for (unsigned StringID = 1, N = StringPool.size();
23592369 ///
23602370 void DwarfDebug::EmitDebugLoc() {
23612371 // Start the dwarf loc section.
2362 Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfLocSection());
2372 Asm->OutStreamer.SwitchSection(
2373 Asm->getObjFileLowering().getDwarfLocSection());
23632374 Asm->EOL();
23642375 }
23652376
23672378 ///
23682379 void DwarfDebug::EmitDebugARanges() {
23692380 // Start the dwarf aranges section.
2370 Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfARangesSection());
2381 Asm->OutStreamer.SwitchSection(
2382 Asm->getObjFileLowering().getDwarfARangesSection());
23712383
23722384 // FIXME - Mock up
23732385 #if 0
24032415 ///
24042416 void DwarfDebug::EmitDebugRanges() {
24052417 // Start the dwarf ranges section.
2406 Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfRangesSection());
2418 Asm->OutStreamer.SwitchSection(
2419 Asm->getObjFileLowering().getDwarfRangesSection());
24072420 Asm->EOL();
24082421 }
24092422
24132426 if (const MCSection *LineInfo =
24142427 Asm->getObjFileLowering().getDwarfMacroInfoSection()) {
24152428 // Start the dwarf macinfo section.
2416 Asm->SwitchToSection(LineInfo);
2429 Asm->OutStreamer.SwitchSection(LineInfo);
24172430 Asm->EOL();
24182431 }
24192432 }
24432456 if (!ModuleCU)
24442457 return;
24452458
2446 Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfDebugInlineSection());
2459 Asm->OutStreamer.SwitchSection(
2460 Asm->getObjFileLowering().getDwarfDebugInlineSection());
24472461 Asm->EOL();
24482462 EmitDifference("debug_inlined_end", 1,
24492463 "debug_inlined_begin", 1, true);
24682482 if (LName.empty())
24692483 Asm->EmitString(Name);
24702484 else {
2471 // Skip special LLVM prefix that is used to inform the asm printer to not emit
2472 // usual symbol prefix before the symbol name. This happens for Objective-C
2473 // symbol names and symbol whose name is replaced using GCC's __asm__ attribute.
2485 // Skip special LLVM prefix that is used to inform the asm printer to not
2486 // emit usual symbol prefix before the symbol name. This happens for
2487 // Objective-C symbol names and symbol whose name is replaced using GCC's
2488 // __asm__ attribute.
24742489 if (LName[0] == 1)
24752490 LName = &LName[1];
24762491 Asm->EmitString(LName);
1515 #include "llvm/CodeGen/MachineModuleInfo.h"
1616 #include "llvm/CodeGen/MachineFrameInfo.h"
1717 #include "llvm/CodeGen/MachineLocation.h"
18 #include "llvm/Support/Dwarf.h"
19 #include "llvm/Support/Timer.h"
20 #include "llvm/Support/raw_ostream.h"
18 #include "llvm/MC/MCStreamer.h"
2119 #include "llvm/Target/TargetAsmInfo.h"
2220 #include "llvm/Target/TargetData.h"
2321 #include "llvm/Target/TargetFrameInfo.h"
2422 #include "llvm/Target/TargetLoweringObjectFile.h"
2523 #include "llvm/Target/TargetOptions.h"
2624 #include "llvm/Target/TargetRegisterInfo.h"
25 #include "llvm/Support/Dwarf.h"
26 #include "llvm/Support/Timer.h"
27 #include "llvm/Support/raw_ostream.h"
2728 #include "llvm/ADT/StringExtras.h"
2829 using namespace llvm;
2930
5556 TD->getPointerSize() : -TD->getPointerSize();
5657
5758 // Begin eh frame section.
58 Asm->SwitchToSection(Asm->getObjFileLowering().getEHFrameSection());
59 Asm->OutStreamer.SwitchSection(Asm->getObjFileLowering().getEHFrameSection());
5960
6061 if (TAI->is_EHSymbolPrivate())
6162 O << TAI->getPrivateGlobalPrefix();
149150
150151 const Function *TheFunc = EHFrameInfo.function;
151152
152 Asm->SwitchToSection(Asm->getObjFileLowering().getEHFrameSection());
153 Asm->OutStreamer.SwitchSection(Asm->getObjFileLowering().getEHFrameSection());
153154
154155 // Externally visible entry into the functions eh frame info. If the
155156 // corresponding function is static, this should not be externally visible.
554555
555556 // Begin the exception table.
556557 const MCSection *LSDASection = Asm->getObjFileLowering().getLSDASection();
557 Asm->SwitchToSection(LSDASection);
558 Asm->OutStreamer.SwitchSection(LSDASection);
558559 Asm->EmitAlignment(2, 0, 0, false);
559560 O << "GCC_except_table" << SubprogramCount << ":\n";
560561
1414 #include "llvm/CodeGen/AsmPrinter.h"
1515 #include "llvm/CodeGen/GCMetadataPrinter.h"
1616 #include "llvm/Module.h"
17 #include "llvm/Support/Compiler.h"
18 #include "llvm/Support/ErrorHandling.h"
19 #include "llvm/Support/raw_ostream.h"
17 #include "llvm/MC/MCStreamer.h"
2018 #include "llvm/Target/TargetAsmInfo.h"
2119 #include "llvm/Target/TargetData.h"
2220 #include "llvm/Target/TargetLoweringObjectFile.h"
2321 #include "llvm/Target/TargetMachine.h"
22 #include "llvm/Support/Compiler.h"
23 #include "llvm/Support/ErrorHandling.h"
24 #include "llvm/Support/raw_ostream.h"
2425 using namespace llvm;
2526
2627 namespace {
6364
6465 void OcamlGCMetadataPrinter::beginAssembly(raw_ostream &OS, AsmPrinter &AP,
6566 const TargetAsmInfo &TAI) {
66 AP.SwitchToSection(AP.getObjFileLowering().getTextSection());
67 AP.OutStreamer.SwitchSection(AP.getObjFileLowering().getTextSection());
6768 EmitCamlGlobal(getModule(), OS, AP, TAI, "code_begin");
6869
69 AP.SwitchToSection(AP.getObjFileLowering().getDataSection());
70 AP.OutStreamer.SwitchSection(AP.getObjFileLowering().getDataSection());
7071 EmitCamlGlobal(getModule(), OS, AP, TAI, "data_begin");
7172 }
7273
9899 AddressAlignLog = 3;
99100 }
100101
101 AP.SwitchToSection(AP.getObjFileLowering().getTextSection());
102 AP.OutStreamer.SwitchSection(AP.getObjFileLowering().getTextSection());
102103 EmitCamlGlobal(getModule(), OS, AP, TAI, "code_end");
103104
104 AP.SwitchToSection(AP.getObjFileLowering().getDataSection());
105 AP.OutStreamer.SwitchSection(AP.getObjFileLowering().getDataSection());
105106 EmitCamlGlobal(getModule(), OS, AP, TAI, "data_end");
106107
107108 OS << AddressDirective << 0; // FIXME: Why does ocaml emit this??
108109 AP.EOL();
109110
110 AP.SwitchToSection(AP.getObjFileLowering().getDataSection());
111 AP.OutStreamer.SwitchSection(AP.getObjFileLowering().getDataSection());
111112 EmitCamlGlobal(getModule(), OS, AP, TAI, "frametable");
112113
113114 for (iterator I = begin(), IE = end(); I != IE; ++I) {
9696 }
9797
9898 void MCAsmStreamer::SwitchSection(const MCSection *Section) {
99 assert(Section && "Cannot switch to a null section!");
99100 if (Section != CurSection) {
100101 CurSection = Section;
101102 Section->PrintSwitchToSection(TAI, OS);
2727 #include "llvm/CodeGen/MachineFunctionPass.h"
2828 #include "llvm/CodeGen/MachineJumpTableInfo.h"
2929 #include "llvm/MC/MCSectionMachO.h"
30 #include "llvm/MC/MCStreamer.h"
3031 #include "llvm/Target/TargetAsmInfo.h"
3132 #include "llvm/Target/TargetData.h"
3233 #include "llvm/Target/TargetLoweringObjectFile.h"
259260
260261 // Print out labels for the function.
261262 const Function *F = MF.getFunction();
262 SwitchToSection(getObjFileLowering().SectionForGlobal(F, Mang, TM));
263 OutStreamer.SwitchSection(getObjFileLowering().SectionForGlobal(F, Mang, TM));
263264
264265 switch (F->getLinkage()) {
265266 default: llvm_unreachable("Unknown linkage type!");
11611162
11621163 const MCSection *TheSection =
11631164 getObjFileLowering().SectionForGlobal(GVar, Mang, TM);
1164 SwitchToSection(TheSection);
1165 OutStreamer.SwitchSection(TheSection);
11651166
11661167 // FIXME: get this stuff from section kind flags.
11671168 if (C->isNullValue() && !GVar->hasSection() && !GVar->isThreadLocal() &&
11871188 O << TAI->getCOMMDirective() << name << "," << Size
11881189 << ',' << Align;
11891190 } else {
1190 SwitchToSection(getObjFileLowering().SectionForGlobal(GVar, Mang,TM));
1191 OutStreamer.SwitchSection(TheSection);
11911192 O << "\t.globl " << name << '\n'
11921193 << TAI->getWeakDefDirective() << name << '\n';
11931194 EmitAlignment(Align, GVar);
12961297 E = FnStubs.end(); I != E; ++I) {
12971298 const FnStubInfo &Info = I->second;
12981299
1299 SwitchToSection(StubSection);
1300 OutStreamer.SwitchSection(StubSection);
13001301 EmitAlignment(2);
13011302 O << "\t.code\t32\n";
13021303
13141315 O << "-(" << Info.SCV << "+8)";
13151316 O << '\n';
13161317
1317 SwitchToSection(LazySymbolPointerSection);
1318 OutStreamer.SwitchSection(LazySymbolPointerSection);
13181319 O << Info.LazyPtr << ":\n";
13191320 O << "\t.indirect_symbol " << I->getKeyData() << "\n";
13201321 O << "\t.long\tdyld_stub_binding_helper\n";
13251326 // Output non-lazy-pointers for external and common global variables.
13261327 if (!GVNonLazyPtrs.empty()) {
13271328 // Switch with ".non_lazy_symbol_pointer" directive.
1328 SwitchToSection(TLOFMacho.getNonLazySymbolPointerSection());
1329 OutStreamer.SwitchSection(TLOFMacho.getNonLazySymbolPointerSection());
13291330 EmitAlignment(2);
13301331 for (StringMap::iterator I = GVNonLazyPtrs.begin(),
13311332 E = GVNonLazyPtrs.end(); I != E; ++I) {
13361337 }
13371338
13381339 if (!HiddenGVNonLazyPtrs.empty()) {
1339 SwitchToSection(getObjFileLowering().getDataSection());
1340 OutStreamer.SwitchSection(getObjFileLowering().getDataSection());
13401341 EmitAlignment(2);
13411342 for (StringMap::iterator I = HiddenGVNonLazyPtrs.begin(),
13421343 E = HiddenGVNonLazyPtrs.end(); I != E; ++I) {
2020 #include "llvm/Assembly/Writer.h"
2121 #include "llvm/CodeGen/AsmPrinter.h"
2222 #include "llvm/CodeGen/DwarfWriter.h"
23 #include "llvm/MC/MCStreamer.h"
2324 #include "llvm/Target/TargetAsmInfo.h"
2425 #include "llvm/Target/TargetLoweringObjectFile.h"
2526 #include "llvm/Target/TargetMachine.h"
137138
138139 // Print out labels for the function.
139140 const Function *F = MF.getFunction();
140 SwitchToSection(getObjFileLowering().SectionForGlobal(F, Mang, TM));
141 OutStreamer.SwitchSection(getObjFileLowering().SectionForGlobal(F, Mang, TM));
141142
142143 EmitAlignment(MF.getAlignment(), F);
143144 switch (F->getLinkage()) {
209210 unsigned Align = TD->getPreferredAlignmentLog(GVar);
210211
211212 // 0: Switch to section
212 SwitchToSection(getObjFileLowering().SectionForGlobal(GVar, Mang, TM));
213 OutStreamer.SwitchSection(getObjFileLowering().SectionForGlobal(GVar, Mang,
214 TM));
213215
214216 // 1: Check visibility
215217 printVisibility(name, GVar->getVisibility());
2222 #include "llvm/CodeGen/MachineFunctionPass.h"
2323 #include "llvm/CodeGen/MachineConstantPool.h"
2424 #include "llvm/CodeGen/MachineInstr.h"
25 #include "llvm/MC/MCStreamer.h"
2526 #include "llvm/Target/TargetAsmInfo.h"
2627 #include "llvm/Target/TargetData.h"
2728 #include "llvm/Target/TargetLoweringObjectFile.h"
9495 std::string name = Mang->getMangledName(GV);
9596 Constant *C = GV->getInitializer();
9697
97 SwitchToSection(getObjFileLowering().SectionForGlobal(GV, Mang, TM));
98 OutStreamer.SwitchSection(getObjFileLowering().SectionForGlobal(GV, Mang,
99 TM));
98100 emitLinkage(name, GV->getLinkage());
99101 EmitAlignment(TD->getPreferredAlignmentLog(GV), GV);
100102 printVisibility(name, GV->getVisibility());
114116 EmitJumpTableInfo(MF.getJumpTableInfo(), MF);
115117
116118 const Function *F = MF.getFunction();
117 SwitchToSection(getObjFileLowering().SectionForGlobal(F, Mang, TM));
119 OutStreamer.SwitchSection(getObjFileLowering().SectionForGlobal(F, Mang, TM));
118120 EmitAlignment(2, F);
119121 emitLinkage(CurrentFnName, F->getLinkage());
120122 printVisibility(CurrentFnName, F->getVisibility());
2424 #include "llvm/CodeGen/MachineModuleInfo.h"
2525 #include "llvm/CodeGen/MachineFunctionPass.h"
2626 #include "llvm/CodeGen/MachineInstr.h"
27 #include "llvm/Support/Mangler.h"
28 #include "llvm/Support/MathExtras.h"
29 #include "llvm/Support/CommandLine.h"
30 #include "llvm/Support/Debug.h"
31 #include "llvm/Support/ErrorHandling.h"
32 #include "llvm/Support/Compiler.h"
33 #include "llvm/Support/FormattedStream.h"
27 #include "llvm/MC/MCStreamer.h"
3428 #include "llvm/Target/TargetAsmInfo.h"
3529 #include "llvm/Target/TargetLoweringObjectFile.h"
3630 #include "llvm/Target/TargetInstrInfo.h"
3933 #include "llvm/Target/TargetRegistry.h"
4034 #include "llvm/ADT/Statistic.h"
4135 #include "llvm/ADT/StringExtras.h"
36 #include "llvm/Support/CommandLine.h"
37 #include "llvm/Support/Compiler.h"
38 #include "llvm/Support/Debug.h"
39 #include "llvm/Support/ErrorHandling.h"
40 #include "llvm/Support/FormattedStream.h"
41 #include "llvm/Support/Mangler.h"
42 #include "llvm/Support/MathExtras.h"
4243 #include
4344 using namespace llvm;
4445
426427 // Print out labels for the function.
427428 const Function *F = MF.getFunction();
428429
429 SwitchToSection(getObjFileLowering().SectionForGlobal(F, Mang, TM));
430 OutStreamer.SwitchSection(getObjFileLowering().SectionForGlobal(F, Mang, TM));
430431 EmitAlignment(MF.getAlignment(), F);
431432
432433 switch (F->getLinkage()) {
511512 unsigned Size = TD->getTypeAllocSize(Type);
512513 unsigned Align = TD->getPreferredAlignmentLog(GVar);
513514
514 SwitchToSection(getObjFileLowering().SectionForGlobal(GVar, Mang, TM));
515 OutStreamer.SwitchSection(getObjFileLowering().SectionForGlobal(GVar, Mang,
516 TM));
515517
516518 if (C->isNullValue() && /* FIXME: Verify correct */
517519 !GVar->hasSection() &&
2525 #include "llvm/CodeGen/MachineFunctionPass.h"
2626 #include "llvm/CodeGen/MachineConstantPool.h"
2727 #include "llvm/CodeGen/MachineInstr.h"
28 #include "llvm/MC/MCStreamer.h"
2829 #include "llvm/Target/TargetData.h"
2930 #include "llvm/Target/TargetLoweringObjectFile.h"
3031 #include "llvm/Target/TargetRegistry.h"
7778 void MSP430AsmPrinter::emitFunctionHeader(const MachineFunction &MF) {
7879 const Function *F = MF.getFunction();
7980
80 SwitchToSection(getObjFileLowering().SectionForGlobal(F, Mang, TM));
81 OutStreamer.SwitchSection(getObjFileLowering().SectionForGlobal(F, Mang, TM));
8182
8283 unsigned FnAlign = MF.getAlignment();
8384 EmitAlignment(FnAlign, F);
2727 #include "llvm/CodeGen/MachineConstantPool.h"
2828 #include "llvm/CodeGen/MachineFrameInfo.h"
2929 #include "llvm/CodeGen/MachineInstr.h"
30 #include "llvm/MC/MCStreamer.h"
3031 #include "llvm/Target/TargetAsmInfo.h"
3132 #include "llvm/Target/TargetData.h"
3233 #include "llvm/Target/TargetLoweringObjectFile.h"
209210 void MipsAsmPrinter::emitFunctionStart(MachineFunction &MF) {
210211 // Print out the label for the function.
211212 const Function *F = MF.getFunction();
212 SwitchToSection(getObjFileLowering().SectionForGlobal(F, Mang, TM));
213 OutStreamer.SwitchSection(getObjFileLowering().SectionForGlobal(F, Mang, TM));
213214
214215 // 2 bits aligned
215216 EmitAlignment(MF.getAlignment(), F);
419420 }
420421
421422 bool MipsAsmPrinter::doInitialization(Module &M) {
422 // FIXME: Use SwitchToSection.
423 // FIXME: Use SwitchSection.
423424
424425 // Tell the assembler which ABI we are using
425426 O << "\t.section .mdebug." << emitCurrentABIString() << '\n';
467468
468469 printVisibility(name, GVar->getVisibility());
469470
470 SwitchToSection(getObjFileLowering().SectionForGlobal(GVar, Mang, TM));
471 OutStreamer.SwitchSection(getObjFileLowering().SectionForGlobal(GVar, Mang,
472 TM));
471473
472474 if (C->isNullValue() && !GVar->hasSection()) {
473475 if (!GVar->isThreadLocal() &&
2121 #include "llvm/CodeGen/MachineFrameInfo.h"
2222 #include "llvm/CodeGen/DwarfWriter.h"
2323 #include "llvm/CodeGen/MachineModuleInfo.h"
24 #include "llvm/MC/MCStreamer.h"
2425 #include "llvm/Target/TargetRegistry.h"
2526 #include "llvm/Target/TargetLoweringObjectFile.h"
2627 #include "llvm/Support/ErrorHandling.h"
7273 getObjFileLowering().getSectionForFunction(CurrentFnName);
7374 // Start the Code Section.
7475 O << "\n";
75 SwitchToSection(fCodeSection);
76 OutStreamer.SwitchSection(fCodeSection);
7677
7778 // Emit the frame address of the function at the beginning of code.
7879 O << "\tretlw low(" << PAN::getFrameLabel(CurrentFnName) << ")\n";
313314 const std::vector &Items = ROSections[i]->Items;
314315 if (!Items.size()) continue;
315316 O << "\n";
316 SwitchToSection(PTOF->ROSections[i]->S_);
317 OutStreamer.SwitchSection(PTOF->ROSections[i]->S_);
317318 for (unsigned j = 0; j < Items.size(); j++) {
318319 O << Mang->getMangledName(Items[j]);
319320 Constant *C = Items[j]->getInitializer();
340341
341342 const MCSection *fPDataSection =
342343 getObjFileLowering().getSectionForFunctionFrame(CurrentFnName);
343 SwitchToSection(fPDataSection);
344 OutStreamer.SwitchSection(fPDataSection);
344345
345346 // Emit function frame label
346347 O << PAN::getFrameLabel(CurrentFnName) << ":\n";
383384 O << "\n";
384385 if (IDATASections[i]->S_->getName().find("llvm.") != std::string::npos)
385386 continue;
386 SwitchToSection(IDATASections[i]->S_);
387 OutStreamer.SwitchSection(IDATASections[i]->S_);
387388 std::vector Items = IDATASections[i]->Items;
388389 for (unsigned j = 0; j < Items.size(); j++) {
389390 std::string Name = Mang->getMangledName(Items[j]);
402403 const std::vector &BSSSections = PTOF->BSSSections;
403404 for (unsigned i = 0; i < BSSSections.size(); i++) {
404405 O << "\n";
405 SwitchToSection(BSSSections[i]->S_);
406 OutStreamer.SwitchSection(BSSSections[i]->S_);
406407 std::vector Items = BSSSections[i]->Items;
407408 for (unsigned j = 0; j < Items.size(); j++) {
408409 std::string Name = Mang->getMangledName(Items[j]);
427428 if (AutosSections[i]->S_->getName() == SectionName) {
428429 // Set the printing status to true
429430 AutosSections[i]->setPrintedStatus(true);
430 SwitchToSection(AutosSections[i]->S_);
431 OutStreamer.SwitchSection(AutosSections[i]->S_);
431432 const std::vector &Items = AutosSections[i]->Items;
432433 for (unsigned j = 0; j < Items.size(); j++) {
433434 std::string VarName = Mang->getMangledName(Items[j]);
459460 AutosSections[i]->setPrintedStatus(true);
460461
461462 O << "\n";
462 SwitchToSection(AutosSections[i]->S_);
463 OutStreamer.SwitchSection(AutosSections[i]->S_);
463464 const std::vector &Items = AutosSections[i]->Items;
464465 for (unsigned j = 0; j < Items.size(); j++) {
465466 std::string VarName = Mang->getMangledName(Items[j]);
3131 #include "llvm/CodeGen/MachineInstr.h"
3232 #include "llvm/CodeGen/MachineInstrBuilder.h"
3333 #include "llvm/MC/MCSectionMachO.h"
34 #include "llvm/MC/MCStreamer.h"
3435 #include "llvm/Target/TargetAsmInfo.h"
3536 #include "llvm/Target/TargetLoweringObjectFile.h"
3637 #include "llvm/Target/TargetRegisterInfo.h"
613614
614615 // Print out labels for the function.
615616 const Function *F = MF.getFunction();
616 SwitchToSection(getObjFileLowering().SectionForGlobal(F, Mang, TM));
617 OutStreamer.SwitchSection(getObjFileLowering().SectionForGlobal(F, Mang, TM));
617618
618619 switch (F->getLinkage()) {
619620 default: llvm_unreachable("Unknown linkage type!");
674675 // Print out jump tables referenced by the function.
675676 EmitJumpTableInfo(MF.getJumpTableInfo(), MF);
676677
677 SwitchToSection(getObjFileLowering().SectionForGlobal(F, Mang, TM));
678 OutStreamer.SwitchSection(getObjFileLowering().SectionForGlobal(F, Mang, TM));
678679
679680 // Emit post-function debug information.
680681 DW->EndFunction(&MF);
702703 unsigned Size = TD->getTypeAllocSize(Type);
703704 unsigned Align = TD->getPreferredAlignmentLog(GVar);
704705
705 SwitchToSection(getObjFileLowering().SectionForGlobal(GVar, Mang, TM));
706 OutStreamer.SwitchSection(getObjFileLowering().SectionForGlobal(GVar, Mang,
707 TM));
706708
707709 if (C->isNullValue() && /* FIXME: Verify correct */
708710 !GVar->hasSection() &&
801803
802804 // Print out labels for the function.
803805 const Function *F = MF.getFunction();
804 SwitchToSection(getObjFileLowering().SectionForGlobal(F, Mang, TM));
806 OutStreamer.SwitchSection(getObjFileLowering().SectionForGlobal(F, Mang, TM));
805807
806808 switch (F->getLinkage()) {
807809 default: llvm_unreachable("Unknown linkage type!");
893895 // large data or debug section causes a branch to exceed 16M limit.
894896 TargetLoweringObjectFileMachO &TLOFMacho =
895897 static_cast(getObjFileLowering());
896 SwitchToSection(TLOFMacho.getTextCoalSection());
898 OutStreamer.SwitchSection(TLOFMacho.getTextCoalSection());
897899 if (TM.getRelocationModel() == Reloc::PIC_) {
898 SwitchToSection(TLOFMacho.getMachOSection("__TEXT", "__picsymbolstub1",
899 MCSectionMachO::S_SYMBOL_STUBS |
900 MCSectionMachO::S_ATTR_PURE_INSTRUCTIONS,
901 32, SectionKind::getText()));
900 OutStreamer.SwitchSection(
901 TLOFMacho.getMachOSection("__TEXT", "__picsymbolstub1",
902 MCSectionMachO::S_SYMBOL_STUBS |
903 MCSectionMachO::S_ATTR_PURE_INSTRUCTIONS,
904 32, SectionKind::getText()));
902905 } else if (TM.getRelocationModel() == Reloc::DynamicNoPIC) {
903 SwitchToSection(TLOFMacho.getMachOSection("__TEXT","__symbol_stub1",
904 MCSectionMachO::S_SYMBOL_STUBS |
905 MCSectionMachO::S_ATTR_PURE_INSTRUCTIONS,
906 16, SectionKind::getText()));
907 }
908 SwitchToSection(getObjFileLowering().getTextSection());
906 OutStreamer.SwitchSection(
907 TLOFMacho.getMachOSection("__TEXT","__symbol_stub1",
908 MCSectionMachO::S_SYMBOL_STUBS |
909 MCSectionMachO::S_ATTR_PURE_INSTRUCTIONS,
910 16, SectionKind::getText()));
911 }
912 OutStreamer.SwitchSection(getObjFileLowering().getTextSection());
909913
910914 return Result;
911915 }
937941
938942 const MCSection *TheSection =
939943 getObjFileLowering().SectionForGlobal(GVar, Mang, TM);
940 SwitchToSection(TheSection);
944 OutStreamer.SwitchSection(TheSection);
941945
942946 /// FIXME: Drive this off the section!
943947 if (C->isNullValue() && /* FIXME: Verify correct */
10421046 32, SectionKind::getText());
10431047 for (StringMap::iterator I = FnStubs.begin(), E = FnStubs.end();
10441048 I != E; ++I) {
1045 SwitchToSection(StubSection);
1049 OutStreamer.SwitchSection(StubSection);
10461050 EmitAlignment(4);
10471051 const FnStubInfo &Info = I->second;
10481052 O << Info.Stub << ":\n";
10591063 O << "\tmtctr r12\n";
10601064 O << "\tbctr\n";
10611065
1062 SwitchToSection(LSPSection);
1066 OutStreamer.SwitchSection(LSPSection);
10631067 O << Info.LazyPtr << ":\n";
10641068 O << "\t.indirect_symbol " << I->getKeyData() << '\n';
10651069 O << (isPPC64 ? "\t.quad" : "\t.long") << " dyld_stub_binding_helper\n";
10731077
10741078 for (StringMap::iterator I = FnStubs.begin(), E = FnStubs.end();
10751079 I != E; ++I) {
1076 SwitchToSection(StubSection);
1080 OutStreamer.SwitchSection(StubSection);
10771081 EmitAlignment(4);
10781082 const FnStubInfo &Info = I->second;
10791083 O << Info.Stub << ":\n";
10831087 O << Info.LazyPtr << ")(r11)\n";
10841088 O << "\tmtctr r12\n";
10851089 O << "\tbctr\n";
1086 SwitchToSection(LSPSection);
1090 OutStreamer.SwitchSection(LSPSection);
10871091 O << Info.LazyPtr << ":\n";
10881092 O << "\t.indirect_symbol " << I->getKeyData() << '\n';
10891093 O << (isPPC64 ? "\t.quad" : "\t.long") << " dyld_stub_binding_helper\n";
11071111 // Output macho stubs for external and common global variables.
11081112 if (!GVStubs.empty()) {
11091113 // Switch with ".non_lazy_symbol_pointer" directive.
1110 SwitchToSection(TLOFMacho.getNonLazySymbolPointerSection());
1114 OutStreamer.SwitchSection(TLOFMacho.getNonLazySymbolPointerSection());
11111115 EmitAlignment(isPPC64 ? 3 : 2);
11121116
11131117 for (StringMap::iterator I = GVStubs.begin(),
11191123 }
11201124
11211125 if (!HiddenGVStubs.empty()) {
1122 SwitchToSection(getObjFileLowering().getDataSection());
1126 OutStreamer.SwitchSection(getObjFileLowering().getDataSection());
11231127 EmitAlignment(isPPC64 ? 3 : 2);
11241128 for (StringMap::iterator I = HiddenGVStubs.begin(),
11251129 E = HiddenGVStubs.end(); I != E; ++I) {
2323 #include "llvm/CodeGen/MachineFunctionPass.h"
2424 #include "llvm/CodeGen/MachineConstantPool.h"
2525 #include "llvm/CodeGen/MachineInstr.h"
26 #include "llvm/MC/MCStreamer.h"
2627 #include "llvm/Target/TargetAsmInfo.h"
2728 #include "llvm/Target/TargetLoweringObjectFile.h"
2829 #include "llvm/Target/TargetRegistry.h"
30 #include "llvm/ADT/Statistic.h"
31 #include "llvm/ADT/StringExtras.h"
32 #include "llvm/Support/CommandLine.h"
2933 #include "llvm/Support/ErrorHandling.h"
3034 #include "llvm/Support/FormattedStream.h"
3135 #include "llvm/Support/Mangler.h"
32 #include "llvm/ADT/Statistic.h"
33 #include "llvm/ADT/StringExtras.h"
34 #include "llvm/Support/CommandLine.h"
3536 #include "llvm/Support/MathExtras.h"
3637 #include
3738 #include
9495
9596 // Print out the label for the function.
9697 const Function *F = MF.getFunction();
97 SwitchToSection(getObjFileLowering().SectionForGlobal(F, Mang, TM));
98 OutStreamer.SwitchSection(getObjFileLowering().SectionForGlobal(F, Mang, TM));
9899 EmitAlignment(MF.getAlignment(), F);
99100 O << "\t.globl\t" << CurrentFnName << '\n';
100101
226227
227228 printVisibility(name, GVar->getVisibility());
228229
229 SwitchToSection(getObjFileLowering().SectionForGlobal(GVar, Mang, TM));
230 OutStreamer.SwitchSection(getObjFileLowering().SectionForGlobal(GVar, Mang,
231 TM));
230232
231233 if (C->isNullValue() && !GVar->hasSection()) {
232234 if (!GVar->isThreadLocal() &&
2525 #include "llvm/CodeGen/MachineFunctionPass.h"
2626 #include "llvm/CodeGen/MachineConstantPool.h"
2727 #include "llvm/CodeGen/MachineInstr.h"
28 #include "llvm/MC/MCStreamer.h"
2829 #include "llvm/Target/TargetAsmInfo.h"
2930 #include "llvm/Target/TargetData.h"
3031 #include "llvm/Target/TargetLoweringObjectFile.h"
8384 unsigned FnAlign = MF.getAlignment();
8485 const Function *F = MF.getFunction();
8586
86 SwitchToSection(getObjFileLowering().SectionForGlobal(F, Mang, TM));
87 OutStreamer.SwitchSection(getObjFileLowering().SectionForGlobal(F, Mang, TM));
8788
8889 EmitAlignment(FnAlign, F);
8990
316317
317318 O << "\t.type\t" << name << ",@object\n";
318319
319 SwitchToSection(getObjFileLowering().SectionForGlobal(GVar, Mang, TM));
320 OutStreamer.SwitchSection(getObjFileLowering().SectionForGlobal(GVar, Mang,
321 TM));
320322
321323 if (C->isNullValue() && !GVar->hasSection() &&
322324 !GVar->isThreadLocal() &&
173173 if (Subtarget->isTargetCygMing())
174174 DecorateCygMingName(CurrentFnName, F);
175175
176 SwitchToSection(getObjFileLowering().SectionForGlobal(F, Mang, TM));
176 OutStreamer.SwitchSection(getObjFileLowering().SectionForGlobal(F, Mang, TM));
177177 EmitAlignment(FnAlign, F);
178178
179179 switch (F->getLinkage()) {
932932 SectionKind GVKind = TargetLoweringObjectFile::getKindForGlobal(GVar, TM);
933933 const MCSection *TheSection =
934934 getObjFileLowering().SectionForGlobal(GVar, GVKind, Mang, TM);
935 SwitchToSection(TheSection);
935 OutStreamer.SwitchSection(TheSection);
936936
937937 // FIXME: get this stuff from section kind flags.
938938 if (C->isNullValue() && !GVar->hasSection() &&
10731073 MCSectionMachO::S_ATTR_SELF_MODIFYING_CODE |
10741074 MCSectionMachO::S_ATTR_PURE_INSTRUCTIONS,
10751075 5, SectionKind::getMetadata());
1076 SwitchToSection(TheSection);
1076 OutStreamer.SwitchSection(TheSection);
10771077 for (StringMap::iterator I = FnStubs.begin(),
10781078 E = FnStubs.end(); I != E; ++I)
10791079 O << I->getKeyData() << ":\n" << "\t.indirect_symbol " << I->second
10871087 TLOFMacho.getMachOSection("__IMPORT", "__pointers",
10881088 MCSectionMachO::S_NON_LAZY_SYMBOL_POINTERS,
10891089 SectionKind::getMetadata());
1090 SwitchToSection(TheSection);
1090 OutStreamer.SwitchSection(TheSection);
10911091 for (StringMap::iterator I = GVStubs.begin(),
10921092 E = GVStubs.end(); I != E; ++I)
10931093 O << I->getKeyData() << ":\n\t.indirect_symbol "
10951095 }
10961096
10971097 if (!HiddenGVStubs.empty()) {
1098 SwitchToSection(getObjFileLowering().getDataSection());
1098 OutStreamer.SwitchSection(getObjFileLowering().getDataSection());
10991099 EmitAlignment(2);
11001100 for (StringMap::iterator I = HiddenGVStubs.begin(),
11011101 E = HiddenGVStubs.end(); I != E; ++I)
11271127 TargetLoweringObjectFileCOFF &TLOFMacho =
11281128 static_cast(getObjFileLowering());
11291129
1130 SwitchToSection(TLOFMacho.getCOFFSection(".section .drectve", true,
1131 SectionKind::getMetadata()));
1130 OutStreamer.SwitchSection(TLOFMacho.getCOFFSection(".section .drectve",true,
1131 SectionKind::getMetadata()));
11321132
11331133 for (StringSet<>::iterator i = DLLExportedGVs.begin(),
11341134 e = DLLExportedGVs.end(); i != e; ++i)
2525 #include "llvm/ADT/StringExtras.h"
2626 #include "llvm/Assembly/Writer.h"
2727 #include "llvm/CodeGen/DwarfWriter.h"
28 #include "llvm/Support/ErrorHandling.h"
29 #include "llvm/Support/Mangler.h"
28 #include "llvm/MC/MCStreamer.h"
3029 #include "llvm/Target/TargetAsmInfo.h"
3130 #include "llvm/Target/TargetLoweringObjectFile.h"
3231 #include "llvm/Target/TargetOptions.h"
32 #include "llvm/Support/ErrorHandling.h"
33 #include "llvm/Support/Mangler.h"
3334 using namespace llvm;
3435
3536 STATISTIC(EmittedInsts, "Number of machine instrs printed");
142143
143144 decorateName(CurrentFnName, F);
144145
145 SwitchToSection(getObjFileLowering().SectionForGlobal(F, Mang, TM));
146 OutStreamer.SwitchSection(getObjFileLowering().SectionForGlobal(F, Mang, TM));
146147
147148 switch (F->getLinkage()) {
148149 default: llvm_unreachable("Unsupported linkage type!");
512513 O << "\tpublic " << name << "\n";
513514 // FALL THROUGH
514515 case GlobalValue::InternalLinkage:
515 SwitchToSection(getObjFileLowering().getDataSection());
516 OutStreamer.SwitchSection(getObjFileLowering().getDataSection());
516517 break;
517518 default:
518519 llvm_unreachable("Unknown linkage type!");
2626 #include "llvm/CodeGen/MachineFunctionPass.h"
2727 #include "llvm/CodeGen/MachineConstantPool.h"
2828 #include "llvm/CodeGen/MachineInstr.h"
29 #include "llvm/MC/MCStreamer.h"
2930 #include "llvm/Target/TargetData.h"
3031 #include "llvm/Target/TargetLoweringObjectFile.h"
3132 #include "llvm/Target/TargetRegistry.h"
32 #include "llvm/Support/Mangler.h"
3333 #include "llvm/ADT/Statistic.h"
3434 #include "llvm/ADT/StringExtras.h"
3535 #include "llvm/Support/CommandLine.h"
3636 #include "llvm/Support/ErrorHandling.h"
3737 #include "llvm/Support/FormattedStream.h"
38 #include "llvm/Support/Mangler.h"
3839 #include "llvm/Support/MathExtras.h"
3940 #include
4041 #include
133134
134135 const TargetData *TD = TM.getTargetData();
135136
136 SwitchToSection(getObjFileLowering().SectionForGlobal(GV, Mang, TM));
137 OutStreamer.SwitchSection(getObjFileLowering().SectionForGlobal(GV, Mang,TM));
137138
138139 std::string name = Mang->getMangledName(GV);
139140 Constant *C = GV->getInitializer();
204205 // Print out the label for the function.
205206 const Function *F = MF.getFunction();
206207
207 SwitchToSection(getObjFileLowering().SectionForGlobal(F, Mang, TM));
208 OutStreamer.SwitchSection(getObjFileLowering().SectionForGlobal(F, Mang, TM));
208209
209210 // Mark the start of the function
210211 O << "\t.cc_top " << CurrentFnName << ".function," << CurrentFnName << "\n";