]> granicus.if.org Git - clang/commitdiff
Refine linkage on thunks. WIP.
authorMike Stump <mrs@apple.com>
Thu, 19 Nov 2009 00:49:05 +0000 (00:49 +0000)
committerMike Stump <mrs@apple.com>
Thu, 19 Nov 2009 00:49:05 +0000 (00:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89287 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGVtable.cpp

index 4c97a9bdeebfbbd19e465dda319353e05b1b1357..a726fec5715cbeab6b90ceea27c46c03e2ff42fa 100644 (file)
@@ -69,7 +69,6 @@ private:
   llvm::DenseMap<CtorVtable_t, int64_t> &AddressPoints;
 
   typedef CXXRecordDecl::method_iterator method_iter;
-  // FIXME: Linkage should follow vtable
   const bool Extern;
   const uint32_t LLVMPointerWidth;
   Index_t extra;
@@ -82,7 +81,7 @@ public:
       BLayout(cgm.getContext().getASTRecordLayout(l)),
       rtti(cgm.GenerateRttiRef(c)), VMContext(cgm.getModule().getContext()),
       CGM(cgm), AddressPoints(*new llvm::DenseMap<CtorVtable_t, int64_t>),
-      Extern(true),
+      Extern(!l->isInAnonymousNamespace()),
       LLVMPointerWidth(cgm.getContext().Target.getPointerWidth(0)) {
     Ptr8Ty = llvm::PointerType::get(llvm::Type::getInt8Ty(VMContext), 0);