diff options
author | Bill Wendling <isanbard@gmail.com> | 2009-11-18 01:03:56 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2009-11-18 01:03:56 +0000 |
commit | 5eea34267376e76aceb53b6c3dfead816021258f (patch) | |
tree | 642ec53ac5486505dbc7587657803d280d8f488b /include/llvm/Target | |
parent | 3dbb9e64d6e9d1e8bf16f75ebe4fe59ffdf93dd3 (diff) | |
download | external_llvm-5eea34267376e76aceb53b6c3dfead816021258f.zip external_llvm-5eea34267376e76aceb53b6c3dfead816021258f.tar.gz external_llvm-5eea34267376e76aceb53b6c3dfead816021258f.tar.bz2 |
The llvm-gcc front-end and the pass manager use two separate TargetData objects.
This is probably not confined to *just* these two things.
Anyway, the llvm-gcc front-end may look up the structure layout information for
an abstract type. That information will be stored into a table with the FE's
TD. Instruction combine can come along and also ask for information on that
abstract type, but for a separate TD (the one associated with the pass manager).
After the type is refined, the old structure layout information in the pass
manager's TD file is out of date. If a new type is allocated in the same space
as the old-unrefined type, then the structure type information in the pass
manager's TD file will be wrong, but won't know it.
Fix this by making the TD's structure type information an abstract type user.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89176 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target')
-rw-r--r-- | include/llvm/Target/TargetData.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/llvm/Target/TargetData.h b/include/llvm/Target/TargetData.h index b663d47..e1d052e 100644 --- a/include/llvm/Target/TargetData.h +++ b/include/llvm/Target/TargetData.h @@ -30,6 +30,7 @@ class Type; class IntegerType; class StructType; class StructLayout; +class StructLayoutMap; class GlobalVariable; class LLVMContext; @@ -84,8 +85,8 @@ private: /// type and bit width were not found in the SmallVector. static const TargetAlignElem InvalidAlignmentElem; - // Opaque pointer for the StructType -> StructLayout map. - mutable void *LayoutMap; + // The StructType -> StructLayout map. + mutable StructLayoutMap *LayoutMap; //! Set/initialize target alignments void setAlignment(AlignTypeEnum align_type, unsigned char abi_align, |