]> granicus.if.org Git - clang/commitdiff
change ABIArgInfo to hold its llvm type with PATypeHolder so that
authorChris Lattner <sabre@nondot.org>
Tue, 29 Jun 2010 19:21:36 +0000 (19:21 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 29 Jun 2010 19:21:36 +0000 (19:21 +0000)
it doesn't dangle as types get refined.  This fixes Shootout-C++/lists1
and probably also PR7522.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107196 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/ABIInfo.h

index c1efd056c7b0ae2b660f9b0ba73636785e6e7112..85524acbe1f7a0b1e1724aa895c6d36d4cfdba2e 100644 (file)
 #define CLANG_CODEGEN_ABIINFO_H
 
 #include "clang/AST/Type.h"
-
-#include <cassert>
+#include "llvm/Type.h"
 
 namespace llvm {
-  class Type;
   class Value;
   class LLVMContext;
 }
@@ -70,7 +68,7 @@ namespace clang {
 
   private:
     Kind TheKind;
-    const llvm::Type *TypeData;
+    llvm::PATypeHolder TypeData;
     unsigned UIntData;
     bool BoolData;