From 47857812e29324a9d1560796a05b53d3a9217fd9 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Sun, 31 Dec 2006 05:55:36 +0000 Subject: For PR950: Three changes: 1. Convert signed integer types to signless versions. 2. Implement the @sext and @zext parameter attributes. Previously the type of an function parameter was used to determine whether it should be sign extended or zero extended before the call. This information is now communicated via the function type's parameter attributes. 3. The interface to LowerCallTo had to be changed in order to accommodate the parameter attribute information. Although it would have been convenient to pass in the FunctionType itself, there isn't always one present in the caller. Consequently, a signedness indication for the result type and for each parameter was provided for in the interface to this method. All implementations were changed to make the adjustment necessary. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32788 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/MachineDebugInfo.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'lib/CodeGen/MachineDebugInfo.cpp') diff --git a/lib/CodeGen/MachineDebugInfo.cpp b/lib/CodeGen/MachineDebugInfo.cpp index d3b6ecb469..2708ceccfc 100644 --- a/lib/CodeGen/MachineDebugInfo.cpp +++ b/lib/CodeGen/MachineDebugInfo.cpp @@ -55,8 +55,8 @@ getGlobalVariablesUsing(Module &M, const std::string &RootName) { std::vector Result; // GlobalVariables matching criteria. std::vector FieldTypes; - FieldTypes.push_back(Type::UIntTy); - FieldTypes.push_back(Type::UIntTy); + FieldTypes.push_back(Type::Int32Ty); + FieldTypes.push_back(Type::Int32Ty); // Get the GlobalVariable root. GlobalVariable *UseRoot = M.getGlobalVariable(RootName, @@ -264,16 +264,16 @@ public: /// Apply - Set the value of each of the fields. /// virtual void Apply(int &Field) { - Elements.push_back(ConstantInt::get(Type::IntTy, int32_t(Field))); + Elements.push_back(ConstantInt::get(Type::Int32Ty, int32_t(Field))); } virtual void Apply(unsigned &Field) { - Elements.push_back(ConstantInt::get(Type::UIntTy, uint32_t(Field))); + Elements.push_back(ConstantInt::get(Type::Int32Ty, uint32_t(Field))); } virtual void Apply(int64_t &Field) { - Elements.push_back(ConstantInt::get(Type::LongTy, int64_t(Field))); + Elements.push_back(ConstantInt::get(Type::Int64Ty, int64_t(Field))); } virtual void Apply(uint64_t &Field) { - Elements.push_back(ConstantInt::get(Type::ULongTy, uint64_t(Field))); + Elements.push_back(ConstantInt::get(Type::Int64Ty, uint64_t(Field))); } virtual void Apply(bool &Field) { Elements.push_back(ConstantBool::get(Field)); @@ -351,16 +351,16 @@ public: /// Apply - Set the value of each of the fields. /// virtual void Apply(int &Field) { - Fields.push_back(Type::IntTy); + Fields.push_back(Type::Int32Ty); } virtual void Apply(unsigned &Field) { - Fields.push_back(Type::UIntTy); + Fields.push_back(Type::Int32Ty); } virtual void Apply(int64_t &Field) { - Fields.push_back(Type::LongTy); + Fields.push_back(Type::Int64Ty); } virtual void Apply(uint64_t &Field) { - Fields.push_back(Type::ULongTy); + Fields.push_back(Type::Int64Ty); } virtual void Apply(bool &Field) { Fields.push_back(Type::BoolTy); @@ -1259,7 +1259,7 @@ const PointerType *DISerializer::getStrPtrType() { // If not already defined. if (!StrPtrTy) { // Construct the pointer to signed bytes. - StrPtrTy = PointerType::get(Type::SByteTy); + StrPtrTy = PointerType::get(Type::Int8Ty); } return StrPtrTy; -- cgit v1.2.3