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 | c5b206b6be61d0d933b98b6af5e22f42edd48ad1 (patch) | |
tree | 9e6a1e6d3b90890de3d1464a44a7cef8d30fe1ae /lib/Transforms/Instrumentation/TraceValues.cpp | |
parent | 05e52a1b35e7feb359a176af462591697c4d9647 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32785 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Instrumentation/TraceValues.cpp')
-rw-r--r-- | lib/Transforms/Instrumentation/TraceValues.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/Transforms/Instrumentation/TraceValues.cpp b/lib/Transforms/Instrumentation/TraceValues.cpp index f6048f140d..9fbec118c2 100644 --- a/lib/Transforms/Instrumentation/TraceValues.cpp +++ b/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); |