From c5b206b6be61d0d933b98b6af5e22f42edd48ad1 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Sun, 31 Dec 2006 05:48:39 +0000 Subject: 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 --- lib/Transforms/Instrumentation/TraceValues.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/Transforms/Instrumentation/TraceValues.cpp') 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(1, SBP), true); + FunctionType::get(Type::Int32Ty, std::vector(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(2,Constant::getNullValue(Type::LongTy))); + std::vector(2,Constant::getNullValue(Type::Int64Ty))); // Insert a call to the hash function if this is a pointer value if (V && isa(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); -- cgit v1.2.3