diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2004-06-09 06:16:19 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2004-06-09 06:16:19 +0000 |
commit | 0545b3e67335b73955ac8940e3341c5b7c1cb7a4 (patch) | |
tree | 7af78724f06f786ab7530eefb00a57342a221735 | |
parent | a670c414f7eda9d89bf195462c534bd95a39ad8b (diff) | |
download | external_llvm-0545b3e67335b73955ac8940e3341c5b7c1cb7a4.zip external_llvm-0545b3e67335b73955ac8940e3341c5b7c1cb7a4.tar.gz external_llvm-0545b3e67335b73955ac8940e3341c5b7c1cb7a4.tar.bz2 |
Clean up indentation of file body output.
Don't dump functions unless "detailedResults" is requested.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14089 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Bytecode/Analyzer/Dumper.cpp | 19 | ||||
-rw-r--r-- | lib/Bytecode/Reader/Dumper.cpp | 19 |
2 files changed, 20 insertions, 18 deletions
diff --git a/lib/Bytecode/Analyzer/Dumper.cpp b/lib/Bytecode/Analyzer/Dumper.cpp index 6ff4ea0..12752ff 100644 --- a/lib/Bytecode/Analyzer/Dumper.cpp +++ b/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/lib/Bytecode/Reader/Dumper.cpp b/lib/Bytecode/Reader/Dumper.cpp index 6ff4ea0..12752ff 100644 --- a/lib/Bytecode/Reader/Dumper.cpp +++ b/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 |