-ModuleProvider*
-llvm::GetBytecodeSymbols(const unsigned char*Buffer, unsigned Length,
- const std::string& ModuleID,
- std::vector<std::string>& symbols,
- BCDecompressor_t *BCDC,
- std::string* ErrMsg) {
- // Get the module provider
- ModuleProvider* MP =
- getBytecodeBufferModuleProvider(Buffer, Length, ModuleID, BCDC, ErrMsg, 0);
- if (!MP)
- return 0;
+Module*
+llvm::GetBitcodeSymbols(const char *BufPtr, unsigned Length,
+ const std::string& ModuleID,
+ LLVMContext& Context,
+ std::vector<std::string>& symbols,
+ std::string* ErrMsg) {
+ // Get the module.
+ std::auto_ptr<MemoryBuffer> Buffer(
+ MemoryBuffer::getMemBufferCopy(StringRef(BufPtr, Length),ModuleID.c_str()));