mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Move .ident handling to MCStreamer.
No functionality change, but exposes the API so that codegen can use it too. Patch by Katya Romanova. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192757 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -329,7 +329,22 @@ void MCELFStreamer::EmitFileDirective(StringRef Filename) {
|
||||
SD.setFlags(ELF_STT_File | ELF_STB_Local | ELF_STV_Default);
|
||||
}
|
||||
|
||||
void MCELFStreamer::fixSymbolsInTLSFixups(const MCExpr *expr) {
|
||||
void MCELFStreamer::EmitIdent(StringRef IdentString) {
|
||||
const MCSection *Comment = getAssembler().getContext().getELFSection(
|
||||
".comment", ELF::SHT_PROGBITS, ELF::SHF_MERGE | ELF::SHF_STRINGS,
|
||||
SectionKind::getReadOnly(), 1, "");
|
||||
PushSection();
|
||||
SwitchSection(Comment);
|
||||
if (!SeenIdent) {
|
||||
EmitIntValue(0, 1);
|
||||
SeenIdent = true;
|
||||
}
|
||||
EmitBytes(IdentString);
|
||||
EmitIntValue(0, 1);
|
||||
PopSection();
|
||||
}
|
||||
|
||||
void MCELFStreamer::fixSymbolsInTLSFixups(const MCExpr *expr) {
|
||||
switch (expr->getKind()) {
|
||||
case MCExpr::Target:
|
||||
cast<MCTargetExpr>(expr)->fixELFSymbolsInTLSFixups(getAssembler());
|
||||
|
Reference in New Issue
Block a user