diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2006-12-31 05:48:39 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2006-12-31 05:48:39 +0000 |
commit | c635f47d9a02dc7da288864169804d3ff9481e8b (patch) | |
tree | 4f2083b89373271d840e29c5e22e9020c3be4d90 /llvm/lib/Transforms/Instrumentation/TraceValues.cpp | |
parent | be5fd4a771686af882281a392e28b68ef95eeed3 (diff) | |
download | bcm5719-llvm-c635f47d9a02dc7da288864169804d3ff9481e8b.tar.gz bcm5719-llvm-c635f47d9a02dc7da288864169804d3ff9481e8b.zip |
For PR950:
This patch replaces signed integer types with signless ones:
1. [US]Byte -> Int8
2. [U]Short -> Int16
3. [U]Int -> Int32
4. [U]Long -> Int64.
5. Removal of isSigned, isUnsigned, getSignedVersion, getUnsignedVersion
and other methods related to signedness. In a few places this warranted
identifying the signedness information from other sources.
llvm-svn: 32785
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/TraceValues.cpp')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/TraceValues.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/TraceValues.cpp b/llvm/lib/Transforms/Instrumentation/TraceValues.cpp index f6048f140d1..9fbec118c20 100644 --- a/llvm/lib/Transforms/Instrumentation/TraceValues.cpp +++ b/llvm/lib/Transforms/Instrumentation/TraceValues.cpp @@ -123,13 +123,13 @@ FunctionPass *llvm::createTraceValuesPassForBasicBlocks() { // void ExternalFuncs::doInitialization(Module &M) { M.addLibrary("trace"); - const Type *SBP = PointerType::get(Type::SByteTy); + const Type *SBP = PointerType::get(Type::Int8Ty); const FunctionType *MTy = - FunctionType::get(Type::IntTy, std::vector<const Type*>(1, SBP), true); + FunctionType::get(Type::Int32Ty, std::vector<const Type*>(1, SBP), true); PrintfFunc = M.getOrInsertFunction("printf", MTy); // uint (sbyte*) - HashPtrFunc = M.getOrInsertFunction("HashPointerToSeqNum", Type::UIntTy, SBP, + HashPtrFunc = M.getOrInsertFunction("HashPointerToSeqNum", Type::Int32Ty, SBP, (Type *)0); // void (sbyte*) @@ -244,11 +244,11 @@ static void InsertPrintInst(Value *V, BasicBlock *BB, Instruction *InsertBefore, // Turn the format string into an sbyte * Constant *GEP=ConstantExpr::getGetElementPtr(fmtVal, - std::vector<Constant*>(2,Constant::getNullValue(Type::LongTy))); + std::vector<Constant*>(2,Constant::getNullValue(Type::Int64Ty))); // Insert a call to the hash function if this is a pointer value if (V && isa<PointerType>(V->getType()) && !DisablePtrHashing) { - const Type *SBP = PointerType::get(Type::SByteTy); + const Type *SBP = PointerType::get(Type::Int8Ty); if (V->getType() != SBP) // Cast pointer to be sbyte* V = new BitCastInst(V, SBP, "Hash_cast", InsertBefore); @@ -279,7 +279,7 @@ InsertReleaseInst(Value *V, BasicBlock *BB, Instruction *InsertBefore, Function* ReleasePtrFunc) { - const Type *SBP = PointerType::get(Type::SByteTy); + const Type *SBP = PointerType::get(Type::Int8Ty); if (V->getType() != SBP) // Cast pointer to be sbyte* V = new BitCastInst(V, SBP, "RPSN_cast", InsertBefore); @@ -291,7 +291,7 @@ static void InsertRecordInst(Value *V, BasicBlock *BB, Instruction *InsertBefore, Function* RecordPtrFunc) { - const Type *SBP = PointerType::get(Type::SByteTy); + const Type *SBP = PointerType::get(Type::Int8Ty); if (V->getType() != SBP) // Cast pointer to be sbyte* V = new BitCastInst(V, SBP, "RP_cast", InsertBefore); |