summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Demangle
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Demangle')
-rw-r--r--llvm/lib/Demangle/ItaniumDemangle.cpp10
-rw-r--r--llvm/lib/Demangle/MicrosoftDemangle.cpp10
2 files changed, 10 insertions, 10 deletions
diff --git a/llvm/lib/Demangle/ItaniumDemangle.cpp b/llvm/lib/Demangle/ItaniumDemangle.cpp
index b6b11dbddf2..e3bd3b87633 100644
--- a/llvm/lib/Demangle/ItaniumDemangle.cpp
+++ b/llvm/lib/Demangle/ItaniumDemangle.cpp
@@ -340,7 +340,7 @@ char *llvm::itaniumDemangle(const char *MangledName, char *Buf,
if (AST == nullptr)
InternalStatus = demangle_invalid_mangled_name;
- else if (initializeOutputStream(Buf, N, S, 1024))
+ else if (!initializeOutputStream(Buf, N, S, 1024))
InternalStatus = demangle_memory_alloc_failure;
else {
assert(Parser.ForwardTemplateRefs.empty());
@@ -396,7 +396,7 @@ bool ItaniumPartialDemangler::partialDemangle(const char *MangledName) {
static char *printNode(const Node *RootNode, char *Buf, size_t *N) {
OutputStream S;
- if (initializeOutputStream(Buf, N, S, 128))
+ if (!initializeOutputStream(Buf, N, S, 128))
return nullptr;
RootNode->print(S);
S += '\0';
@@ -441,7 +441,7 @@ char *ItaniumPartialDemangler::getFunctionDeclContextName(char *Buf,
const Node *Name = static_cast<const FunctionEncoding *>(RootNode)->getName();
OutputStream S;
- if (initializeOutputStream(Buf, N, S, 128))
+ if (!initializeOutputStream(Buf, N, S, 128))
return nullptr;
KeepGoingLocalFunction:
@@ -494,7 +494,7 @@ char *ItaniumPartialDemangler::getFunctionParameters(char *Buf,
NodeArray Params = static_cast<FunctionEncoding *>(RootNode)->getParams();
OutputStream S;
- if (initializeOutputStream(Buf, N, S, 128))
+ if (!initializeOutputStream(Buf, N, S, 128))
return nullptr;
S += '(';
@@ -512,7 +512,7 @@ char *ItaniumPartialDemangler::getFunctionReturnType(
return nullptr;
OutputStream S;
- if (initializeOutputStream(Buf, N, S, 128))
+ if (!initializeOutputStream(Buf, N, S, 128))
return nullptr;
if (const Node *Ret =
diff --git a/llvm/lib/Demangle/MicrosoftDemangle.cpp b/llvm/lib/Demangle/MicrosoftDemangle.cpp
index 882e4a57845..4a45bfa8b32 100644
--- a/llvm/lib/Demangle/MicrosoftDemangle.cpp
+++ b/llvm/lib/Demangle/MicrosoftDemangle.cpp
@@ -874,7 +874,7 @@ void Demangler::memorizeIdentifier(IdentifierNode *Identifier) {
// Render this class template name into a string buffer so that we can
// memorize it for the purpose of back-referencing.
OutputStream OS;
- if (initializeOutputStream(nullptr, nullptr, OS, 1024))
+ if (!initializeOutputStream(nullptr, nullptr, OS, 1024))
// FIXME: Propagate out-of-memory as an error?
std::terminate();
Identifier->output(OS, OF_Default);
@@ -1207,7 +1207,7 @@ Demangler::demangleStringLiteral(StringView &MangledName) {
if (MangledName.empty())
goto StringLiteralError;
- if (initializeOutputStream(nullptr, nullptr, OS, 1024))
+ if (!initializeOutputStream(nullptr, nullptr, OS, 1024))
// FIXME: Propagate out-of-memory as an error?
std::terminate();
if (IsWcharT) {
@@ -1330,7 +1330,7 @@ Demangler::demangleLocallyScopedNamePiece(StringView &MangledName) {
// Render the parent symbol's name into a buffer.
OutputStream OS;
- if (initializeOutputStream(nullptr, nullptr, OS, 1024))
+ if (!initializeOutputStream(nullptr, nullptr, OS, 1024))
// FIXME: Propagate out-of-memory as an error?
std::terminate();
OS << '`';
@@ -2156,7 +2156,7 @@ void Demangler::dumpBackReferences() {
// Create an output stream so we can render each type.
OutputStream OS;
- if (initializeOutputStream(nullptr, nullptr, OS, 1024))
+ if (!initializeOutputStream(nullptr, nullptr, OS, 1024))
std::terminate();
for (size_t I = 0; I < Backrefs.FunctionParamCount; ++I) {
OS.setCurrentPosition(0);
@@ -2194,7 +2194,7 @@ char *llvm::microsoftDemangle(const char *MangledName, char *Buf, size_t *N,
if (D.Error)
InternalStatus = demangle_invalid_mangled_name;
- else if (initializeOutputStream(Buf, N, S, 1024))
+ else if (!initializeOutputStream(Buf, N, S, 1024))
InternalStatus = demangle_memory_alloc_failure;
else {
AST->output(S, OF_Default);
OpenPOWER on IntegriCloud