~ubuntu-branches/ubuntu/hardy/clamav/hardy-security

« back to all changes in this revision

Viewing changes to libclamav/c++/llvm/lib/Support/StringPool.cpp

  • Committer: Package Import Robot
  • Author(s): Scott Kitterman, Marc Deslauriers, Scott Kitterman
  • Date: 2013-03-21 08:37:54 UTC
  • mfrom: (43.1.79 raring-proposed)
  • Revision ID: package-import@ubuntu.com-20130321083754-r3dnl8aewkny2rxu
Tags: 0.97.7+dfsg-1ubuntu0.08.04.1
[ Marc Deslauriers ]
* SECURITY UPDATE: Updated to 0.97.7 to fix multiple security issues.
  (LP: #1157385)
  - CVE numbers pending

[ Scott Kitterman ]
* Changes to adapt to Hardy:
  - Build without llvm support on lpia to fix FTBFS (not a regression as
    llvm has never built on hardy lpia)
  - Drop -T -W from apparmor_parser calls in clamav-daemon and freshclam
    postinsts since it is not supported in Hardy's apparmor
  - Drop deny rule in freshclam apparmor profile since deny is not
    supported in Hardy's apparmor
  - Drop dh_lintian from debian/rules and adjust version of debhelper
    build-dep
  - Drop build-dep and libclamav-dev depends on non-existent libtommath-dev
  - Changed Section to 'utils' for clamav-dbg package
  - Ignore test suite errors on hppa
  - Build-depend on libltdl3-dev instead of libltdl-dev
  - Drop hardening flags changes
  - Drop unneeded versioning on lsb-base (clamav ships it's own status
    function)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//===-- StringPool.cpp - Interned string pool -----------------------------===//
 
2
//
 
3
//                     The LLVM Compiler Infrastructure
 
4
//
 
5
// This file is distributed under the University of Illinois Open Source
 
6
// License. See LICENSE.TXT for details.
 
7
//
 
8
//===----------------------------------------------------------------------===//
 
9
//
 
10
// This file implements the StringPool class.
 
11
//
 
12
//===----------------------------------------------------------------------===//
 
13
 
 
14
#include "llvm/Support/StringPool.h"
 
15
#include "llvm/ADT/StringRef.h"
 
16
 
 
17
using namespace llvm;
 
18
 
 
19
StringPool::StringPool() {}
 
20
 
 
21
StringPool::~StringPool() {
 
22
  assert(InternTable.empty() && "PooledStringPtr leaked!");
 
23
}
 
24
 
 
25
PooledStringPtr StringPool::intern(StringRef Key) {
 
26
  table_t::iterator I = InternTable.find(Key);
 
27
  if (I != InternTable.end())
 
28
    return PooledStringPtr(&*I);
 
29
  
 
30
  entry_t *S = entry_t::Create(Key.begin(), Key.end());
 
31
  S->getValue().Pool = this;
 
32
  InternTable.insert(S);
 
33
  
 
34
  return PooledStringPtr(S);
 
35
}