X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=tools%2Fllvm-bcanalyzer%2Fllvm-bcanalyzer.cpp;h=46b687e1c2b346a1afe4c1a738836db18d0ebd32;hb=b09c146b116359616f6cbd4c8b3328607e00ff42;hp=40d40ca1bf1438834de69607d841b6f065e1cd7c;hpb=a759eb3bb9fe50832289fec522d5d0b5dd171af2;p=oota-llvm.git diff --git a/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp b/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp index 40d40ca1bf1..46b687e1c2b 100644 --- a/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp +++ b/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp @@ -37,12 +37,11 @@ #include "llvm/Support/ManagedStatic.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/PrettyStackTrace.h" -#include "llvm/Support/raw_ostream.h" #include "llvm/Support/Signals.h" +#include "llvm/Support/raw_ostream.h" #include "llvm/Support/system_error.h" - -#include #include +#include using namespace llvm; static cl::opt @@ -150,7 +149,7 @@ static const char *GetCodeName(unsigned CodeID, unsigned BlockID, case bitc::MODULE_CODE_DATALAYOUT: return "DATALAYOUT"; case bitc::MODULE_CODE_ASM: return "ASM"; case bitc::MODULE_CODE_SECTIONNAME: return "SECTIONNAME"; - case bitc::MODULE_CODE_DEPLIB: return "DEPLIB"; + case bitc::MODULE_CODE_DEPLIB: return "DEPLIB"; // FIXME: Remove in 4.0 case bitc::MODULE_CODE_GLOBALVAR: return "GLOBALVAR"; case bitc::MODULE_CODE_FUNCTION: return "FUNCTION"; case bitc::MODULE_CODE_ALIAS: return "ALIAS"; @@ -483,7 +482,7 @@ static int AnalyzeBitcode() { if (MemBuf->getBufferSize() & 3) return Error("Bitcode stream should be a multiple of 4 bytes in length"); - const unsigned char *BufPtr = (unsigned char *)MemBuf->getBufferStart(); + const unsigned char *BufPtr = (const unsigned char *)MemBuf->getBufferStart(); const unsigned char *EndBufPtr = BufPtr+MemBuf->getBufferSize(); // If we have a wrapper header, parse it and ignore the non-bc file contents.