summaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenTBAA.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CodeGenTBAA.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenTBAA.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CodeGenTBAA.cpp b/clang/lib/CodeGen/CodeGenTBAA.cpp
index b7e6a4d1adcc..5b3393ec150e 100644
--- a/clang/lib/CodeGen/CodeGenTBAA.cpp
+++ b/clang/lib/CodeGen/CodeGenTBAA.cpp
@@ -16,6 +16,7 @@
#include "CodeGenTBAA.h"
#include "ABIInfoImpl.h"
+#include "CGCXXABI.h"
#include "CGRecordLayout.h"
#include "CodeGenTypes.h"
#include "clang/AST/ASTContext.h"
@@ -36,10 +37,10 @@ using namespace CodeGen;
CodeGenTBAA::CodeGenTBAA(ASTContext &Ctx, CodeGenTypes &CGTypes,
llvm::Module &M, const CodeGenOptions &CGO,
- const LangOptions &Features, MangleContext &MContext)
+ const LangOptions &Features)
: Context(Ctx), CGTypes(CGTypes), Module(M), CodeGenOpts(CGO),
- Features(Features), MContext(MContext), MDHelper(M.getContext()),
- Root(nullptr), Char(nullptr) {}
+ Features(Features), MDHelper(M.getContext()), Root(nullptr),
+ Char(nullptr) {}
CodeGenTBAA::~CodeGenTBAA() {
}
@@ -256,7 +257,8 @@ llvm::MDNode *CodeGenTBAA::getTypeInfoHelper(const Type *Ty) {
SmallString<256> OutName;
llvm::raw_svector_ostream Out(OutName);
- MContext.mangleCanonicalTypeName(QualType(ETy, 0), Out);
+ CGTypes.getCXXABI().getMangleContext().mangleCanonicalTypeName(
+ QualType(ETy, 0), Out);
return createScalarTypeNode(OutName, getChar(), Size);
}
@@ -481,7 +483,8 @@ llvm::MDNode *CodeGenTBAA::getBaseTypeInfoHelper(const Type *Ty) {
if (Features.CPlusPlus) {
// Don't use the mangler for C code.
llvm::raw_svector_ostream Out(OutName);
- MContext.mangleCanonicalTypeName(QualType(Ty, 0), Out);
+ CGTypes.getCXXABI().getMangleContext().mangleCanonicalTypeName(
+ QualType(Ty, 0), Out);
} else {
OutName = RD->getName();
}