Pass a StringRef to sys::identifyFileType.
[oota-llvm.git] / lib / Archive / Archive.cpp
index 1eab27d3eba3a59d36e527f27ce6d361992bcf8c..2b92d0ff8278ff0450f2ec35e08a229b7da4d363 100644 (file)
 //
 //===----------------------------------------------------------------------===//
 
+#include "llvm/Bitcode/Archive.h"
 #include "ArchiveInternals.h"
 #include "llvm/Bitcode/ReaderWriter.h"
-#include "llvm/Module.h"
+#include "llvm/IR/Module.h"
 #include "llvm/Support/FileSystem.h"
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/Process.h"
 #include "llvm/Support/system_error.h"
-#include <memory>
 #include <cstring>
+#include <memory>
 using namespace llvm;
 
 // getMemberSize - compute the actual physical size of the file member as seen
@@ -128,7 +129,7 @@ bool ArchiveMember::replaceWith(const sys::Path& newFile, std::string* ErrMsg) {
   }
 
   // Determine what kind of file it is.
-  switch (sys::IdentifyFileType(signature,4)) {
+  switch (sys::identifyFileType(StringRef(signature, 4))) {
     case sys::Bitcode_FileType:
       flags |= BitcodeFlag;
       break;