[llvm-commits] CVS: llvm/lib/Bytecode/Analyzer/Dumper.cpp

LLVM llvm at cs.uiuc.edu
Wed Jun 9 01:21:10 PDT 2004


Changes in directory llvm/lib/Bytecode/Analyzer:

Dumper.cpp updated: 1.1 -> 1.2

---
Log message:

Clean up indentation of file body output.
Don't dump functions unless "detailedResults" is requested.


---
Diffs of the changes:  (+10 -9)

Index: llvm/lib/Bytecode/Analyzer/Dumper.cpp
diff -u llvm/lib/Bytecode/Analyzer/Dumper.cpp:1.1 llvm/lib/Bytecode/Analyzer/Dumper.cpp:1.2
--- llvm/lib/Bytecode/Analyzer/Dumper.cpp:1.1	Mon Jun  7 12:53:43 2004
+++ llvm/lib/Bytecode/Analyzer/Dumper.cpp	Wed Jun  9 01:16:19 2004
@@ -190,23 +190,23 @@
     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 @@
     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 @@
   BytecodeDumper TheHandler;
   AbstractBytecodeParser TheParser(&TheHandler);
   TheParser.ParseBytecode( Buf, Length, ModuleID );
-  TheParser.ParseAllFunctionBodies();
+  if ( bca.detailedResults )
+    TheParser.ParseAllFunctionBodies();
 }
 
 // vim: sw=2





More information about the llvm-commits mailing list