aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2022-06-10 22:50:55 -0700
committerFangrui Song <i@maskray.me>2022-06-10 22:50:55 -0700
commitadf4142f76831848732861769a807d1047102c53 (patch)
tree850eb26fd50c8e9803c225179b0bc1383940c6c6 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parent2e603c67c204b6bc9d96bf090ef4fd3a5b04aa51 (diff)
downloadllvm-adf4142f76831848732861769a807d1047102c53.zip
llvm-adf4142f76831848732861769a807d1047102c53.tar.gz
llvm-adf4142f76831848732861769a807d1047102c53.tar.bz2
[MC] De-capitalize SwitchSection. NFC
Add SwitchSection to return switchSection. The API will be removed soon.
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
index ccbfc16..f3d68bd 100644
--- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
@@ -310,7 +310,7 @@ void TargetLoweringObjectFileELF::emitModuleMetadata(MCStreamer &Streamer,
auto *S = C.getELFSection(".linker-options", ELF::SHT_LLVM_LINKER_OPTIONS,
ELF::SHF_EXCLUDE);
- Streamer.SwitchSection(S);
+ Streamer.switchSection(S);
for (const auto *Operand : LinkerOptions->operands()) {
if (cast<MDNode>(Operand)->getNumOperands() != 2)
@@ -326,7 +326,7 @@ void TargetLoweringObjectFileELF::emitModuleMetadata(MCStreamer &Streamer,
auto *S = C.getELFSection(".deplibs", ELF::SHT_LLVM_DEPENDENT_LIBRARIES,
ELF::SHF_MERGE | ELF::SHF_STRINGS, 1);
- Streamer.SwitchSection(S);
+ Streamer.switchSection(S);
for (const auto *Operand : DependentLibraries->operands()) {
Streamer.emitBytes(
@@ -350,7 +350,7 @@ void TargetLoweringObjectFileELF::emitModuleMetadata(MCStreamer &Streamer,
auto *S = C.getObjectFileInfo()->getPseudoProbeDescSection(
TM->getFunctionSections() ? Name->getString() : StringRef());
- Streamer.SwitchSection(S);
+ Streamer.switchSection(S);
Streamer.emitInt64(GUID->getZExtValue());
Streamer.emitInt64(Hash->getZExtValue());
Streamer.emitULEB128IntValue(Name->getString().size());
@@ -365,7 +365,7 @@ void TargetLoweringObjectFileELF::emitModuleMetadata(MCStreamer &Streamer,
GetObjCImageInfo(M, Version, Flags, Section);
if (!Section.empty()) {
auto *S = C.getELFSection(Section, ELF::SHT_PROGBITS, ELF::SHF_ALLOC);
- Streamer.SwitchSection(S);
+ Streamer.switchSection(S);
Streamer.emitLabel(C.getOrCreateSymbol(StringRef("OBJC_IMAGE_INFO")));
Streamer.emitInt32(Version);
Streamer.emitInt32(Flags);
@@ -399,7 +399,7 @@ void TargetLoweringObjectFileELF::emitPersonalityValue(
MCSection *Sec = getContext().getELFNamedSection(".data", Label->getName(),
ELF::SHT_PROGBITS, Flags, 0);
unsigned Size = DL.getPointerSize();
- Streamer.SwitchSection(Sec);
+ Streamer.switchSection(Sec);
Streamer.emitValueToAlignment(DL.getPointerABIAlignment(0).value());
Streamer.emitSymbolAttribute(Label, MCSA_ELF_TypeObject);
const MCExpr *E = MCConstantExpr::create(Size, getContext());
@@ -1226,7 +1226,7 @@ void TargetLoweringObjectFileMachO::emitModuleMetadata(MCStreamer &Streamer,
// Get the section.
MCSectionMachO *S = getContext().getMachOSection(
Segment, Section, TAA, StubSize, SectionKind::getData());
- Streamer.SwitchSection(S);
+ Streamer.switchSection(S);
Streamer.emitLabel(getContext().
getOrCreateSymbol(StringRef("L_OBJC_IMAGE_INFO")));
Streamer.emitInt32(VersionVal);
@@ -1777,7 +1777,7 @@ void TargetLoweringObjectFileCOFF::emitModuleMetadata(MCStreamer &Streamer,
COFF::IMAGE_SCN_CNT_INITIALIZED_DATA |
COFF::IMAGE_SCN_MEM_READ,
SectionKind::getReadOnly());
- Streamer.SwitchSection(S);
+ Streamer.switchSection(S);
Streamer.emitLabel(C.getOrCreateSymbol(StringRef("OBJC_IMAGE_INFO")));
Streamer.emitInt32(Version);
Streamer.emitInt32(Flags);
@@ -1794,7 +1794,7 @@ void TargetLoweringObjectFileCOFF::emitLinkerDirectives(
// spec, this section is a space-separated string containing flags for
// linker.
MCSection *Sec = getDrectveSection();
- Streamer.SwitchSection(Sec);
+ Streamer.switchSection(Sec);
for (const auto *Option : LinkerOptions->operands()) {
for (const auto &Piece : cast<MDNode>(Option)->operands()) {
// Lead with a space for consistency with our dllexport implementation.
@@ -1813,7 +1813,7 @@ void TargetLoweringObjectFileCOFF::emitLinkerDirectives(
getMangler());
OS.flush();
if (!Flags.empty()) {
- Streamer.SwitchSection(getDrectveSection());
+ Streamer.switchSection(getDrectveSection());
Streamer.emitBytes(Flags);
}
Flags.clear();
@@ -1839,7 +1839,7 @@ void TargetLoweringObjectFileCOFF::emitLinkerDirectives(
OS.flush();
if (!Flags.empty()) {
- Streamer.SwitchSection(getDrectveSection());
+ Streamer.switchSection(getDrectveSection());
Streamer.emitBytes(Flags);
}
Flags.clear();