mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-10 02:36:06 +00:00
make SwitchToSection accept null sections for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77976 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d1a919e139
commit
d54a6b8c58
@ -132,9 +132,14 @@ void AsmPrinter::SwitchToDataSection(const char *NewSection,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// SwitchToSection - Switch to the specified section of the executable if we
|
/// SwitchToSection - Switch to the specified section of the executable if we
|
||||||
/// are not already in it!
|
/// are not already in it! If "NS" is null, then this causes us to exit the
|
||||||
|
/// current section and not reenter another one. This is generally used for
|
||||||
|
/// asmprinter hacks.
|
||||||
|
///
|
||||||
|
/// FIXME: Remove support for null sections.
|
||||||
|
///
|
||||||
void AsmPrinter::SwitchToSection(const MCSection *NS) {
|
void AsmPrinter::SwitchToSection(const MCSection *NS) {
|
||||||
const std::string &NewSection = NS->getName();
|
const std::string &NewSection = NS ? NS->getName() : "";
|
||||||
|
|
||||||
// If we're already in this section, we're done.
|
// If we're already in this section, we're done.
|
||||||
if (CurrentSection == NewSection) return;
|
if (CurrentSection == NewSection) return;
|
||||||
@ -165,7 +170,7 @@ void AsmPrinter::SwitchToSection(const MCSection *NS) {
|
|||||||
O << TAI->getDataSectionStartSuffix() << '\n';
|
O << TAI->getDataSectionStartSuffix() << '\n';
|
||||||
}
|
}
|
||||||
|
|
||||||
IsInTextSection = NS->getKind().isText();
|
IsInTextSection = NS ? NS->getKind().isText() : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AsmPrinter::getAnalysisUsage(AnalysisUsage &AU) const {
|
void AsmPrinter::getAnalysisUsage(AnalysisUsage &AU) const {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user