summaryrefslogtreecommitdiff
path: root/codemaker
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-09-23 15:17:30 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-09-23 15:23:52 +0200
commit18cd08ae42b0fbd1e8ded8c046a5c801b30b968c (patch)
tree452007448516e189702d2f3a4db64dd65cf36e72 /codemaker
parent4151c09d9a03731c3ffbb1314ead26dbd8edae85 (diff)
cid#1371162 etc.: Move semantics for cppumaker-generated UNO exception classes
For UNO ABI reasons, these classes need to be CPPU_GCC_DLLPUBLIC_EXPORT (so their RTTI symbols get exported), so they are careful to explicitly declare any special member functions that would otherwise be declared implicitly, to mark them CPPU_GCC_DLLPRIVATE. But for LIBO_INTERNAL_ONLY, we always use -fvisibility-inlines-hidden (except for MSVC, where it doesn't matter, as CPPU_GCC_DLLPRIVATE expands to nothing there, either), so can leave those functions implicitly declared, so not to prevent move ctor and move assign op from being implicitly declared. This covers cid#s 1371143, 1371162, 1371185, 1371189, 1371290, and 1371308. Change-Id: I468088750a02f85a4790d956c37f4c30de03f00c
Diffstat (limited to 'codemaker')
-rw-r--r--codemaker/source/cppumaker/cpputype.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx
index 7eac4f05d767..e87fed09df3b 100644
--- a/codemaker/source/cppumaker/cpputype.cxx
+++ b/codemaker/source/cppumaker/cpputype.cxx
@@ -2851,8 +2851,8 @@ void ExceptionType::dumpHppFile(
}
out << "}\n\n";
}
- out << indent() << id_ << "::" << id_ << "(" << id_
- << " const & the_other)";
+ out << "#if !defined LIBO_INTERNAL_ONLY\n" << indent() << id_ << "::" << id_
+ << "(" << id_ << " const & the_other)";
bFirst = true;
if (!base.isEmpty()) {
out << ": " << codemaker::cpp::scopedCppName(u2b(base))
@@ -2882,7 +2882,7 @@ void ExceptionType::dumpHppFile(
}
out << indent() << "return *this;\n";
dec();
- out << indent() << "}\n\n";
+ out << indent() << "}\n#endif\n\n";
if (codemaker::cppumaker::dumpNamespaceClose(out, name_, false)) {
out << "\n";
}
@@ -3066,10 +3066,11 @@ void ExceptionType::dumpDeclaration(FileStream & out) {
}
out << ");\n\n";
}
- out << indent() << "inline CPPU_GCC_DLLPRIVATE " << id_ << "(" << id_
+ out << "#if !defined LIBO_INTERNAL_ONLY\n" << indent()
+ << "inline CPPU_GCC_DLLPRIVATE " << id_ << "(" << id_
<< " const &);\n\n" << indent() << "inline CPPU_GCC_DLLPRIVATE ~"
<< id_ << "();\n\n" << indent() << "inline CPPU_GCC_DLLPRIVATE " << id_
- << " & operator =(" << id_ << " const &);\n\n";
+ << " & operator =(" << id_ << " const &);\n#endif\n\n";
for (std::vector< unoidl::ExceptionTypeEntity::Member >::const_iterator i(
entity_->getDirectMembers().begin());
i != entity_->getDirectMembers().end(); ++i)