From 6b6b6ef1677fa71b1072c2911b4c1f9524a558c9 Mon Sep 17 00:00:00 2001 From: Zhou Sheng Date: Thu, 11 Jan 2007 12:24:14 +0000 Subject: For PR1043: Merge ConstantIntegral and ConstantBool into ConstantInt. Remove ConstantIntegral and ConstantBool from LLVM. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33073 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/MachineDebugInfo.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/CodeGen/MachineDebugInfo.cpp') diff --git a/lib/CodeGen/MachineDebugInfo.cpp b/lib/CodeGen/MachineDebugInfo.cpp index 041a88cdca..5d9de9ff34 100644 --- a/lib/CodeGen/MachineDebugInfo.cpp +++ b/lib/CodeGen/MachineDebugInfo.cpp @@ -211,7 +211,7 @@ public: } virtual void Apply(bool &Field) { Constant *C = CI->getOperand(I++); - Field = cast(C)->getValue(); + Field = cast(C)->getBoolValue(); } virtual void Apply(std::string &Field) { Constant *C = CI->getOperand(I++); @@ -276,7 +276,7 @@ public: Elements.push_back(ConstantInt::get(Type::Int64Ty, uint64_t(Field))); } virtual void Apply(bool &Field) { - Elements.push_back(ConstantBool::get(Field)); + Elements.push_back(ConstantInt::get(Field)); } virtual void Apply(std::string &Field) { Elements.push_back(SR.getString(Field)); @@ -426,7 +426,7 @@ public: } virtual void Apply(bool &Field) { Constant *C = CI->getOperand(I++); - IsValid = IsValid && isa(C); + IsValid = IsValid && isa(C) && C->getType() == Type::BoolTy; } virtual void Apply(std::string &Field) { Constant *C = CI->getOperand(I++); -- cgit v1.2.3-18-g5258