Allow demangler's node allocator to fail, and bail out of the entire
authorRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 24 Aug 2018 23:26:05 +0000 (23:26 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 24 Aug 2018 23:26:05 +0000 (23:26 +0000)
commit9c2e4f39bc6a2394747695bd013d4a2da844ea69
tree34bef9c8610dc0f2cceb74250547c5f6021b4306
parent61b28ede75d9cbd2754a97364b7e99aa60e1b26c
Allow demangler's node allocator to fail, and bail out of the entire
demangling process when it does.

Use this to support a "lookup" query for the mangling canonicalizer that
does not create new nodes. This could also be used to implement
demangling with a fixed-size temporary storage buffer.

Reviewers: erik.pilkington

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D51003

llvm-svn: 340670
llvm/include/llvm/Demangle/ItaniumDemangle.h
llvm/include/llvm/Support/ItaniumManglingCanonicalizer.h
llvm/lib/Support/ItaniumManglingCanonicalizer.cpp
llvm/unittests/Support/ItaniumManglingCanonicalizerTest.cpp