Pass a StringRef to sys::identifyFileType.
[oota-llvm.git] / lib / Archive / Archive.cpp
index 9f1b5e9f2e1a24a568efcf78fc8185f31e843e4c..2b92d0ff8278ff0450f2ec35e08a229b7da4d363 100644 (file)
@@ -15,7 +15,7 @@
 #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"
@@ -129,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;