/// HasDotTypeDotSizeDirective - True if the target has .type and .size
/// directives, this is true for most ELF targets.
bool HasDotTypeDotSizeDirective; // Defaults to true.
-
+
+ /// HasSingleParameterDotFile - True if the target has a single parameter
+ /// .file directive, this is true for ELF targets.
+ bool HasSingleParameterDotFile; // Defaults to true.
+
/// UsedDirective - This directive, if non-null, is used to declare a global
/// as being used somehow that the assembler can't see. This prevents dead
/// code elimination on some targets.
bool hasDotTypeDotSizeDirective() const {
return HasDotTypeDotSizeDirective;
}
+ bool hasSingleParameterDotFile() const {
+ return HasSingleParameterDotFile;
+ }
const char *getUsedDirective() const {
return UsedDirective;
}
}
#endif
-
GCModuleInfo *MI = getAnalysisToUpdate<GCModuleInfo>();
assert(MI && "AsmPrinter didn't require GCModuleInfo?");
+
+ if (TAI->hasSingleParameterDotFile()) {
+ /* Very minimal debug info. It is ignored if we emit actual
+ debug info. If we don't, this at helps the user find where
+ a function came from. */
+ O << "\t.file\t\"" << M.getModuleIdentifier() << "\"\n";
+ }
+
for (GCModuleInfo::iterator I = MI->begin(), E = MI->end(); I != E; ++I)
if (GCMetadataPrinter *MP = GetOrCreateGCPrinter(*I))
MP->beginAssembly(O, *this, *TAI);
JumpTableDataSection = ".const";
CStringSection = "\t.cstring";
HasDotTypeDotSizeDirective = false;
+ HasSingleParameterDotFile = false;
NeedsIndirectEncoding = true;
if (TM.getRelocationModel() == Reloc::Static) {
StaticCtorsSection = ".constructor";
StaticCtorsSection = ".mod_init_func";
StaticDtorsSection = ".mod_term_func";
}
+ HasSingleParameterDotFile = false;
SwitchToSectionDirective = "\t.section ";
UsedDirective = "\t.no_dead_strip\t";
WeakDefDirective = "\t.weak_definition ";
COMMDirective = "\t.comm\t";
COMMDirectiveTakesAlignment = true;
HasDotTypeDotSizeDirective = true;
+ HasSingleParameterDotFile = true;
UsedDirective = 0;
WeakRefDirective = 0;
WeakDefDirective = 0;
// Leopard and above support aligned common symbols.
COMMDirectiveTakesAlignment = (Subtarget->getDarwinVers() >= 9);
HasDotTypeDotSizeDirective = false;
+ HasSingleParameterDotFile = false;
if (TM.getRelocationModel() == Reloc::Static) {
StaticCtorsSection = ".constructor";
StaticDtorsSection = ".destructor";
LCOMMDirective = "\t.lcomm\t";
COMMDirectiveTakesAlignment = false;
HasDotTypeDotSizeDirective = false;
+ HasSingleParameterDotFile = false;
StaticCtorsSection = "\t.section .ctors,\"aw\"";
StaticDtorsSection = "\t.section .dtors,\"aw\"";
HiddenDirective = NULL;
Data32bitsDirective = "\tdd\t";
Data64bitsDirective = "\tdq\t";
HasDotTypeDotSizeDirective = false;
+ HasSingleParameterDotFile = false;
TextSection = getUnnamedSection("_text", SectionFlags::Code);
DataSection = getUnnamedSection("_data", SectionFlags::Writeable);