Граф коммитов

9 Коммитов

Автор SHA1 Сообщение Дата
John McCall 15e310a3b9 Warn about code that uses variables and functions with internal linkage
without defining them.  This should be an error, but I'm paranoid about
"uses" that end up not actually requiring a definition.  I'll revisit later.

Also, teach IR generation to not set internal linkage on variable
declarations, just for safety's sake.  Doing so produces an invalid module
if the variable is not ultimately defined.

Also, fix several places in the test suite where we were using internal
functions without definitions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126016 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-19 02:53:41 +00:00
Anders Carlsson f502d93b0e Mark VTables and RTTI data linkonce_odr instead of weak_odr, with the exception of explicit template instantiations, which have to be weak_odr.
This fixes PR6996.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124089 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-24 00:46:19 +00:00
Rafael Espindola 9f959db60e Add unnamed_addr to vtables.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123272 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-11 21:10:26 +00:00
John McCall 279b5eb691 Just disable the hidden-visibility optimization for now by hiding it behind
a -cc1 option.  The Darwin linker complains about mixed visibility when linking
gcc-built objects with clang-built objects, and the optimization isn't really
that valuable.  Platforms with less ornery linkers can feel free to enable this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110979 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-12 23:36:15 +00:00
John McCall 3d640e6061 Emit weak vtables of non-template classes with hidden visibility.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110107 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-03 07:24:12 +00:00
Douglas Gregor ca4aa379fc A vtable is used if the key function is defined... even if that key
function's definition is an out-of-class definition marked
"inline". Fixes an assertion in WebKit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103763 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-14 04:08:48 +00:00
Daniel Dunbar a5728872c7 Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
- This is designed to make it obvious that %clang_cc1 is a "test variable"
   which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
   can be useful to redefine what gets run as 'clang -cc1' (for example, to set
   a default target).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91446 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 20:14:24 +00:00
Eli Friedman 0259ce2b4a Slight tweak to vtable linkage.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90832 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 04:09:14 +00:00
Eli Friedman 61eab88721 Misc key function fixes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90831 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 03:56:49 +00:00