Index: cfe/trunk/lib/CodeGen/CGVTables.cpp =================================================================== --- cfe/trunk/lib/CodeGen/CGVTables.cpp +++ cfe/trunk/lib/CodeGen/CGVTables.cpp @@ -64,6 +64,10 @@ const CXXMethodDecl *MD = cast(GD.getDecl()); setThunkVisibility(CGM, MD, Thunk, ThunkFn); + // Propagate dllexport storage. + if (MD->hasAttr()) + ThunkFn->setDLLStorageClass(llvm::GlobalValue::DLLExportStorageClass); + if (CGM.supportsCOMDAT() && ThunkFn->isWeakForLinker()) ThunkFn->setComdat(CGM.getModule().getOrInsertComdat(ThunkFn->getName())); } Index: cfe/trunk/test/CodeGenCXX/windows-itanium-dllexport.cpp =================================================================== --- cfe/trunk/test/CodeGenCXX/windows-itanium-dllexport.cpp +++ cfe/trunk/test/CodeGenCXX/windows-itanium-dllexport.cpp @@ -53,3 +53,12 @@ // CHECK: declare dllimport {{.*}} @_ZN5outerIcE1fEv // CHECK: define {{.*}} @_ZN5outerIcE5inner1fEv + +struct base { + virtual ~base(); +}; +struct __declspec(dllexport) derived : public virtual base { + virtual ~derived() {} +}; + +// CHECK: define {{.*}} dllexport {{.*}} @_ZTv0_n12_N7derivedD0Ev