Index: include/SafeDynMemAlloc.h
===================================================================
--- include/SafeDynMemAlloc.h	(revision 161409)
+++ include/SafeDynMemAlloc.h	(working copy)
@@ -48,7 +48,6 @@
 #include "llvm/Constants.h"
 #include "llvm/Support/CFG.h"
 #include "llvm/Analysis/CallGraph.h"
-#include "llvm/ADT/VectorExtras.h"
 #include "llvm/Support/Debug.h"
 
 #include "poolalloc/PoolAllocate.h"
Index: lib/ArrayBoundChecks/ArrayBoundCheckLocal.cpp
===================================================================
--- lib/ArrayBoundChecks/ArrayBoundCheckLocal.cpp	(revision 161409)
+++ lib/ArrayBoundChecks/ArrayBoundCheckLocal.cpp	(working copy)
@@ -23,14 +23,14 @@
 #include <set>
 #include <queue>
 
+using namespace llvm;
+
 namespace {
   STATISTIC (allGEPs ,    "Total Number of GEPs Queried");
   STATISTIC (safeGEPs ,   "Number of GEPs Proven Safe Statically");
   STATISTIC (unsafeGEPs , "Number of GEPs Proven Unsafe Statically");
 }
 
-namespace llvm {
-
 RegisterPass<ArrayBoundsCheckLocal>
 X ("abc-local", "Local Array Bounds Check pass");
 
@@ -201,4 +201,4 @@
 ArrayBoundsCheckLocal::isGEPSafe (GetElementPtrInst * GEP) {
   return ((SafeGEPs.count(GEP)) > 0);
 }
-}
+
Index: lib/ArrayBoundChecks/ConstraintGeneration.cpp
===================================================================
--- lib/ArrayBoundChecks/ConstraintGeneration.cpp	(revision 161409)
+++ lib/ArrayBoundChecks/ConstraintGeneration.cpp	(working copy)
@@ -22,7 +22,6 @@
 #include "llvm/ADT/StringExtras.h"
 #include "llvm/Constants.h"
 #include "llvm/Analysis/LoopInfo.h"
-#include "llvm/ADT/VectorExtras.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Analysis/CallGraph.h"
 #include "ConstraintGeneration.h"
Index: lib/BaggyBoundsChecks/BaggyBoundsChecks.cpp
===================================================================
--- lib/BaggyBoundsChecks/BaggyBoundsChecks.cpp	(revision 161409)
+++ lib/BaggyBoundsChecks/BaggyBoundsChecks.cpp	(working copy)
@@ -24,7 +24,7 @@
 #include "llvm/Module.h"
 #include "llvm/Support/InstIterator.h"
 #include "llvm/Transforms/Utils/Cloning.h"
-#include "llvm/Support/TypeBuilder.h"
+#include "llvm/TypeBuilder.h"
 
 #include "safecode/BaggyBoundsChecks.h"
 #include "safecode/Runtime/BBMetaData.h"
@@ -527,7 +527,7 @@
   FunctionType *NewFTy = FunctionType::get(FTy->getReturnType(), TP, false);
   Function *NewF = Function::Create(NewFTy,
                           GlobalValue::InternalLinkage,
-                          F->getNameStr() + ".TEST",
+                          F->getName() + ".TEST",
                           F->getParent());
   //
   // Create the arguments mapping between the original and the clonal function
Index: lib/ConvertUnsafeAllocas/convert.cpp
===================================================================
--- lib/ConvertUnsafeAllocas/convert.cpp	(revision 161409)
+++ lib/ConvertUnsafeAllocas/convert.cpp	(working copy)
@@ -215,7 +215,7 @@
   std::vector<Instruction*> FreePoints;
   for (Function::iterator BB = F->begin(), E = F->end(); BB != E; ++BB)
     if (isa<ReturnInst>(BB->getTerminator()) ||
-        isa<UnwindInst>(BB->getTerminator()))
+        isa<ResumeInst>(BB->getTerminator()))
       FreePoints.push_back(BB->getTerminator());
 
   //
@@ -633,7 +633,7 @@
   std::vector<Instruction*> FreePoints;
   for (Function::iterator BB = F->begin(), E = F->end(); BB != E; ++BB)
     if (isa<ReturnInst>(BB->getTerminator()) ||
-        isa<UnwindInst>(BB->getTerminator()))
+        isa<ResumeInst>(BB->getTerminator()))
       FreePoints.push_back(BB->getTerminator());
 
   // We have the Free points; now we construct the free instructions at each
Index: lib/ConvertUnsafeAllocas/InitAllocas.cpp
===================================================================
--- lib/ConvertUnsafeAllocas/InitAllocas.cpp	(revision 161409)
+++ lib/ConvertUnsafeAllocas/InitAllocas.cpp	(working copy)
@@ -25,7 +25,6 @@
 #include "safecode/Utility.h"
 
 #include "llvm/ADT/Statistic.h"
-#include "llvm/ADT/VectorExtras.h"
 #include "llvm/Pass.h"
 #include "llvm/BasicBlock.h"
 #include "llvm/Type.h"
Index: lib/DebugInstrumentation/DebugInstrumentation.cpp
===================================================================
--- lib/DebugInstrumentation/DebugInstrumentation.cpp	(revision 161409)
+++ lib/DebugInstrumentation/DebugInstrumentation.cpp	(working copy)
@@ -19,7 +19,7 @@
 #define DEBUG_TYPE "debug-instrumentation"
 
 
-#include "llvm/Analysis/DebugInfo.h"
+#include "llvm/DebugInfo.h"
 #include "llvm/Constants.h"
 #include "llvm/IntrinsicInst.h"
 #include "llvm/Instructions.h"
@@ -28,7 +28,6 @@
 #include "llvm/Metadata.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/InstIterator.h"
-#include "llvm/ADT/VectorExtras.h"
 #include "llvm/ADT/Statistic.h"
 #include "llvm/Support/CallSite.h"
 #include "llvm/Support/Debug.h"
@@ -112,7 +111,7 @@
                                                      GV->getInitializer(),
                                                      GV->getName(),
                                                      0,
-                                                     GV->isThreadLocal(),
+                                                     GV->getThreadLocalMode(),
                                                      0);
         SrcGV->copyAttributesFrom (GV);
         SrcGV->setSection ("");
@@ -182,7 +181,8 @@
   if (SourceFileMap.find (filename) != SourceFileMap.end()) {
     SourceFile = SourceFileMap[filename];
   } else {
-    Constant * FInit = ConstantArray::get (CI->getContext(), filename);
+    Constant * FInit = ConstantDataArray::getString (CI->getContext(),
+                                                     filename);
     Module * M = CI->getParent()->getParent()->getParent();
     SourceFile = new GlobalVariable (*M,
                                      FInit->getType(),
@@ -261,7 +261,8 @@
   if (SourceFileMap.find (filename) != SourceFileMap.end()) {
     SourceFile = SourceFileMap[filename];
   } else {
-    Constant * FInit = ConstantArray::get (CI->getContext(), filename);
+    Constant * FInit = ConstantDataArray::getString (CI->getContext(),
+                                                     filename);
     Module * M = CI->getParent()->getParent()->getParent();
     SourceFile = new GlobalVariable (*M,
                                      FInit->getType(),
Index: lib/FaultInjector/FaultInjector.cpp
===================================================================
--- lib/FaultInjector/FaultInjector.cpp	(revision 161409)
+++ lib/FaultInjector/FaultInjector.cpp	(working copy)
@@ -16,7 +16,7 @@
 
 #include "dsa/DSGraph.h"
 
-#include "llvm/Analysis/DebugInfo.h"
+#include "llvm/DebugInfo.h"
 #include "llvm/Constants.h"
 #include "llvm/Instructions.h"
 #include "llvm/IntrinsicInst.h"
@@ -24,7 +24,6 @@
 #include "llvm/Module.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/InstIterator.h"
-#include "llvm/ADT/VectorExtras.h"
 #include "llvm/ADT/Statistic.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/GetElementPtrTypeIterator.h"
Index: lib/FormatStrings/FormatStrings.cpp
===================================================================
--- lib/FormatStrings/FormatStrings.cpp	(revision 161409)
+++ lib/FormatStrings/FormatStrings.cpp	(working copy)
@@ -17,7 +17,7 @@
 #include "llvm/ADT/Statistic.h"
 #include "llvm/LLVMContext.h"
 #include "llvm/Support/CallSite.h"
-#include "llvm/Support/IRBuilder.h"
+#include "llvm/IRBuilder.h"
 
 #include "safecode/FormatStrings.h"
 #include "safecode/Utility.h"
Index: lib/InsertPoolChecks/RegisterBounds.cpp
===================================================================
--- lib/InsertPoolChecks/RegisterBounds.cpp	(revision 161409)
+++ lib/InsertPoolChecks/RegisterBounds.cpp	(working copy)
@@ -695,7 +695,7 @@
   //
   SmallSet<BasicBlock *, 4> exitBlocks;
   for (inst_iterator I = inst_begin(&F), E = inst_end(&F); I != E; ++I) {
-    if (isa<ReturnInst>(*I) || isa<UnwindInst>(*I)) {
+    if (isa<ReturnInst>(*I) || isa<ResumeInst>(*I)) {
       exitBlocks.insert(I->getParent());
     }
   }
Index: lib/InsertPoolChecks/RegisterRuntimeInitializer.cpp
===================================================================
--- lib/InsertPoolChecks/RegisterRuntimeInitializer.cpp	(revision 161409)
+++ lib/InsertPoolChecks/RegisterRuntimeInitializer.cpp	(working copy)
@@ -79,7 +79,8 @@
   //
   // Create a global variable containing the log filename.
   //
-  Constant * LogNameInit = ConstantArray::get (M.getContext(), logfilename);
+  Constant * LogNameInit = ConstantDataArray::getString (M.getContext(),
+                                                         logfilename);
   Value * LogName = new GlobalVariable (M,
                                         LogNameInit->getType(),
                                         true,
Index: lib/InsertPoolChecks/RegisterStackObjPass.cpp
===================================================================
--- lib/InsertPoolChecks/RegisterStackObjPass.cpp	(revision 161409)
+++ lib/InsertPoolChecks/RegisterStackObjPass.cpp	(working copy)
@@ -14,7 +14,6 @@
 
 #define DEBUG_TYPE "stackreg"
 
-#include "llvm/ADT/VectorExtras.h"
 #include "llvm/ADT/Statistic.h"
 #include "llvm/Instruction.h"
 #include "llvm/Module.h"
@@ -254,7 +253,7 @@
     // is needed.
     //
     Instruction * Terminator = BI->getTerminator();
-    if ((isa<ReturnInst>(Terminator)) || (isa<UnwindInst>(Terminator))) {
+    if ((isa<ReturnInst>(Terminator)) || (isa<ResumeInst>(Terminator))) {
       ExitPoints.push_back (Terminator);
     }
   }
Index: lib/SoftBound/SoftBoundCETS.cpp
===================================================================
--- lib/SoftBound/SoftBoundCETS.cpp	(revision 161409)
+++ lib/SoftBound/SoftBoundCETS.cpp	(working copy)
@@ -615,8 +615,7 @@
 
   // set the new function attributes 
   new_func->copyAttributesFrom(main_func);
-  new_func->setAttributes(AttrListPtr::get(param_attrs_vec.begin(), 
-                                           param_attrs_vec.end()));
+  new_func->setAttributes(AttrListPtr::get(param_attrs_vec));
     
   main_func->getParent()->getFunctionList().insert(main_func, new_func);
   main_func->replaceAllUsesWith(new_func);
@@ -1585,8 +1584,7 @@
 
   int total_pointer_count = 0;
   SmallVector<AttributeWithIndex, 8> param_attrs_vec;
-  call_inst->setAttributes(AttrListPtr::get(param_attrs_vec.begin(), 
-                                            param_attrs_vec.end()));  
+  call_inst->setAttributes(AttrListPtr::get(param_attrs_vec));  
     
   CallSite cs(call_inst);
   for(unsigned i = 0; i < cs.arg_size(); i++){
@@ -3274,7 +3272,7 @@
   FunctionType* nfty = FunctionType::get(ret_type, params, fty->isVarArg());
   Function* new_func = Function::Create(nfty, func->getLinkage(), transformFunctionName(func->getName()));
   new_func->copyAttributesFrom(func);
-  new_func->setAttributes(AttrListPtr::get(param_attrs_vec.begin(), param_attrs_vec.end()));    
+  new_func->setAttributes(AttrListPtr::get(param_attrs_vec));    
   func->getParent()->getFunctionList().insert(func, new_func);
     
   if(!external) {
Index: lib/SpeculativeChecking/CodeDuplication.cpp
===================================================================
--- lib/SpeculativeChecking/CodeDuplication.cpp	(revision 161409)
+++ lib/SpeculativeChecking/CodeDuplication.cpp	(working copy)
@@ -616,7 +616,7 @@
 	Function * origFunc = L->getHeader()->getParent();
 		for (Function::iterator it = origFunc->begin(), end = origFunc->end(); it != end; ++it) {
 			Instruction * TI = it->getTerminator();
-			if (isa<ReturnInst>(TI) || isa<UnwindInst>(TI)) {
+			if (isa<ReturnInst>(TI) || isa<ResumeInst>(TI)) {
 				CallInst::Create(sFuncWaitForSyncToken, "", TI);
 			}
 		}
