simplify RecursiveResolveTypes and ResolveTypes by pulling the naming out of
[oota-llvm.git] / tools / llvm-bcanalyzer / llvm-bcanalyzer.cpp
index 354c352475e923c66a318ece6f59182590007ff1..1cd23679edd3fafea7ad0c1180334cca864934e8 100644 (file)
@@ -198,6 +198,7 @@ static const char *GetCodeName(unsigned CodeID, unsigned BlockID) {
     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) {
@@ -372,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 + "'.");