Skip to content
Commit 1c9e5acd authored by Greg Clayton's avatar Greg Clayton
Browse files

Added the DWARF unique type map such that we only create a type once in the

module's AST context. Prior to this fix, with gcc binaries, we end up with
a full class definition for any used classes in each compile unit due to the
one definition rule. This would result in us making N copies of class T, where
N is the number of compile units that use class T, in the module AST. When
an expression would then try and use any types that were duplicated, it would
quickly confuse clang and make expression evaluation fail due to all of the
duplicate types that got copied over. This is now fixed by making a map of
types in the DWARF that maps type names to a collection of types + declaration
(file + line number) + DIE. Then later when we find a type we look in this
module map and find any already cached types that we can just use.

8935777

llvm-svn: 125207
parent 1388a899
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment