Index: lib/Bitcode/Reader/BitcodeReader.cpp =================================================================== --- lib/Bitcode/Reader/BitcodeReader.cpp +++ lib/Bitcode/Reader/BitcodeReader.cpp @@ -25,6 +25,8 @@ #include "llvm/Support/MathExtras.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/raw_ostream.h" +#include "llvm/Support/ManagedStatic.h" + using namespace llvm; enum { @@ -3503,8 +3505,8 @@ } const std::error_category &llvm::BitcodeErrorCategory() { - static BitcodeErrorCategoryType O; - return O; + static ManagedStatic O; + return *O; } //===----------------------------------------------------------------------===//