Updated to the LLVM 2.7 API.
llvm-svn: 98576
diff --git a/safecode/lib/Utility/BreakConstantStrings.cpp b/safecode/lib/Utility/BreakConstantStrings.cpp
index 489e521..654d377 100755
--- a/safecode/lib/Utility/BreakConstantStrings.cpp
+++ b/safecode/lib/Utility/BreakConstantStrings.cpp
@@ -20,6 +20,7 @@
#include "llvm/InstrTypes.h"
#include "llvm/Instruction.h"
#include "llvm/Instructions.h"
+#include "llvm/LLVMContext.h"
#include "llvm/Support/InstIterator.h"
#include "safecode/BreakConstantStrings.h"
diff --git a/safecode/lib/Utility/DSNodePass.cpp b/safecode/lib/Utility/DSNodePass.cpp
index 77f5319..5a4fe5a 100755
--- a/safecode/lib/Utility/DSNodePass.cpp
+++ b/safecode/lib/Utility/DSNodePass.cpp
@@ -135,7 +135,7 @@
// Get the pool handle for this DSNode...
// assert(!Node->isUnknownNode() && "Unknown node \n");
- const Type *PoolDescType = paPass->getPoolType();
+ const Type *PoolDescType = paPass->getPoolType(&getGlobalContext());
const Type *PoolDescPtrTy = PointerType::getUnqual(PoolDescType);
if (Node->isUnknownNode()) {
//
@@ -151,7 +151,7 @@
std::cerr << "ERROR: we don't handle middle of structs yet"
<< std::endl;
#endif
-std::cerr << "JTC: PH: Null 1: " << *V << std::endl;
+std::cerr << "JTC: PH: Null 1: " << V->getNameStr() << std::endl;
return ConstantAggregateZero::get(PoolDescPtrTy);
}
}
@@ -201,7 +201,7 @@
if (isClone)
std::cerr << "JTC: No Pool: " << FClone->getName().str() << ": "
- << *V << std::endl;
+ << V->getNameStr() << std::endl;
return 0;
}
diff --git a/safecode/lib/Utility/Intrinsic.cpp b/safecode/lib/Utility/Intrinsic.cpp
index cf295fa..c6e4b89 100755
--- a/safecode/lib/Utility/Intrinsic.cpp
+++ b/safecode/lib/Utility/Intrinsic.cpp
@@ -19,6 +19,7 @@
#include "safecode/Support/AllocatorInfo.h"
#include "llvm/Module.h"
+#include "llvm/LLVMContext.h"
#include "llvm/DerivedTypes.h"
#include "llvm/Instructions.h"
#include "llvm/Constants.h"
@@ -412,7 +413,7 @@
return ConstantInt::get(Int32Type, TD->getTypeAllocSize (GV->getType()->getElementType()));
}
- if (AllocationInst * AI = dyn_cast<AllocationInst>(V)) {
+ if (AllocaInst * AI = dyn_cast<AllocaInst>(V)) {
unsigned int type_size = TD->getTypeAllocSize (AI->getAllocatedType());
if (AI->isArrayAllocation()) {
if (ConstantInt * CI = dyn_cast<ConstantInt>(AI->getArraySize())) {