diff options
| author | 2017-01-14 19:55:43 +0000 | |
|---|---|---|
| committer | 2017-01-14 19:55:43 +0000 | |
| commit | bd3306aecb3a15e8967143b8cdbbccf2b1b19b74 (patch) | |
| tree | 309a8132b44564b9e634c0da6815187ce8eab27c /gnu/llvm/tools/clang/lib/AST/VTableBuilder.cpp | |
| parent | killp -a should not kill the window if only one pane. (diff) | |
| download | wireguard-openbsd-bd3306aecb3a15e8967143b8cdbbccf2b1b19b74.tar.xz wireguard-openbsd-bd3306aecb3a15e8967143b8cdbbccf2b1b19b74.zip | |
Import LLVM 3.9.1 including clang and lld.
Diffstat (limited to 'gnu/llvm/tools/clang/lib/AST/VTableBuilder.cpp')
| -rw-r--r-- | gnu/llvm/tools/clang/lib/AST/VTableBuilder.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/gnu/llvm/tools/clang/lib/AST/VTableBuilder.cpp b/gnu/llvm/tools/clang/lib/AST/VTableBuilder.cpp index bae018652f9..640fbf47aea 100644 --- a/gnu/llvm/tools/clang/lib/AST/VTableBuilder.cpp +++ b/gnu/llvm/tools/clang/lib/AST/VTableBuilder.cpp @@ -2416,7 +2416,7 @@ private: MethodVFTableLocationsTy MethodVFTableLocations; /// \brief Does this class have an RTTI component? - bool HasRTTIComponent; + bool HasRTTIComponent = false; /// MethodInfo - Contains information about a method in a vtable. /// (Used for computing 'this' pointer adjustment thunks. @@ -2545,12 +2545,13 @@ public: MostDerivedClassLayout(Context.getASTRecordLayout(MostDerivedClass)), WhichVFPtr(*Which), Overriders(MostDerivedClass, CharUnits(), MostDerivedClass) { - // Only include the RTTI component if we know that we will provide a - // definition of the vftable. - HasRTTIComponent = Context.getLangOpts().RTTIData && - !MostDerivedClass->hasAttr<DLLImportAttr>() && - MostDerivedClass->getTemplateSpecializationKind() != - TSK_ExplicitInstantiationDeclaration; + // Provide the RTTI component if RTTIData is enabled. If the vftable would + // be available externally, we should not provide the RTTI componenent. It + // is currently impossible to get available externally vftables with either + // dllimport or extern template instantiations, but eventually we may add a + // flag to support additional devirtualization that needs this. + if (Context.getLangOpts().RTTIData) + HasRTTIComponent = true; LayoutVFTable(); |
