#include "llvm/ADT/StringExtras.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
+#include "llvm/Support/FormattedStream.h"
#include "llvm/Support/Timer.h"
#include "llvm/System/Path.h"
using namespace llvm;
for (unsigned i = 1, e = getNumSourceIds()+1; i != e; ++i) {
// Remember source id starts at 1.
std::pair<unsigned, unsigned> Id = getSourceDirectoryAndFileIds(i);
+ // FIXME: don't use sys::path for this! This should not depend on the
+ // host.
sys::Path FullPath(getSourceDirectoryName(Id.first));
bool AppendOk =
FullPath.appendComponent(getSourceFileName(Id.second));
assert(AppendOk && "Could not append filename to directory!");
AppendOk = false;
Asm->EmitFile(i, FullPath.str());
- Asm->EOL();
+ Asm->O << '\n';
}
}
unsigned AbbrevNumber = Die->getAbbrevNumber();
const DIEAbbrev *Abbrev = Abbreviations[AbbrevNumber - 1];
- Asm->EOL();
+ Asm->O << '\n';
// Emit the code (index) for the abbreviation.
Asm->EmitULEB128Bytes(AbbrevNumber);
Asm->EmitInt8(0); Asm->EOL("Extra Pad For GDB");
Asm->EmitInt8(0); Asm->EOL("Extra Pad For GDB");
EmitLabel("info_end", ModuleCU->getID());
-
- Asm->EOL();
+ Asm->O << '\n';
}
/// emitAbbreviations - Emit the abbreviation section.
// Emit the abbreviations data.
Abbrev->Emit(Asm);
-
- Asm->EOL();
+ Asm->O << '\n';
}
// Mark end of abbreviations.
Asm->EmitULEB128Bytes(0); Asm->EOL("EOM(3)");
EmitLabel("abbrev_end", 0);
- Asm->EOL();
+ Asm->O << '\n';
}
}
// Mark end of matrix.
Asm->EmitInt8(0); Asm->EOL("DW_LNE_end_sequence");
- Asm->EmitULEB128Bytes(1); Asm->EOL();
- Asm->EmitInt8(1); Asm->EOL();
+ Asm->EmitULEB128Bytes(1);
+ Asm->O << '\n';
+ Asm->EmitInt8(1);
+ Asm->O << '\n';
}
/// emitDebugLines - Emit source line information.
O << '\t' << MAI->getCommentString() << " Section"
<< S->getName() << '\n';
}*/
- Asm->EOL();
+ Asm->O << '\n';
// Dwarf assumes we start with first line of first source file.
unsigned Source = 1;
if (LineInfo.getLine() == 0) continue;
if (!Asm->isVerbose())
- Asm->EOL();
+ Asm->O << '\n';
else {
std::pair<unsigned, unsigned> SourceID =
getSourceDirectoryAndFileIds(LineInfo.getSourceID());
emitEndOfLineMatrix(1);
EmitLabel("line_end", 0);
- Asm->EOL();
+ Asm->O << '\n';
}
/// emitCommonDebugFrame - Emit common frame info into a debug frame section.
Asm->EmitAlignment(2, 0, 0, false);
EmitLabel("debug_frame_common_end", 0);
-
- Asm->EOL();
+ Asm->O << '\n';
}
/// emitFunctionDebugFrame - Emit per function frame info into a debug frame
Asm->EmitAlignment(2, 0, 0, false);
EmitLabel("debug_frame_end", DebugFrameInfo.Number);
-
- Asm->EOL();
+ Asm->O << '\n';
}
/// emitDebugPubNames - Emit visible names into a debug pubnames section.
Asm->EmitInt32(0); Asm->EOL("End Mark");
EmitLabel("pubnames_end", ModuleCU->getID());
-
- Asm->EOL();
+ Asm->O << '\n';
}
void DwarfDebug::emitDebugPubTypes() {
Asm->EmitInt32(0); Asm->EOL("End Mark");
EmitLabel("pubtypes_end", ModuleCU->getID());
-
- Asm->EOL();
+ Asm->O << '\n';
}
/// emitDebugStr - Emit visible names into a debug str section.
// Emit the string itself.
const std::string &String = StringPool[StringID];
- Asm->EmitString(String); Asm->EOL();
+ Asm->EmitString(String);
+ Asm->O << '\n';
}
- Asm->EOL();
+ Asm->O << '\n';
}
}
// Start the dwarf loc section.
Asm->OutStreamer.SwitchSection(
Asm->getObjFileLowering().getDwarfLocSection());
- Asm->EOL();
}
/// EmitDebugARanges - Emit visible names into a debug aranges section.
Asm->EmitInt32(0); Asm->EOL("EOM (1)");
Asm->EmitInt32(0); Asm->EOL("EOM (2)");
#endif
-
- Asm->EOL();
}
/// emitDebugRanges - Emit visible names into a debug ranges section.
// Start the dwarf ranges section.
Asm->OutStreamer.SwitchSection(
Asm->getObjFileLowering().getDwarfRangesSection());
- Asm->EOL();
}
/// emitDebugMacInfo - Emit visible names into a debug macinfo section.
Asm->getObjFileLowering().getDwarfMacroInfoSection()) {
// Start the dwarf macinfo section.
Asm->OutStreamer.SwitchSection(LineInfo);
- Asm->EOL();
}
}
Asm->OutStreamer.SwitchSection(
Asm->getObjFileLowering().getDwarfDebugInlineSection());
- Asm->EOL();
+
EmitDifference("debug_inlined_end", 1,
"debug_inlined_begin", 1, true);
Asm->EOL("Length of Debug Inlined Information Entry");
}
EmitLabel("debug_inlined_end", 1);
- Asm->EOL();
+ Asm->O << '\n';
}
#include "llvm/Target/TargetOptions.h"
#include "llvm/Target/TargetRegisterInfo.h"
#include "llvm/Support/Dwarf.h"
+#include "llvm/Support/FormattedStream.h"
#include "llvm/Support/Timer.h"
-#include "llvm/Support/raw_ostream.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringExtras.h"
using namespace llvm;
// holes which confuse readers of eh_frame.
Asm->EmitAlignment(TD->getPointerSize() == 4 ? 2 : 3, 0, 0, false);
EmitLabel("eh_frame_common_end", Index);
-
- Asm->EOL();
+ Asm->O << '\n';
}
/// EmitFDE - Emit the Frame Description Entry (FDE) for the function.
// on unused functions (calling undefined externals) being dead-stripped to
// link correctly. Yes, there really is.
if (MMI->isUsedFunction(EHFrameInfo.function))
- if (const char *UsedDirective = MAI->getUsedDirective()) {
+ if (const char *UsedDirective = MAI->getUsedDirective())
O << UsedDirective << *EHFrameInfo.FunctionEHSym << "\n\n";
- }
}
-
- Asm->EOL();
+ Asm->O << '\n';
}
/// SharedTypeIds - How many leading type ids two landing pads have in common.
if (TypeID != 0)
Asm->EOL("Exception specification");
else
- Asm->EOL();
+ Asm->O << '\n';
}
Asm->EmitAlignment(2, 0, 0, false);