#include "llvm/Support/Dwarf.h"
#include <cctype>
#include <cstring>
-
using namespace llvm;
-void TargetAsmInfo::fillDefaultValues() {
+TargetAsmInfo::TargetAsmInfo(const TargetMachine &tm)
+: TM(tm) {
BSSSection = "\t.bss";
BSSSection_ = 0;
ReadOnlySection = 0;
InlineAsmEnd = "#NO_APP";
AssemblerDialect = 0;
StringConstantPrefix = ".str";
+ AllowQuotesInName = false;
ZeroDirective = "\t.zero\t";
ZeroDirectiveSuffix = 0;
AsciiDirective = "\t.ascii\t";
SupportsDebugInformation = false;
SupportsExceptionHandling = false;
DwarfRequiresFrameSection = true;
- SupportsMacInfoSection = true;
+ DwarfUsesInlineInfoSection = false;
NonLocalEHFrameLabel = false;
GlobalEHDirective = 0;
SupportsWeakOmittedEHFrame = true;
DwarfFrameSection = ".debug_frame";
DwarfPubNamesSection = ".debug_pubnames";
DwarfPubTypesSection = ".debug_pubtypes";
+ DwarfDebugInlineSection = ".debug_inlined";
DwarfStrSection = ".debug_str";
DwarfLocSection = ".debug_loc";
DwarfARangesSection = ".debug_aranges";
DwarfRangesSection = ".debug_ranges";
- DwarfMacInfoSection = ".debug_macinfo";
+ DwarfMacroInfoSection = ".debug_macinfo";
DwarfEHFrameSection = ".eh_frame";
DwarfExceptionSection = ".gcc_except_table";
AsmTransCBE = 0;
DataSection = getUnnamedSection("\t.data", SectionFlags::Writeable);
}
-TargetAsmInfo::TargetAsmInfo(const TargetMachine &tm)
- : TM(tm) {
- fillDefaultValues();
-}
-
TargetAsmInfo::~TargetAsmInfo() {
}
unsigned Reloc = RelocBehaviour();
// We already did a query for 'all' relocs, thus - early exits.
- if (Reloc == Reloc::LocalOrGlobal) {
- return (C->ContainsRelocations(Reloc::Local) ?
- SectionKind::DataRelROLocal : SectionKind::DataRelRO);
- } else if (Reloc == Reloc::None)
+ if (Reloc == Reloc::LocalOrGlobal)
+ return SectionKind::Data;
+ else if (Reloc == Reloc::None)
return SectionKind::ROData;
else {
// Ok, target wants something funny. Honour it.
- if (C->ContainsRelocations(Reloc)) {
- return (Reloc == Reloc::Local ?
- SectionKind::DataRelROLocal : SectionKind::DataRelRO);
- } else
- return SectionKind::ROData;
+ return (C->ContainsRelocations(Reloc) ?
+ SectionKind::Data : SectionKind::ROData);
}
} else {
// Check, if initializer is a null-terminated string
}
// Variable either is not constant or thread-local - output to data section.
- if (isThreadLocal)
- return SectionKind::ThreadData;
-
- if (GVar->hasInitializer()) {
- Constant *C = GVar->getInitializer();
- unsigned Reloc = RelocBehaviour();
- if (Reloc != Reloc::None && C->ContainsRelocations(Reloc))
- return (C->ContainsRelocations(Reloc::Local) ?
- SectionKind::DataRelLocal : SectionKind::DataRel);
- }
-
- return SectionKind::Data;
+ return (isThreadLocal ? SectionKind::ThreadData : SectionKind::Data);
}
unsigned