Don't dereference root in __parse_ctor_dtor_name unless it is known to not be null.

git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@158556 91177308-0d34-0410-b5e6-96231b3b80d8
Add missing #include <stdlib.h> into test which uses ::exit.


git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@160039 91177308-0d34-0410-b5e6-96231b3b80d8
add a link to the libc++ website

git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@160553 91177308-0d34-0410-b5e6-96231b3b80d8
Andrew Morrow:  The variable 't1' on line 10188 of cxa_demangle.cpp is uninitialized
which generates -Wsometimes-uninitialized.  Howard:  The only thing this patch is missing is an update to CREDITS.TXT.

git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@160932 91177308-0d34-0410-b5e6-96231b3b80d8
Andrew Morrow: Mainline clang seems to have recently become more strict about the
consistent application of visibility attributes, which causes some new
breakage in libcxxabi:

In file included from src/libcxxabi/src/cxa_default_handlers.cpp:19:
src/libcxxabi/src/private_typeinfo.h:123:23: error: visibility does
not match previous declaration
class __attribute__ ((__visibility__(default))) __class_type_info
                     ^
src/libcxxabi/src/private_typeinfo.h:19:13: note: previous attribute is here
#pragma GCC visibility push(hidden)
           ^
1 error generated.

The forward declaration of __class_type_info is picking up hidden
visibility from the #pragma, which conflicts with the default
visibility applied when the class is later fully declared. I'm
assuming that the full declaration has it right (and that the
diagnostic is correct), so the attached patch applies the default
visibility attribute to the forward declaration.

git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@160933 91177308-0d34-0410-b5e6-96231b3b80d8
Erik Olofsson:  This patch adds support for lambda demangling. I fixed this because it crashed lldb when it tried to demangle the added test.

Not sure how it should identify the lambda so that might need changing from the current 'lambdax'::  Howard:  Please patch CREDITS.TXT.

git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@161125 91177308-0d34-0410-b5e6-96231b3b80d8
Update CREDITS.TXT

git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@161129 91177308-0d34-0410-b5e6-96231b3b80d8
Update status.

git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@161221 91177308-0d34-0410-b5e6-96231b3b80d8
Fixes apple:  #12020687.  This was a problem in the demangler with template
substitution forward references.  That is, sometimes a mangled name refers to
a substitution that hasn't yet been defined.  The demangler was derferencing a
null pointer in this case because it wasn't properly guarded against a
forward reference.  Test case added to catch this problem.

git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@161267 91177308-0d34-0410-b5e6-96231b3b80d8
Change size of reference count field in __libcpp_nmstr from 32 bits to 64 bits for 64 bit targets.  This is controls the data layout of all exceptions defined in <stdexcept>.  This aligns the ABI with that of gcc-4.2.

git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@161496 91177308-0d34-0410-b5e6-96231b3b80d8
Specifically disallow primary-expressions of the form LT_... on the basis of this decition: http://sourcerytools.com/pipermail/cxx-abi-dev/2011-August/002422.html .  Failure to disallow this was causing infinite recursion in the demangler when these symbols show up due to mangling bugs.  This patch causes the demangler to return an invalid mangled name result rather than crash in infinite recursion.

git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@163859 91177308-0d34-0410-b5e6-96231b3b80d8
I've added Apple-only behavior that looks for libstdc++ in the same process and if found, checks the string stored in <stdexcept> exception objects to see if it is the gcc empty string singleton before manipulating the reference count.  This is done so that if such an exception is created with a zero-length string in libstdc++, libc++abi won't try to delete the memory.  This is part of a ongoing process to make libc++ exceptions ABI-compatible with libstdc++-4.2 exceptions, to the point that each library can catch exceptions thrown by the other.  If other parties would also like this behavior, the #if __APPLE__ can be broadened.

git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@164170 91177308-0d34-0410-b5e6-96231b3b80d8
Tweak use of dlopen to be a little more correct and higher performing.

git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@164404 91177308-0d34-0410-b5e6-96231b3b80d8
Rename class __lambda to __lambda_node to avoid clash with gcc.  This fixes http://llvm.org/bugs/show_bug.cgi?id=13889

git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@164405 91177308-0d34-0410-b5e6-96231b3b80d8
Updating email address

git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@164490 91177308-0d34-0410-b5e6-96231b3b80d8
Two changes:  1)  I still didn't have the ABI correct to match the gcc-4.2 std::string under the exception classes.  I think the changes to stdexcept.cpp have got that down now.  2) On Apple platforms I'm seeing visibility bugs in applications with respect to type_info's being hidden.  This is causing dynamic_cast to malfunction because there are multiple type_info's running around for one type within an application, making dynamic_cast believe that one type is actually multiple types.  As a stop gap measure I'm trying to detect this error, print out an error message, but continue with the most likely desired result.  This is all under __APPLE__.  This behavior can be expanded to other platforms if desired.

git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@164809 91177308-0d34-0410-b5e6-96231b3b80d8
Improve the diagnostic messages on dynamic_cast.

git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@164833 91177308-0d34-0410-b5e6-96231b3b80d8
Set up code under _LIBCXX_DYNAMIC_FALLBACK which is off by default.  For a full description of _LIBCXX_DYNAMIC_FALLBACK, see src/private_typeinfo.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@164863 91177308-0d34-0410-b5e6-96231b3b80d8
Move TargetData to DataLayout.

git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@165397 91177308-0d34-0410-b5e6-96231b3b80d8
Make the type_info for __shim_type_info visible.  This should address some failing dynamic_casts that a few applications are doing on the type_info hierarchy.

git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@165883 91177308-0d34-0410-b5e6-96231b3b80d8