aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis
diff options
context:
space:
mode:
authorVictor Hernandez <vhernandez@apple.com>2010-01-11 07:45:19 +0000
committerVictor Hernandez <vhernandez@apple.com>2010-01-11 07:45:19 +0000
commit5b7e48b56cfc0904636a0a1c0d4f7b81133c48c2 (patch)
tree3eab685aa1c1aaeb80459d9c50d34d02e98fa236 /lib/Analysis
parent8e76764de86d7906db5123626b65f593e159d9f3 (diff)
downloadexternal_llvm-5b7e48b56cfc0904636a0a1c0d4f7b81133c48c2.zip
external_llvm-5b7e48b56cfc0904636a0a1c0d4f7b81133c48c2.tar.gz
external_llvm-5b7e48b56cfc0904636a0a1c0d4f7b81133c48c2.tar.bz2
Respond to Chris' review:
Make InsertDbgValueIntrinsic() and get Offset take and recieve a uint64_t. Get constness correct for getVariable() and getValue(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93149 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/DebugInfo.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp
index 731b57a..15ca1fa 100644
--- a/lib/Analysis/DebugInfo.cpp
+++ b/lib/Analysis/DebugInfo.cpp
@@ -1033,7 +1033,7 @@ DILocation DIFactory::CreateLocation(unsigned LineNo, unsigned ColumnNo,
/// InsertDeclare - Insert a new llvm.dbg.declare intrinsic call.
Instruction *DIFactory::InsertDeclare(Value *Storage, DIVariable D,
- Instruction *InsertBefore) {
+ Instruction *InsertBefore) {
// Cast the storage to a {}* for the call to llvm.dbg.declare.
Storage = new BitCastInst(Storage, EmptyStructPtr, "", InsertBefore);
@@ -1046,7 +1046,7 @@ Instruction *DIFactory::InsertDeclare(Value *Storage, DIVariable D,
/// InsertDeclare - Insert a new llvm.dbg.declare intrinsic call.
Instruction *DIFactory::InsertDeclare(Value *Storage, DIVariable D,
- BasicBlock *InsertAtEnd) {
+ BasicBlock *InsertAtEnd) {
// Cast the storage to a {}* for the call to llvm.dbg.declare.
Storage = new BitCastInst(Storage, EmptyStructPtr, "", InsertAtEnd);
@@ -1058,31 +1058,31 @@ Instruction *DIFactory::InsertDeclare(Value *Storage, DIVariable D,
}
/// InsertDbgValueIntrinsic - Insert a new llvm.dbg.value intrinsic call.
-Instruction *DIFactory::InsertDbgValueIntrinsic(Value *V, Value *Offset,
+Instruction *DIFactory::InsertDbgValueIntrinsic(Value *V, uint64_t Offset,
DIVariable D,
Instruction *InsertBefore) {
assert(V && "no value passed to dbg.value");
- assert(Offset->getType()->isInteger(64) && "offset must be i64");
if (!ValueFn)
ValueFn = Intrinsic::getDeclaration(&M, Intrinsic::dbg_value);
Value *Elts[] = { V };
- Value *Args[] = { MDNode::get(V->getContext(), Elts, 1), Offset,
+ Value *Args[] = { MDNode::get(V->getContext(), Elts, 1),
+ ConstantInt::get(Type::getInt64Ty(V->getContext()), Offset),
D.getNode() };
return CallInst::Create(ValueFn, Args, Args+3, "", InsertBefore);
}
/// InsertDbgValueIntrinsic - Insert a new llvm.dbg.value intrinsic call.
-Instruction *DIFactory::InsertDbgValueIntrinsic(Value *V, Value *Offset,
+Instruction *DIFactory::InsertDbgValueIntrinsic(Value *V, uint64_t Offset,
DIVariable D,
BasicBlock *InsertAtEnd) {
assert(V && "no value passed to dbg.value");
- assert(Offset->getType()->isInteger(64) && "offset must be i64");
if (!ValueFn)
ValueFn = Intrinsic::getDeclaration(&M, Intrinsic::dbg_value);
Value *Elts[] = { V };
- Value *Args[] = { MDNode::get(V->getContext(), Elts, 1), Offset,
+ Value *Args[] = { MDNode::get(V->getContext(), Elts, 1),
+ ConstantInt::get(Type::getInt64Ty(V->getContext()), Offset),
D.getNode() };
return CallInst::Create(ValueFn, Args, Args+3, "", InsertAtEnd);
}