summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
diff options
context:
space:
mode:
authorNilanjana Basu <nilanjana.basu87@gmail.com>2019-08-25 01:09:11 +0000
committerNilanjana Basu <nilanjana.basu87@gmail.com>2019-08-25 01:09:11 +0000
commit7da6f432d8bcaeacb87e5d9c2d950d6674a45df9 (patch)
treea82464d90a5493278c4412b3a165121c7e567856 /llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
parentcc4b0596b1b0e58672e4151396c7b804eccaf273 (diff)
downloadbcm5719-llvm-7da6f432d8bcaeacb87e5d9c2d950d6674a45df9.tar.gz
bcm5719-llvm-7da6f432d8bcaeacb87e5d9c2d950d6674a45df9.zip
Removing block comments from CodeView records in assembly files & related code cleanup
llvm-svn: 369860
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp27
1 files changed, 0 insertions, 27 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
index d4b8db088e0..616b1368a7a 100644
--- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
@@ -642,27 +642,8 @@ void CodeViewDebug::emitTypeInformation() {
OS.SwitchSection(Asm->getObjFileLowering().getCOFFDebugTypesSection());
emitCodeViewMagicVersion();
- SmallString<8> CommentPrefix;
- if (OS.isVerboseAsm()) {
- CommentPrefix += '\t';
- CommentPrefix += Asm->MAI->getCommentString();
- CommentPrefix += ' ';
- }
-
TypeTableCollection Table(TypeTable.records());
TypeVisitorCallbackPipeline Pipeline;
- SmallString<512> CommentBlock;
- raw_svector_ostream CommentOS(CommentBlock);
- std::unique_ptr<ScopedPrinter> SP;
- std::unique_ptr<TypeDumpVisitor> TDV;
-
- if (OS.isVerboseAsm()) {
- // To construct block comment describing the type record for readability.
- SP = std::make_unique<ScopedPrinter>(CommentOS);
- SP->setPrefix(CommentPrefix);
- TDV = std::make_unique<TypeDumpVisitor>(Table, SP.get(), false);
- Pipeline.addCallbackToPipeline(*TDV);
- }
// To emit type record using Codeview MCStreamer adapter
CVMCAdapter CVMCOS(OS, Table);
@@ -674,7 +655,6 @@ void CodeViewDebug::emitTypeInformation() {
// This will fail if the record data is invalid.
CVType Record = Table.getType(*B);
- CommentBlock.clear();
Error E = codeview::visitTypeRecord(Record, *B, Pipeline);
if (E) {
@@ -682,13 +662,6 @@ void CodeViewDebug::emitTypeInformation() {
llvm_unreachable("produced malformed type record");
}
- if (OS.isVerboseAsm()) {
- // emitRawComment will insert its own tab and comment string before
- // the first line, so strip off our first one. It also prints its own
- // newline.
- OS.emitRawComment(
- CommentOS.str().drop_front(CommentPrefix.size() - 1).rtrim());
- }
B = Table.getNext(*B);
}
}
OpenPOWER on IntegriCloud