aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenModule.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-03-31 22:37:52 +0000
committerChris Lattner <sabre@nondot.org>2009-03-31 22:37:52 +0000
commit35f38a2c22d68c22e2dbe8e9ee84c120c8f327bb (patch)
treec7738badb0de7adc1d10fa8b5fdc09cb62d59307 /lib/CodeGen/CodeGenModule.h
parent481769b5dc102b0256b35581e787909ad5edfab5 (diff)
Change UsedArray to be a vector of WeakVH to fix a dangling pointer problem that occurs when
attribute(used) and asm renaming are used together. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68155 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.h')
-rw-r--r--lib/CodeGen/CodeGenModule.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h
index dbfbf028af..01b8d02fb8 100644
--- a/lib/CodeGen/CodeGenModule.h
+++ b/lib/CodeGen/CodeGenModule.h
@@ -21,6 +21,7 @@
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringSet.h"
+#include "llvm/Support/ValueHandle.h"
#include <list>
namespace llvm {
@@ -119,7 +120,7 @@ class CodeGenModule : public BlockModule {
/// present in the object file; bitcast to i8*. This is used for
/// forcing visibility of symbols which may otherwise be optimized
/// out.
- std::vector<llvm::Constant*> LLVMUsed;
+ std::vector<llvm::WeakVH> LLVMUsed;
/// GlobalCtors - Store the list of global constructors and their respective
/// priorities to be emitted when the translation unit is complete.