summaryrefslogtreecommitdiffstats
path: root/clang/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
commitf41e87f4cdf8ab94a3eff198b6d76f685f7c23cc (patch)
tree13fa8f8a5bab6ea6890bee64c4cd2a24276c81b3 /clang/lib/CodeGen/CodeGenModule.h
parent2739d2bbe68efae3416b80294d8477c732105872 (diff)
downloadbcm5719-llvm-f41e87f4cdf8ab94a3eff198b6d76f685f7c23cc.tar.gz
bcm5719-llvm-f41e87f4cdf8ab94a3eff198b6d76f685f7c23cc.zip
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. llvm-svn: 68155
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h
index dbfbf028af0..01b8d02fb8e 100644
--- a/clang/lib/CodeGen/CodeGenModule.h
+++ b/clang/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.
OpenPOWER on IntegriCloud