summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bytecode
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-06-09 06:16:19 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-06-09 06:16:19 +0000
commitf1598b0efa7e56cc84169a6e9417f17fd5dc0de1 (patch)
tree15b18fcfcf1179724fc65cd72610757a2e5ff497 /llvm/lib/Bytecode
parentfc6f5508aa6d6080ee135546383e52a35b9dc530 (diff)
downloadbcm5719-llvm-f1598b0efa7e56cc84169a6e9417f17fd5dc0de1.tar.gz
bcm5719-llvm-f1598b0efa7e56cc84169a6e9417f17fd5dc0de1.zip
Clean up indentation of file body output.
Don't dump functions unless "detailedResults" is requested. llvm-svn: 14089
Diffstat (limited to 'llvm/lib/Bytecode')
-rw-r--r--llvm/lib/Bytecode/Analyzer/Dumper.cpp19
-rw-r--r--llvm/lib/Bytecode/Reader/Dumper.cpp19
2 files changed, 20 insertions, 18 deletions
diff --git a/llvm/lib/Bytecode/Analyzer/Dumper.cpp b/llvm/lib/Bytecode/Analyzer/Dumper.cpp
index 6ff4ea0c796..12752ff883d 100644
--- a/llvm/lib/Bytecode/Analyzer/Dumper.cpp
+++ b/llvm/lib/Bytecode/Analyzer/Dumper.cpp
@@ -190,23 +190,23 @@ public:
GlobalValue::LinkageTypes linkage
)
{
- std::cout << " BLOCK: Function {\n";
- std::cout << " Linkage: " << linkage << "\n";
- std::cout << " Type: " << FType->getDescription() << "\n";
+ std::cout << "BLOCK: Function {\n";
+ std::cout << " Linkage: " << linkage << "\n";
+ std::cout << " Type: " << FType->getDescription() << "\n";
}
virtual void handleFunctionEnd(
const Type* FType
)
{
- std::cout << " } END BLOCK: Function\n";
+ std::cout << "} END BLOCK: Function\n";
}
virtual void handleBasicBlockBegin(
unsigned blocknum
)
{
- std::cout << " BLOCK: BasicBlock #" << blocknum << "{\n";
+ std::cout << " BLOCK: BasicBlock #" << blocknum << "{\n";
}
virtual bool handleInstruction(
@@ -215,18 +215,18 @@ public:
std::vector<unsigned>& Operands
)
{
- std::cout << " INST: OpCode="
+ std::cout << " INST: OpCode="
<< Instruction::getOpcodeName(Opcode) << " Type="
<< iType->getDescription() << "\n";
for ( unsigned i = 0; i < Operands.size(); ++i )
- std::cout << " Op#" << i << " Slot=" << Operands[i] << "\n";
+ std::cout << " Op#" << i << " Slot=" << Operands[i] << "\n";
return Instruction::isTerminator(Opcode);
}
virtual void handleBasicBlockEnd(unsigned blocknum)
{
- std::cout << " } END BLOCK: BasicBlock #" << blocknum << "{\n";
+ std::cout << " } END BLOCK: BasicBlock #" << blocknum << "{\n";
}
virtual void handleGlobalConstantsBegin()
@@ -305,7 +305,8 @@ void BytecodeAnalyzer::DumpBytecode(
BytecodeDumper TheHandler;
AbstractBytecodeParser TheParser(&TheHandler);
TheParser.ParseBytecode( Buf, Length, ModuleID );
- TheParser.ParseAllFunctionBodies();
+ if ( bca.detailedResults )
+ TheParser.ParseAllFunctionBodies();
}
// vim: sw=2
diff --git a/llvm/lib/Bytecode/Reader/Dumper.cpp b/llvm/lib/Bytecode/Reader/Dumper.cpp
index 6ff4ea0c796..12752ff883d 100644
--- a/llvm/lib/Bytecode/Reader/Dumper.cpp
+++ b/llvm/lib/Bytecode/Reader/Dumper.cpp
@@ -190,23 +190,23 @@ public:
GlobalValue::LinkageTypes linkage
)
{
- std::cout << " BLOCK: Function {\n";
- std::cout << " Linkage: " << linkage << "\n";
- std::cout << " Type: " << FType->getDescription() << "\n";
+ std::cout << "BLOCK: Function {\n";
+ std::cout << " Linkage: " << linkage << "\n";
+ std::cout << " Type: " << FType->getDescription() << "\n";
}
virtual void handleFunctionEnd(
const Type* FType
)
{
- std::cout << " } END BLOCK: Function\n";
+ std::cout << "} END BLOCK: Function\n";
}
virtual void handleBasicBlockBegin(
unsigned blocknum
)
{
- std::cout << " BLOCK: BasicBlock #" << blocknum << "{\n";
+ std::cout << " BLOCK: BasicBlock #" << blocknum << "{\n";
}
virtual bool handleInstruction(
@@ -215,18 +215,18 @@ public:
std::vector<unsigned>& Operands
)
{
- std::cout << " INST: OpCode="
+ std::cout << " INST: OpCode="
<< Instruction::getOpcodeName(Opcode) << " Type="
<< iType->getDescription() << "\n";
for ( unsigned i = 0; i < Operands.size(); ++i )
- std::cout << " Op#" << i << " Slot=" << Operands[i] << "\n";
+ std::cout << " Op#" << i << " Slot=" << Operands[i] << "\n";
return Instruction::isTerminator(Opcode);
}
virtual void handleBasicBlockEnd(unsigned blocknum)
{
- std::cout << " } END BLOCK: BasicBlock #" << blocknum << "{\n";
+ std::cout << " } END BLOCK: BasicBlock #" << blocknum << "{\n";
}
virtual void handleGlobalConstantsBegin()
@@ -305,7 +305,8 @@ void BytecodeAnalyzer::DumpBytecode(
BytecodeDumper TheHandler;
AbstractBytecodeParser TheParser(&TheHandler);
TheParser.ParseBytecode( Buf, Length, ModuleID );
- TheParser.ParseAllFunctionBodies();
+ if ( bca.detailedResults )
+ TheParser.ParseAllFunctionBodies();
}
// vim: sw=2
OpenPOWER on IntegriCloud