Remove use of 'std::string' from Attr objects, using instead a byte

array allocated using the allocator in ASTContext.  This addresses
these strings getting leaked when using a BumpPtrAllocator (in
ASTContext).

Fixes: <rdar://problem/7636765>
llvm-svn: 95853
This commit is contained in:
Ted Kremenek
2010-02-11 05:28:37 +00:00
parent c053cbbc4d
commit 7f4945aa9c
7 changed files with 90 additions and 56 deletions

View File

@@ -1283,8 +1283,8 @@ void CodeGenModule::EmitAliasDefinition(const ValueDecl *D) {
const llvm::Type *DeclTy = getTypes().ConvertTypeForMem(D->getType());
// Unique the name through the identifier table.
const char *AliaseeName = AA->getAliasee().c_str();
AliaseeName = getContext().Idents.get(AliaseeName).getNameStart();
const char *AliaseeName =
getContext().Idents.get(AA->getAliasee()).getNameStart();
// Create a reference to the named value. This ensures that it is emitted
// if a deferred decl.