diff options
author | James Y Knight <jyknight@google.com> | 2016-03-04 19:00:41 +0000 |
---|---|---|
committer | James Y Knight <jyknight@google.com> | 2016-03-04 19:00:41 +0000 |
commit | b214cbc7852fa1719c5d0bd3ccb9615481e03c55 (patch) | |
tree | e5fe189f5192242789a8887dcf64d3af79258831 /clang/lib/Index/CodegenNameGenerator.cpp | |
parent | 31f251f1f0acae8864d08a07be4b190cea2ed4b5 (diff) | |
download | llvm-b214cbc7852fa1719c5d0bd3ccb9615481e03c55.zip llvm-b214cbc7852fa1719c5d0bd3ccb9615481e03c55.tar.gz llvm-b214cbc7852fa1719c5d0bd3ccb9615481e03c55.tar.bz2 |
Make TargetInfo store an actual DataLayout instead of a string.
Use it to calculate UserLabelPrefix, instead of specifying it (often
incorrectly).
Note that the *actual* user label prefix has always come from the
DataLayout, and is handled within LLVM. The main thing clang's
TargetInfo::UserLabelPrefix did was to set the #define value. Having
these be different from each-other is just silly.
Differential Revision: http://reviews.llvm.org/D17183
llvm-svn: 262737
Diffstat (limited to 'clang/lib/Index/CodegenNameGenerator.cpp')
-rw-r--r-- | clang/lib/Index/CodegenNameGenerator.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/Index/CodegenNameGenerator.cpp b/clang/lib/Index/CodegenNameGenerator.cpp index d663cc3..92740b0 100644 --- a/clang/lib/Index/CodegenNameGenerator.cpp +++ b/clang/lib/Index/CodegenNameGenerator.cpp @@ -31,7 +31,7 @@ struct CodegenNameGenerator::Implementation { Implementation(ASTContext &Ctx) : MC(Ctx.createMangleContext()), - DL(Ctx.getTargetInfo().getDataLayoutString()) {} + DL(Ctx.getTargetInfo().getDataLayout()) {} bool writeName(const Decl *D, raw_ostream &OS) { // First apply frontend mangling. @@ -76,8 +76,6 @@ struct CodegenNameGenerator::Implementation { ASTContext &Ctx = ND->getASTContext(); std::unique_ptr<MangleContext> M(Ctx.createMangleContext()); - std::unique_ptr<llvm::DataLayout> DL( - new llvm::DataLayout(Ctx.getTargetInfo().getDataLayoutString())); std::vector<std::string> Manglings; |