Commit Graph

6 Commits

Author SHA1 Message Date
Rafael Espindola e6190db8db Propagate VisibleNoLinkage down to class members.
Fixes PR16114.

llvm-svn: 182750
2013-05-28 02:22:10 +00:00
Rafael Espindola 111bb2ef8d Fix the linkage of local types in inline VisibleNoLinkage functions.
We were handling only local types in inline External functions before.

llvm-svn: 182737
2013-05-27 14:50:21 +00:00
Rafael Espindola 50df3a02be Fix linkage computation for derived types in inline functions.
John noticed that the fix for pr15930 (r181981) didn't handle indirect
uses of local types. For example, a pointer to local struct, or a
function that returns it.

One way to implement this would be to recursively look for local
types. This would look a lot like the linkage computation itself for
types.

To avoid code duplication and utilize the existing linkage cache, this
patch just makes the computation of "type with no linkage but
externally visible because it is from an inline function"  part of the
linkage computation itself.

llvm-svn: 182711
2013-05-25 17:16:20 +00:00
Rafael Espindola b6ed153155 Handle local enum types too.
Thanks to John McCall for pointing this out.

llvm-svn: 182182
2013-05-18 00:33:28 +00:00
Rafael Espindola 94c2fea6db Use the awesome CHECK-DAG!
llvm-svn: 182167
2013-05-17 22:33:49 +00:00
Rafael Espindola c1b38a29e7 Fix pr15930.
In the case of inline functions, we have to special case local types
when they are used as template arguments to make sure the template
instantiations are still uniqued in case the function itself is inlined.

llvm-svn: 181981
2013-05-16 04:30:21 +00:00