summaryrefslogtreecommitdiff
path: root/examples/ExceptionDemo/ExceptionDemo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/ExceptionDemo/ExceptionDemo.cpp')
-rw-r--r--examples/ExceptionDemo/ExceptionDemo.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/examples/ExceptionDemo/ExceptionDemo.cpp b/examples/ExceptionDemo/ExceptionDemo.cpp
index 6a0d0d027f..d6954e83be 100644
--- a/examples/ExceptionDemo/ExceptionDemo.cpp
+++ b/examples/ExceptionDemo/ExceptionDemo.cpp
@@ -1562,7 +1562,7 @@ llvm::Function *createUnwindExceptionTest(llvm::Module &module,
return(outerCatchFunct);
}
-
+namespace {
/// Represents our foreign exceptions
class OurCppRunException : public std::runtime_error {
public:
@@ -1577,11 +1577,9 @@ public:
std::runtime_error::operator=(toCopy)));
}
- ~OurCppRunException (void) throw ();
+ virtual ~OurCppRunException (void) throw () {}
};
-
-// Provide out-of-line definition to prevent weak vtable.
-OurCppRunException::~OurCppRunException() throw () {}
+} // end anonymous namespace
/// Throws foreign C++ exception.
/// @param ignoreIt unused parameter that allows function to match implied