diff options
author | Ted Kremenek <kremenek@apple.com> | 2010-02-11 05:28:37 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2010-02-11 05:28:37 +0000 |
commit | 7f4945aa9ccb178bb494d6b619b9cd09e69c3527 (patch) | |
tree | 10f3170ba6f9ff5a1a05cafc16aa7a555d42260f /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | c053cbbc4d4123060b1142538f2cdd658d26bbc8 (diff) | |
download | bcm5719-llvm-7f4945aa9ccb178bb494d6b619b9cd09e69c3527.tar.gz bcm5719-llvm-7f4945aa9ccb178bb494d6b619b9cd09e69c3527.zip |
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
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index a6b546ef9ef..5a552c490ac 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -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. |