diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index f9a40cb0b5fa..7d2b4cd75030 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -78,7 +78,7 @@ llvm::StringRef CGDebugInfo::getFunctionName(const FunctionDecl *FD) { std::string NS = FD->getNameAsString(); // Copy this name on the side and use its reference. - char *StrPtr = FunctionNames.Allocate(NS.length()); + char *StrPtr = DebugInfoNames.Allocate(NS.length()); memcpy(StrPtr, NS.data(), NS.length()); return llvm::StringRef(StrPtr, NS.length()); } @@ -716,7 +716,7 @@ llvm::StringRef CGDebugInfo::getVtableName(const CXXRecordDecl *Decl) { std::string Name = "_vptr$" + Decl->getNameAsString(); // Copy this name on the side and use its reference. - char *StrPtr = FunctionNames.Allocate(Name.length()); + char *StrPtr = DebugInfoNames.Allocate(Name.length()); memcpy(StrPtr, Name.data(), Name.length()); return llvm::StringRef(StrPtr, Name.length()); } diff --git a/clang/lib/CodeGen/CGDebugInfo.h b/clang/lib/CodeGen/CGDebugInfo.h index ac75ac02319e..1c0bd1969b99 100644 --- a/clang/lib/CodeGen/CGDebugInfo.h +++ b/clang/lib/CodeGen/CGDebugInfo.h @@ -62,9 +62,9 @@ class CGDebugInfo { std::vector > RegionStack; - /// FunctionNames - This is a storage for function names that are + /// DebugInfoNames - This is a storage for names that are /// constructed on demand. For example, C++ destructors, C++ operators etc.. - llvm::BumpPtrAllocator FunctionNames; + llvm::BumpPtrAllocator DebugInfoNames; llvm::DenseMap SPCache;