Update slang for LLVM 3.5 rebase (r209713).

Change-Id: If0f510085358d2e48c865257851d9ff7f5846eb8
diff --git a/llvm-rs-as.cpp b/llvm-rs-as.cpp
index 0367e23..9e61395 100644
--- a/llvm-rs-as.cpp
+++ b/llvm-rs-as.cpp
@@ -22,6 +22,7 @@
 #include "llvm/Bitcode/ReaderWriter.h"
 #include "llvm/IR/Module.h"
 #include "llvm/Support/CommandLine.h"
+#include "llvm/Support/FileSystem.h"
 #include "llvm/Support/ManagedStatic.h"
 #include "llvm/Support/PrettyStackTrace.h"
 #include "llvm/Support/Signals.h"
diff --git a/llvm-rs-cc.cpp b/llvm-rs-cc.cpp
index d26eb63..40209e0 100644
--- a/llvm-rs-cc.cpp
+++ b/llvm-rs-cc.cpp
@@ -515,7 +515,7 @@
                               llvm::SmallVectorImpl<const char*> &ArgVector,
                               std::set<std::string> &SavedStrings) {
   const char *FName = Arg + 1;
-  llvm::OwningPtr<llvm::MemoryBuffer> MemBuf;
+  std::unique_ptr<llvm::MemoryBuffer> MemBuf;
   if (llvm::MemoryBuffer::getFile(FName, MemBuf)) {
     // Unable to open the file
     ArgVector.push_back(SaveStringInSet(SavedStrings, Arg));
diff --git a/slang.cpp b/slang.cpp
index 2edb84b..218efd1 100644
--- a/slang.cpp
+++ b/slang.cpp
@@ -216,13 +216,13 @@
   mPP.reset(new clang::Preprocessor(PPOpts,
                                     *mDiagEngine,
                                     LangOpts,
-                                    mTarget.get(),
                                     *mSourceMgr,
                                     *HeaderInfo,
                                     *this,
                                     NULL,
                                     /* OwnsHeaderSearch = */true));
   // Initialize the preprocessor
+  mPP->Initialize(getTargetInfo());
   mPragmas.clear();
   mPP->AddPragmaHandler(new PragmaRecorder(&mPragmas));
 
@@ -247,11 +247,10 @@
 void Slang::createASTContext() {
   mASTContext.reset(new clang::ASTContext(LangOpts,
                                           *mSourceMgr,
-                                          mTarget.get(),
                                           mPP->getIdentifierTable(),
                                           mPP->getSelectorTable(),
-                                          mPP->getBuiltinInfo(),
-                                          /* size_reserve = */0));
+                                          mPP->getBuiltinInfo()));
+  mASTContext->InitBuiltinTypes(getTargetInfo());
   initASTContext();
 }
 
@@ -307,7 +306,7 @@
   // Load the source
   llvm::MemoryBuffer *SB =
       llvm::MemoryBuffer::getMemBuffer(Text, Text + TextLength);
-  mSourceMgr->createMainFileIDForMemBuffer(SB);
+  mSourceMgr->setMainFileID(mSourceMgr->createFileID(SB));
 
   if (mSourceMgr->getMainFileID().isInvalid()) {
     mDiagEngine->Report(clang::diag::err_fe_error_reading) << InputFile;
@@ -322,8 +321,10 @@
   mSourceMgr->clearIDTables();
 
   const clang::FileEntry *File = mFileMgr->getFile(InputFile);
-  if (File)
-    mSourceMgr->createMainFileID(File);
+  if (File) {
+    mSourceMgr->setMainFileID(mSourceMgr->createFileID(File,
+        clang::SourceLocation(), clang::SrcMgr::C_User));
+  }
 
   if (mSourceMgr->getMainFileID().isInvalid()) {
     mDiagEngine->Report(clang::diag::err_fe_error_reading) << InputFile;
diff --git a/slang_rs.h b/slang_rs.h
index 4849239..de149f2 100644
--- a/slang_rs.h
+++ b/slang_rs.h
@@ -153,6 +153,12 @@
                                  clang::Module::NameVisibilityKind Visibility,
                                  clang::SourceLocation ImportLoc,
                                  bool Complain = false) { }
+
+  virtual clang::GlobalModuleIndex *loadGlobalModuleIndex(
+      clang::SourceLocation TriggerLoc) { }
+
+  virtual bool lookupMissingImports(llvm::StringRef Name,
+                                    clang::SourceLocation TriggerLoc) { }
 };
 }  // namespace slang
 
diff --git a/tests/F_vector_cast/stderr.txt.expect b/tests/F_vector_cast/stderr.txt.expect
index b8fa5ea..fdf739c 100644
--- a/tests/F_vector_cast/stderr.txt.expect
+++ b/tests/F_vector_cast/stderr.txt.expect
@@ -1,5 +1,5 @@
-vector_cast.rs:8:11: error: can't convert between vector values of different size ('float2' and 'int2')
-vector_cast.rs:15:11: error: can't convert between vector values of different size ('int3' and 'float3')
+vector_cast.rs:8:11: error: can't convert between vector values of different size ('float2' (vector of 2 'float' values) and 'int2' (vector of 2 'int' values))
+vector_cast.rs:15:11: error: can't convert between vector values of different size ('int3' (vector of 3 'int' values) and 'float3' (vector of 3 'float' values))
 vector_cast.rs:7:9: error: invalid vector cast
 vector_cast.rs:14:9: error: invalid vector cast
 vector_cast.rs:21:9: error: invalid vector cast