Apply changes to migrate to llvm upstream r135568.

- Remove the const qualifier of llvm::Type and
  llvm::PointerType due to the API change.

- Update the relocation model setup code, since
  llvm::TargetMachine changes the API.

- Qualify dyn_cast with llvm namespace.

Change-Id: I4820fb86effc3a62569e19a6a8753ba9e960f6b2
diff --git a/slang_rs_ast_replace.cpp b/slang_rs_ast_replace.cpp
index 7bcdd17..8ff3da5 100644
--- a/slang_rs_ast_replace.cpp
+++ b/slang_rs_ast_replace.cpp
@@ -18,6 +18,8 @@
 
 #include "slang_assert.h"
 
+#include "llvm/Support/Casting.h"
+
 namespace slang {
 
 void RSASTReplace::ReplaceStmt(
@@ -30,9 +32,9 @@
 
   // This simplifies use in various Stmt visitor passes where the only
   // valid type is an Expr.
-  mOldExpr = dyn_cast<clang::Expr>(OldStmt);
+  mOldExpr = llvm::dyn_cast<clang::Expr>(OldStmt);
   if (mOldExpr) {
-    mNewExpr = dyn_cast<clang::Expr>(NewStmt);
+    mNewExpr = llvm::dyn_cast<clang::Expr>(NewStmt);
   }
   Visit(mOuterStmt);
 }