summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/MDBuilder.cpp
diff options
context:
space:
mode:
authorIvan A. Kosarev <ikosarev@accesssoftek.com>2018-02-13 14:44:25 +0000
committerIvan A. Kosarev <ikosarev@accesssoftek.com>2018-02-13 14:44:25 +0000
commit4a381b444e671be33a57280b4d13a77ef8f760a6 (patch)
tree97b44c5e5ae300fda2d5f3881a0150a4df377f29 /llvm/lib/IR/MDBuilder.cpp
parent348b48ac6be106cf8045f59dfd09a6e97bd20e7b (diff)
downloadbcm5719-llvm-4a381b444e671be33a57280b4d13a77ef8f760a6.tar.gz
bcm5719-llvm-4a381b444e671be33a57280b4d13a77ef8f760a6.zip
[IR] Fix creating mutable versions of TBAA access tags
Due to a typo in D41565, mutable TBAA tags created with createMutableTBAAAccessTag() lose their base types. This patch fixes that typo and updates tests respectively. Differential Revision: https://reviews.llvm.org/D42364 llvm-svn: 325008
Diffstat (limited to 'llvm/lib/IR/MDBuilder.cpp')
-rw-r--r--llvm/lib/IR/MDBuilder.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/MDBuilder.cpp b/llvm/lib/IR/MDBuilder.cpp
index c32a989ef2c..a2bba4c3a10 100644
--- a/llvm/lib/IR/MDBuilder.cpp
+++ b/llvm/lib/IR/MDBuilder.cpp
@@ -233,7 +233,7 @@ MDNode *MDBuilder::createTBAAAccessTag(MDNode *BaseType, MDNode *AccessType,
}
MDNode *MDBuilder::createMutableTBAAAccessTag(MDNode *Tag) {
- MDNode *BaseType = cast<MDNode>(Tag->getOperand(1));
+ MDNode *BaseType = cast<MDNode>(Tag->getOperand(0));
MDNode *AccessType = cast<MDNode>(Tag->getOperand(1));
Metadata *OffsetNode = Tag->getOperand(2);
uint64_t Offset = mdconst::extract<ConstantInt>(OffsetNode)->getZExtValue();
OpenPOWER on IntegriCloud