summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-08-23 00:51:47 +0000
committerChris Lattner <sabre@nondot.org>2009-08-23 00:51:47 +0000
commit623dd141b4c09b29de2c52d55328a787205d9340 (patch)
tree46fba6d8211d66218d082455035a1ea693c141d8 /lib
parentc281de1d8485b5ec64f4b330b541f91d1ee86c37 (diff)
downloadllvm-623dd141b4c09b29de2c52d55328a787205d9340.tar.gz
llvm-623dd141b4c09b29de2c52d55328a787205d9340.tar.bz2
llvm-623dd141b4c09b29de2c52d55328a787205d9340.tar.xz
random code cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79798 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/AsmPrinter/AsmPrinter.cpp36
1 files changed, 17 insertions, 19 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index d2afe1e46d..c3175dd675 100644
--- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -1751,27 +1751,25 @@ void AsmPrinter::EmitComments(const MachineInstr &MI) const {
}
/// EmitComments - Pretty-print comments for instructions
-void AsmPrinter::EmitComments(const MCInst &MI) const
-{
- if (VerboseAsm) {
- if (!MI.getDebugLoc().isUnknown()) {
- DebugLocTuple DLT = MF->getDebugLocTuple(MI.getDebugLoc());
+void AsmPrinter::EmitComments(const MCInst &MI) const {
+ if (!VerboseAsm ||
+ MI.getDebugLoc().isUnknown())
+ return;
+
+ DebugLocTuple DLT = MF->getDebugLocTuple(MI.getDebugLoc());
- // Print source line info
- O.PadToColumn(MAI->getCommentColumn());
- O << MAI->getCommentString() << " SrcLine ";
- if (DLT.CompileUnit->hasInitializer()) {
- Constant *Name = DLT.CompileUnit->getInitializer();
- if (ConstantArray *NameString = dyn_cast<ConstantArray>(Name))
- if (NameString->isString()) {
- O << NameString->getAsString() << " ";
- }
- }
- O << DLT.Line;
- if (DLT.Col != 0)
- O << ":" << DLT.Col;
- }
+ // Print source line info
+ O.PadToColumn(MAI->getCommentColumn());
+ O << MAI->getCommentString() << " SrcLine ";
+ if (DLT.CompileUnit->hasInitializer()) {
+ Constant *Name = DLT.CompileUnit->getInitializer();
+ if (ConstantArray *NameString = dyn_cast<ConstantArray>(Name))
+ if (NameString->isString())
+ O << NameString->getAsString() << " ";
}
+ O << DLT.Line;
+ if (DLT.Col != 0)
+ O << ":" << DLT.Col;
}
/// PrintChildLoopComment - Print comments about child loops within