From 00db2f13f8be08eea489a26190e8ac9ffc2d6f4e Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 29 Jul 2014 21:20:12 +0000 Subject: PR20473: Don't "deduplicate" string literals with the same value but different lengths! In passing, simplify string literal deduplication by relying on LLVM to deduplicate the underlying constant values. llvm-svn: 214222 --- clang/lib/CodeGen/CodeGenModule.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'clang/lib/CodeGen/CodeGenModule.h') diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index 44597bfaa91..9533a8dabb2 100644 --- a/clang/lib/CodeGen/CodeGenModule.h +++ b/clang/lib/CodeGen/CodeGenModule.h @@ -361,9 +361,7 @@ class CodeGenModule : public CodeGenTypeCache { llvm::StringMap CFConstantStringMap; - llvm::StringMap Constant1ByteStringMap; - llvm::StringMap Constant2ByteStringMap; - llvm::StringMap Constant4ByteStringMap; + llvm::DenseMap ConstantStringMap; llvm::DenseMap StaticLocalDeclMap; llvm::DenseMap StaticLocalDeclGuardMap; llvm::DenseMap MaterializedGlobalTemporaryMap; @@ -1044,9 +1042,6 @@ private: llvm::PointerType *PTy, const VarDecl *D); - llvm::StringMapEntry * - getConstantStringMapEntry(StringRef Str, int CharByteWidth); - /// Set attributes which are common to any form of a global definition (alias, /// Objective-C method, function, global variable). /// -- cgit v1.2.3