summaryrefslogtreecommitdiffstats
path: root/llvm/lib
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
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')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp27
-rw-r--r--llvm/lib/DebugInfo/CodeView/CVTypeVisitor.cpp15
2 files changed, 0 insertions, 42 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);
}
}
diff --git a/llvm/lib/DebugInfo/CodeView/CVTypeVisitor.cpp b/llvm/lib/DebugInfo/CodeView/CVTypeVisitor.cpp
index ec4773d571c..dd6f75f97a4 100644
--- a/llvm/lib/DebugInfo/CodeView/CVTypeVisitor.cpp
+++ b/llvm/lib/DebugInfo/CodeView/CVTypeVisitor.cpp
@@ -209,14 +209,6 @@ struct VisitHelper {
}
}
- VisitHelper(TypeVisitorCallbackPipeline &Callbacks, VisitorDataSource Source)
- : Visitor((Source == VDS_BytesPresent) ? Pipeline : Callbacks) {
- if (Source == VDS_BytesPresent) {
- Pipeline = Callbacks;
- Pipeline.addCallbackToPipelineFront(Deserializer);
- }
- }
-
TypeDeserializer Deserializer;
TypeVisitorCallbackPipeline Pipeline;
CVTypeVisitor Visitor;
@@ -230,13 +222,6 @@ Error llvm::codeview::visitTypeRecord(CVType &Record, TypeIndex Index,
return V.Visitor.visitTypeRecord(Record, Index);
}
-Error llvm::codeview::visitTypeRecord(CVType &Record, TypeIndex Index,
- TypeVisitorCallbackPipeline &Callbacks,
- VisitorDataSource Source) {
- VisitHelper V(Callbacks, Source);
- return V.Visitor.visitTypeRecord(Record, Index);
-}
-
Error llvm::codeview::visitTypeRecord(CVType &Record,
TypeVisitorCallbacks &Callbacks,
VisitorDataSource Source) {
OpenPOWER on IntegriCloud