diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-07-29 21:20:12 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-07-29 21:20:12 +0000 |
| commit | 00db2f13f8be08eea489a26190e8ac9ffc2d6f4e (patch) | |
| tree | 39eaa45328332bd96f3a2abbc3f8a8d490f9d9c2 /clang/lib/CodeGen/CodeGenModule.h | |
| parent | 9d2250ad43e364114bda26807fe3074a22a07ed7 (diff) | |
| download | bcm5719-llvm-00db2f13f8be08eea489a26190e8ac9ffc2d6f4e.tar.gz bcm5719-llvm-00db2f13f8be08eea489a26190e8ac9ffc2d6f4e.zip | |
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
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
| -rw-r--r-- | clang/lib/CodeGen/CodeGenModule.h | 7 |
1 files changed, 1 insertions, 6 deletions
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<llvm::Constant*> CFConstantStringMap; - llvm::StringMap<llvm::GlobalVariable *> Constant1ByteStringMap; - llvm::StringMap<llvm::GlobalVariable *> Constant2ByteStringMap; - llvm::StringMap<llvm::GlobalVariable *> Constant4ByteStringMap; + llvm::DenseMap<llvm::Constant *, llvm::GlobalVariable *> ConstantStringMap; llvm::DenseMap<const Decl*, llvm::Constant *> StaticLocalDeclMap; llvm::DenseMap<const Decl*, llvm::GlobalVariable*> StaticLocalDeclGuardMap; llvm::DenseMap<const Expr*, llvm::Constant *> MaterializedGlobalTemporaryMap; @@ -1044,9 +1042,6 @@ private: llvm::PointerType *PTy, const VarDecl *D); - llvm::StringMapEntry<llvm::GlobalVariable *> * - getConstantStringMapEntry(StringRef Str, int CharByteWidth); - /// Set attributes which are common to any form of a global definition (alias, /// Objective-C method, function, global variable). /// |

