diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-06-10 19:12:52 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-06-10 19:12:52 +0000 |
commit | 97bc6c731eabb6212f094302b94f3f0f9534ebdf (patch) | |
tree | 471dda8f5419bb81beedeeef3b8975938d7e7340 /contrib/llvm/lib/IR/MDBuilder.cpp | |
parent | 3adc74c768226112b373d0bcacee73521b0aed2a (diff) | |
parent | 85d8b2bbe386bcfe669575d05b61482d7be07e5d (diff) | |
download | src-97bc6c731eabb6212f094302b94f3f0f9534ebdf.tar.gz src-97bc6c731eabb6212f094302b94f3f0f9534ebdf.zip |
Update Makefiles and other build glue for llvm/clang 3.7.0, as of trunk
r239412.
Notes
Notes:
svn path=/projects/clang-trunk/; revision=284236
Diffstat (limited to 'contrib/llvm/lib/IR/MDBuilder.cpp')
-rw-r--r-- | contrib/llvm/lib/IR/MDBuilder.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/contrib/llvm/lib/IR/MDBuilder.cpp b/contrib/llvm/lib/IR/MDBuilder.cpp index 354592df4c96..b4c5ca7c6a12 100644 --- a/contrib/llvm/lib/IR/MDBuilder.cpp +++ b/contrib/llvm/lib/IR/MDBuilder.cpp @@ -168,9 +168,16 @@ MDNode *MDBuilder::createTBAAScalarTypeNode(StringRef Name, MDNode *Parent, /// \brief Return metadata for a TBAA tag node with the given /// base type, access type and offset relative to the base type. MDNode *MDBuilder::createTBAAStructTagNode(MDNode *BaseType, MDNode *AccessType, - uint64_t Offset) { + uint64_t Offset, bool IsConstant) { Type *Int64 = Type::getInt64Ty(Context); - Metadata *Ops[3] = {BaseType, AccessType, - createConstant(ConstantInt::get(Int64, Offset))}; - return MDNode::get(Context, Ops); + if (IsConstant) { + Metadata *Ops[4] = {BaseType, AccessType, + createConstant(ConstantInt::get(Int64, Offset)), + createConstant(ConstantInt::get(Int64, 1))}; + return MDNode::get(Context, Ops); + } else { + Metadata *Ops[3] = {BaseType, AccessType, + createConstant(ConstantInt::get(Int64, Offset))}; + return MDNode::get(Context, Ops); + } } |