aboutsummaryrefslogtreecommitdiff
path: root/CodeGen/CodeGenTypes.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-02-05 06:55:31 +0000
committerChris Lattner <sabre@nondot.org>2008-02-05 06:55:31 +0000
commitaf31913e48c96fddb45a0fd33f25617546502cbb (patch)
treefec6fbce36a560ee4c3ed214985e2473eb18a26d /CodeGen/CodeGenTypes.h
parentc4b23a530b04ee77b56772a70191d32119eadc3e (diff)
Change the key of CGRecordLayouts from being an llvm type* to being a decl*. LLVM
Type*'s can change as types are refined, so we can't use them as a stable key in the map. Decls don't change, so use them instead. This patch was written by Anders, but he's too shy to commit it himself :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46743 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CodeGen/CodeGenTypes.h')
-rw-r--r--CodeGen/CodeGenTypes.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/CodeGen/CodeGenTypes.h b/CodeGen/CodeGenTypes.h
index 2ca3d3478c..0da71ca029 100644
--- a/CodeGen/CodeGenTypes.h
+++ b/CodeGen/CodeGenTypes.h
@@ -81,7 +81,7 @@ class CodeGenTypes {
/// record layout info.
/// FIXME : If CGRecordLayout is less than 16 bytes then use
/// inline it in the map.
- llvm::DenseMap<const llvm::Type*, CGRecordLayout *> CGRecordLayouts;
+ llvm::DenseMap<const TagDecl*, CGRecordLayout *> CGRecordLayouts;
/// FieldInfo - This maps struct field with corresponding llvm struct type
/// field no. This info is populated by record organizer.
@@ -136,7 +136,7 @@ public:
const llvm::Type *ConvertTypeForMem(QualType T);
- const CGRecordLayout *getCGRecordLayout(const llvm::Type*) const;
+ const CGRecordLayout *getCGRecordLayout(const TagDecl*) const;
/// getLLVMFieldNo - Return llvm::StructType element number
/// that corresponds to the field FD.