summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-01-22 23:47:11 +0000
committerChris Lattner <sabre@nondot.org>2010-01-22 23:47:11 +0000
commit6f2d99df0328a2d45e9cc496ff3a1fd4c2274108 (patch)
treee8140b2913a0c8cc222474a9882978be5222f067 /llvm/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
parent56940ab8990f158547480d1171e90fe40455f4c7 (diff)
downloadbcm5719-llvm-6f2d99df0328a2d45e9cc496ff3a1fd4c2274108.tar.gz
bcm5719-llvm-6f2d99df0328a2d45e9cc496ff3a1fd4c2274108.zip
move "EOL" from asmprinter to dwarfprinter. It should eventually
be completely eliminated, but today is not that day. llvm-svn: 94253
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
index 77a60e70b97..d204bba7e99 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
@@ -42,6 +42,16 @@ void DwarfPrinter::PrintRelDirective(bool Force32Bit, bool isInSection) const {
O << MAI->getData64bitsDirective();
}
+/// EOL - Print a newline character to asm stream. If a comment is present
+/// then it will be printed first. Comments should not contain '\n'.
+void DwarfPrinter::EOL(const Twine &Comment) const {
+ if (Asm->VerboseAsm && !Comment.isTriviallyEmpty()) {
+ Asm->O.PadToColumn(MAI->getCommentColumn());
+ Asm->O << Asm->MAI->getCommentString() << ' ' << Comment;
+ }
+ Asm->O << '\n';
+}
+
static const char *DecodeDWARFEncoding(unsigned Encoding) {
switch (Encoding) {
case dwarf::DW_EH_PE_absptr: return "absptr";
OpenPOWER on IntegriCloud