simplify RecursiveResolveTypes and ResolveTypes by pulling the naming out of
[oota-llvm.git] / tools / llvm-bcanalyzer / llvm-bcanalyzer.cpp
index b596fe3731004c3d3c50fa6a6a5afe9fc675966e..1cd23679edd3fafea7ad0c1180334cca864934e8 100644 (file)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file was developed by Reid Spencer and is distributed under the
-// University of Illinois Open Source License. See LICENSE.TXT for details.
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 //
@@ -197,6 +197,8 @@ static const char *GetCodeName(unsigned CodeID, unsigned BlockID) {
     case bitc::FUNC_CODE_INST_STORE:       return "INST_STORE";
     case bitc::FUNC_CODE_INST_CALL:        return "INST_CALL";
     case bitc::FUNC_CODE_INST_VAARG:       return "INST_VAARG";
+    case bitc::FUNC_CODE_INST_STORE2:      return "INST_STORE2";
+    case bitc::FUNC_CODE_INST_GETRESULT:   return "INST_GETRESULT";
     }
   case bitc::TYPE_SYMTAB_BLOCK_ID:
     switch (CodeID) {
@@ -371,11 +373,7 @@ static void PrintSize(double Bits) {
 /// AnalyzeBitcode - Analyze the bitcode file specified by InputFilename.
 static int AnalyzeBitcode() {
   // Read the input file.
-  MemoryBuffer *Buffer;
-  if (InputFilename == "-")
-    Buffer = MemoryBuffer::getSTDIN();
-  else
-    Buffer = MemoryBuffer::getFile(&InputFilename[0], InputFilename.size());
+  MemoryBuffer *Buffer = MemoryBuffer::getFileOrSTDIN(InputFilename.c_str());
 
   if (Buffer == 0)
     return Error("Error reading '" + InputFilename + "'.");