aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenTBAA.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/CodeGenTBAA.cpp')
-rw-r--r--lib/CodeGen/CodeGenTBAA.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/CodeGenTBAA.cpp b/lib/CodeGen/CodeGenTBAA.cpp
index 95b9714c34..54e0de6c12 100644
--- a/lib/CodeGen/CodeGenTBAA.cpp
+++ b/lib/CodeGen/CodeGenTBAA.cpp
@@ -57,7 +57,7 @@ llvm::MDNode *CodeGenTBAA::getRoot() {
llvm::MDNode *CodeGenTBAA::createTBAAScalarType(StringRef Name,
llvm::MDNode *Parent) {
if (CodeGenOpts.StructPathTBAA)
- return MDHelper.createTBAAScalarTypeNode(Name, 0, Parent);
+ return MDHelper.createTBAAScalarTypeNode(Name, Parent);
else
return MDHelper.createTBAANode(Name, Parent);
}
@@ -275,7 +275,7 @@ CodeGenTBAA::getTBAAStructTypeInfo(QualType QTy) {
const RecordDecl *RD = TTy->getDecl()->getDefinition();
const ASTRecordLayout &Layout = Context.getASTRecordLayout(RD);
- SmallVector <std::pair<uint64_t, llvm::MDNode*>, 4> Fields;
+ SmallVector <std::pair<llvm::MDNode*, uint64_t>, 4> Fields;
unsigned idx = 0;
const FieldDecl *LastFD = 0;
bool IsMsStruct = RD->isMsStruct(Context);
@@ -299,7 +299,7 @@ CodeGenTBAA::getTBAAStructTypeInfo(QualType QTy) {
if (!FieldNode)
return StructTypeMetadataCache[Ty] = NULL;
Fields.push_back(std::make_pair(
- Layout.getFieldOffset(idx) / Context.getCharWidth(), FieldNode));
+ FieldNode, Layout.getFieldOffset(idx) / Context.getCharWidth()));
}
// TODO: This is using the RTTI name. Is there a better way to get