summaryrefslogtreecommitdiff
path: root/bridges
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2012-04-04 21:41:49 +0200
committerLuboš Luňák <l.lunak@suse.cz>2012-04-04 21:41:49 +0200
commite2b7e28c12bb836fd7ab1dcbfc2460f807dd27f6 (patch)
tree2c2d4f5634d0304f13f2860617a8558487724976 /bridges
parent568d3912bf8ced76ecb9506bccc3bd361daba082 (diff)
adjust gcc3_linux_intel bridge to work with clang
Otherwise exception throwing seems to be broken. This is a partial revert of b0515ea5fa6c29faebed616ae3e0213c72d24904.
Diffstat (limited to 'bridges')
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_intel/callvirtualmethod.cxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_intel/except.cxx5
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_intel/share.hxx4
3 files changed, 11 insertions, 1 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/callvirtualmethod.cxx b/bridges/source/cpp_uno/gcc3_linux_intel/callvirtualmethod.cxx
index 4c6370fbbaba..34f261a7fc34 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/callvirtualmethod.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/callvirtualmethod.cxx
@@ -36,6 +36,7 @@
#include "typelib/typedescription.h"
#include "callvirtualmethod.hxx"
+#include "share.hxx"
// The call instruction within the asm block of callVirtualMethod may throw
// exceptions. At least GCC 4.7.0 with -O0 would create (unnecessary)
@@ -66,6 +67,8 @@ void CPPU_CURRENT_NAMESPACE::callVirtualMethod(
// unexpected size of int
assert(nStackLongs && pStackLongs); // no stack
+ if (! pAdjustedThisPtr) CPPU_CURRENT_NAMESPACE::dummy_can_throw_anything("xxx"); // address something
+
volatile long edx = 0, eax = 0; // for register returns
void * stackptr;
asm volatile (
diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx b/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx
index 6515b8f0758e..e7e6e943aaac 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx
@@ -46,7 +46,6 @@
#include <com/sun/star/uno/genfunc.hxx>
#include "com/sun/star/uno/RuntimeException.hpp"
#include <typelib/typedescription.hxx>
-#include <uno/any2.h>
#include "share.hxx"
@@ -60,6 +59,10 @@ using namespace ::__cxxabiv1;
namespace CPPU_CURRENT_NAMESPACE
{
+void dummy_can_throw_anything( char const * )
+{
+}
+
//==================================================================================================
static OUString toUNOname( char const * p ) SAL_THROW(())
{
diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/share.hxx b/bridges/source/cpp_uno/gcc3_linux_intel/share.hxx
index 2eff5576362f..dfa1bf9675cb 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/share.hxx
@@ -32,9 +32,13 @@
#include <exception>
#include <cstddef>
+#include <uno/any2.h>
+
namespace CPPU_CURRENT_NAMESPACE
{
+void dummy_can_throw_anything( char const * );
+
// ----- following decl from libstdc++-v3/libsupc++/unwind-cxx.h and unwind.h
struct _Unwind_Exception