| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
These were causing failures in -Werror builds.
llvm-svn: 310535
|
|
|
|
|
|
| |
Differential revision: https://reviews.llvm.org/D36427
llvm-svn: 310525
|
|
|
|
| |
llvm-svn: 310415
|
|
|
|
| |
llvm-svn: 310226
|
|
|
|
| |
llvm-svn: 309650
|
|
|
|
| |
llvm-svn: 309649
|
|
|
|
| |
llvm-svn: 309520
|
|
|
|
| |
llvm-svn: 309349
|
|
|
|
| |
llvm-svn: 309342
|
|
|
|
|
|
|
|
|
|
|
|
| |
The demangler now demangles by producing an AST, then traverses that
AST to produce a demangled name. This is done for performance reasons,
now the demangler doesn't manuiplate std::strings, which hurt
performance and caused string operations to be inlined into the
parser, leading to large code size and stack usage.
Differential revision: https://reviews.llvm.org/D35159
llvm-svn: 309340
|
|
|
|
|
|
| |
Fixes an exponential parse found by oss-fuzz.
llvm-svn: 307941
|
|
|
|
|
|
| |
Differential revision: https://reviews.llvm.org/D35158
llvm-svn: 307482
|
|
|
|
|
|
| |
Differential revision: https://reviews.llvm.org/D35158
llvm-svn: 307481
|
|
|
|
|
|
| |
unsupported
llvm-svn: 305500
|
|
|
|
|
|
|
| |
Use the C++11 (formalised in C++17) tag to indicate a fallthrough in the
switch case. Silences a -Wimplicit-fallthrough warning with gcc:7
llvm-svn: 305173
|
|
|
|
|
|
|
|
|
|
|
| |
The problem was that if base_name() was called from a context without
an actual base name, it could gulp up the entire string, which can
result in recursive duplications. The fix is to be more strict as to
what qualifies as a base name.
Differential revision: https://reviews.llvm.org/D33637
llvm-svn: 304113
|
|
|
|
| |
llvm-svn: 303806
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Previously if we parsed a constructor then we set parsed_ctor_dtor_cv
to true and never reseted it. This causes issue when a template argument
references a constructor (e.g. type of lambda defined inside a
constructor) as we will have the parsed_ctor_dtor_cv flag set what will
cause issues when parsing later arguments.
Reviewers: EricWF, compnerd
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D33385
llvm-svn: 303737
|
|
|
|
|
|
|
|
|
| |
The problem is that multiple types could have been parsed from parse_type(),
which the lamdba parameter parsing didn't handle.
Differential revision: https://reviews.llvm.org/D33368
llvm-svn: 303718
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
libc++abi can't depend on libc++, so disable extern templates in libc++
headers project-wide. This was previously done in cxa_demangle.cpp, but
I consider it more appropriate to do at the cmake level (since none of
libc++abi's source files can use libc++ extern templates).
I also think the _LIBCPP_NO_EXCEPTIONS in cxa_demangle.cpp is
suspicious, but I'm doing one thing at a time.
Differential Revision: https://reviews.llvm.org/D32329
llvm-svn: 302739
|
|
|
|
|
|
| |
grammar for mangling for these names are "<special-name> ::= TW <object name>" for wrapper variables or "<special-name> ::= TH <object name>" for initialization variables.
llvm-svn: 293638
|
|
|
|
|
|
| |
Found with ASAN + libFuzzer by Kostya Serebryany <kcc@google.com>
llvm-svn: 293330
|
|
|
|
|
|
|
|
|
|
|
|
| |
When checking if the type is a r-value ref, we would not do a complete
check. This would result in us treating a trailing parameter reference
`&)` as a r-value ref, and improperly inject the cv qualifier on the
type. We now correctly demangle the type `KFvRmE` as a constant
function rather than a constant reference.
Fixes PR31741!
llvm-svn: 292973
|
|
|
|
|
|
|
|
|
|
|
| |
Fix an off-by-one case which would destroy the final parameter in a
CV-qualified function type with a reference. We still get the CV
qualification incorrect, but at least we do not clobber the type name
any longer.
Partially fixes PR31741.
llvm-svn: 292963
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Itanium ABI [1] specifies that __cxa_demangle accept either:
1) symbol names, which start with "_Z"
2) type manglings, which do not start with "_Z"
r286788 erroneously assumes that it should only handle symbols, so this patch
reverts it and adds a counterexample to the testcase.
1: https://mentorembedded.github.io/cxx-abi/abi.html#demangler
Reviewers: zygoloid, EricWF
llvm-svn: 292418
|
|
|
|
|
|
| |
Clean up the misleading indentation warning from GCC 6. NFC
llvm-svn: 290788
|
|
|
|
|
|
|
|
| |
Sink the Db initialization into the structure rather than out-of-line at the
declaration size. This just makes it easier to see what initialization is being
performed. NFC.
llvm-svn: 287364
|
|
|
|
|
|
|
|
|
|
|
|
| |
The block invocation function uses an extension where the prefix is ___Z
as opposed to _Z. This should make the tests pass again.
Disable a negative test which was testing a crasher. The symbol being
demangled is not a valid mangled symbol and will return a nullptr.
Adjust the type info decoding test to be a valid symbol name.
llvm-svn: 286793
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ensure that we have a mangled symbol before attempting to demangle it. We would
previously treat any input as a mangled symbol rather than checking that the
symbol has the initial C++ Itanium v3 mangling prefix of `_Z`. This changes the
behaviour from the previous case which would undecorate `f` to `float` rather
than nullptr as it should.
Unfortunately, we do not have any negative testing for the demangler.
llvm-svn: 286788
|
|
|
|
|
|
| |
These were found fuzzing with ASAN.
llvm-svn: 278579
|
|
|
|
|
|
|
| |
cxa_demangle's default size for a long double is 10 bytes. Hexagon
only has an 8 byte long double though.
llvm-svn: 258313
|
|
|
|
| |
llvm-svn: 257614
|
|
|
|
|
|
|
|
|
| |
Mark functions and types with the appropriate visibility. This is particularly
useful for environments which explicitly indicate origin of functions (Windows).
This aids in generating libc++abi as a DSO which exposes only the public
interfaces.
llvm-svn: 254691
|
|
|
|
|
|
|
| |
Cleanup some code with clang-format to make the following change easier to
identify material difference. NFC.
llvm-svn: 254690
|
|
|
|
|
|
| |
Jason King for the report and suggested fix
llvm-svn: 250097
|
|
|
|
|
|
| |
http://reviews.llvm.org/D13192. Thanks to Anseny Kapoulkine for the patch.
llvm-svn: 249649
|
|
|
|
|
|
|
| |
libstdc++ needs a few typedefs in malloc_alloc. MSVC's STL needs rebind(),
construct(), destroy(). MSVC2013 also has no snprintf, but it exists in 2015.
llvm-svn: 248129
|
|
|
|
|
|
|
|
|
| |
This makes all libcxxabi tests pass on AArch64. Further changes and
new tests to come.
Patch by Keith Walker.
llvm-svn: 245449
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Patch by Nitesh Jain and Jaydeep Patil with a small revision to use ABIs rather
than Architecture Revisions (which currently imply particular ABIs).
Fixes test_demangle.pass.cpp (PR24149).
Subscribers: mclow.lists, jaydeep, nitesh.jain, hans, cfe-commits
Differential Revision: http://reviews.llvm.org/D11483
llvm-svn: 243645
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: howard.hinnant
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D9954
llvm-svn: 238263
|
|
|
|
|
|
|
| |
The externC variable was set but unused. This constantly flagged a warning from
gcc. Replace it with a comment until such a time that we need it.
llvm-svn: 235830
|
|
|
|
|
|
|
|
|
| |
Cleans up the -Wundef warning caused by the use of the __LITTLE_ENDIAN__ macro.
Instead use `__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__`. `__BYTE_ORDER__` is
defined by GCC since 4.2 and by clang. This avoids the undef case where a macro
may be undefined. This has previously caught real errors in libunwind.
llvm-svn: 235828
|
|
|
|
|
|
|
|
|
|
| |
There is some debugging code in cxa_demangle.cpp that prints messages on
stdout. In general this is not safe, as the program itself may use
stdout to write its output. Change this code to write to stderr.
Differential Revision: http://reviews.llvm.org/D8167
llvm-svn: 232716
|
|
|
|
|
|
|
|
| |
- GCC doesn't support #pragma mark, only Apple GCC and clang. Wrap the pragma mark's in #if 0 to make gcc ignore them but xcode still see them.
- Wrap a bunch of "#pragma clang" lines in #ifdef __clang__.
- Pacify gcc's -Wparenthesis in a case where it's quite reasonable.
llvm-svn: 231344
|
|
|
|
| |
llvm-svn: 211748
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There was a single problem in cxa_demangle.cpp, where gcc would complain
`error: changes meaning of 'String'` about the line `typedef String String;`.
According to 3.3.7p2, this diagnostic is allowed (but not required, so clang
does not have to report this).
As a fix, make string_pair a template and pass String as template parameter.
This fixes the error with gcc and also removes some repetition from the code.
No behavior change.
llvm-svn: 209909
|
|
|
|
|
|
|
| |
determine whether we get a mangling for a return type, rather than trying to
figure it out based on whether the mangled name ended with a '>'.
llvm-svn: 208611
|
|
|
|
|
|
|
| |
This commit implements the ARM zero-cost exception handling
support for libc++abi.
llvm-svn: 208466
|
|
|
|
| |
llvm-svn: 201533
|
|
|
|
| |
llvm-svn: 198643
|