summaryrefslogtreecommitdiffstats
path: root/include/llvm/IR/MDBuilder.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/IR/MDBuilder.h')
-rw-r--r--include/llvm/IR/MDBuilder.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/include/llvm/IR/MDBuilder.h b/include/llvm/IR/MDBuilder.h
index ce81b54..c07b2bd 100644
--- a/include/llvm/IR/MDBuilder.h
+++ b/include/llvm/IR/MDBuilder.h
@@ -174,11 +174,8 @@ public:
/// given name, an offset and a parent in the TBAA type DAG.
MDNode *createTBAAScalarTypeNode(StringRef Name, MDNode *Parent,
uint64_t Offset = 0) {
- SmallVector<Value *, 4> Ops(3);
- Type *Int64 = IntegerType::get(Context, 64);
- Ops[0] = createString(Name);
- Ops[1] = Parent;
- Ops[2] = ConstantInt::get(Int64, Offset);
+ ConstantInt *Off = ConstantInt::get(Type::getInt64Ty(Context), Offset);
+ Value *Ops[3] = { createString(Name), Parent, Off };
return MDNode::get(Context, Ops);
}