aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/CodeGen/MachineConstantPool.h
diff options
context:
space:
mode:
authorCameron Zwarich <zwarich@apple.com>2011-02-22 08:54:30 +0000
committerCameron Zwarich <zwarich@apple.com>2011-02-22 08:54:30 +0000
commit5567869637383969dced0b84dbd19da12682df6b (patch)
tree2d1e9c10d092bd8d5a942e2d010154a7ab019eee /include/llvm/CodeGen/MachineConstantPool.h
parent6023efb45d9f21d0fd453334dc958b125cdbd8f8 (diff)
downloadexternal_llvm-5567869637383969dced0b84dbd19da12682df6b.zip
external_llvm-5567869637383969dced0b84dbd19da12682df6b.tar.gz
external_llvm-5567869637383969dced0b84dbd19da12682df6b.tar.bz2
MachineConstantPoolValues are not uniqued, so they need to be freed if they
share entries. Add a DenseSet to MachineConstantPool for the MachineCPVs that it owns. This will hopefully fix the MC/ARM/elf-reloc-01.ll failure on the leaks bots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126218 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineConstantPool.h')
-rw-r--r--include/llvm/CodeGen/MachineConstantPool.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineConstantPool.h b/include/llvm/CodeGen/MachineConstantPool.h
index 498f815..5727321 100644
--- a/include/llvm/CodeGen/MachineConstantPool.h
+++ b/include/llvm/CodeGen/MachineConstantPool.h
@@ -16,6 +16,7 @@
#ifndef LLVM_CODEGEN_MACHINECONSTANTPOOL_H
#define LLVM_CODEGEN_MACHINECONSTANTPOOL_H
+#include "llvm/ADT/DenseSet.h"
#include <cassert>
#include <climits>
#include <vector>
@@ -130,6 +131,8 @@ class MachineConstantPool {
const TargetData *TD; ///< The machine's TargetData.
unsigned PoolAlignment; ///< The alignment for the pool.
std::vector<MachineConstantPoolEntry> Constants; ///< The pool of constants.
+ /// MachineConstantPoolValues that use an existing MachineConstantPoolEntry.
+ DenseSet<MachineConstantPoolValue*> MachineCPVsSharingEntries;
public:
/// @brief The only constructor.
explicit MachineConstantPool(const TargetData *td)