summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorFrancis Visoiu Mistrih <fvisoiumistrih@apple.com>2017-05-23 21:22:16 +0000
committerFrancis Visoiu Mistrih <fvisoiumistrih@apple.com>2017-05-23 21:22:16 +0000
commit1c98701e57e9e9342c375fd54ef99d827b61414a (patch)
tree9e5ca081f9efed711708da0c2a4cb6be7339a8c0 /llvm/lib/CodeGen
parent968fe938031846b58bd2980d51cb9053b820ac2d (diff)
downloadbcm5719-llvm-1c98701e57e9e9342c375fd54ef99d827b61414a.tar.gz
bcm5719-llvm-1c98701e57e9e9342c375fd54ef99d827b61414a.zip
AsmPrinter: mark the beginning and the end of a function in verbose mode
llvm-svn: 303690
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 7ddb86d80bf..d72cf592298 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -628,12 +628,15 @@ void AsmPrinter::EmitDebugThreadLocal(const MCExpr *Value,
/// EmitFunctionHeader - This method emits the header for the current
/// function.
void AsmPrinter::EmitFunctionHeader() {
+ const Function *F = MF->getFunction();
+
+ if (isVerbose())
+ OutStreamer->GetCommentOS() << "-- Begin function " << F->getName() << '\n';
+
// Print out constants referenced by the function
EmitConstantPool();
// Print the 'header' of function.
- const Function *F = MF->getFunction();
-
OutStreamer->SwitchSection(getObjFileLowering().SectionForGlobal(F, TM));
EmitVisibility(CurrentFnSym, F->getVisibility());
@@ -1107,6 +1110,9 @@ void AsmPrinter::EmitFunctionBody() {
HI.Handler->endFunction(MF);
}
+ if (isVerbose())
+ OutStreamer->GetCommentOS() << "-- End function\n";
+
OutStreamer->AddBlankLine();
}
OpenPOWER on IntegriCloud