Skip to content

Commit bb105bc

Browse files
committed
[lldb] Replace literal "__C" with MANGLING_MODULE_OBJC (NFC)
1 parent 5885b1a commit bb105bc

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

lldb/source/Plugins/LanguageRuntime/Swift/SwiftLanguageRuntimeDynamicTypeResolution.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
#include "swift/Remote/MemoryReader.h"
4040
#include "swift/RemoteAST/RemoteAST.h"
4141
#include "swift/Runtime/Metadata.h"
42+
#include "swift/Strings.h"
4243

4344
#include <sstream>
4445

@@ -2971,7 +2972,9 @@ bool SwiftLanguageRuntimeImpl::GetDynamicTypeAndAddress_ClangType(
29712972
NodePointer cty = factory.createNode(Node::Kind::Type);
29722973
list->addChild(cty, factory);
29732974
NodePointer c = factory.createNode(Node::Kind::Class);
2974-
c->addChild(factory.createNode(Node::Kind::Module, "__C"), factory);
2975+
c->addChild(
2976+
factory.createNode(Node::Kind::Module, swift::MANGLING_MODULE_OBJC),
2977+
factory);
29752978
c->addChild(factory.createNode(Node::Kind::Identifier, dyn_name), factory);
29762979
cty->addChild(c, factory);
29772980

lldb/source/Plugins/TypeSystem/Swift/TypeSystemSwiftTypeRef.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -899,7 +899,7 @@ CompilerType TypeSystemSwiftTypeRef::GetBuiltinRawPointerType() {
899899
static bool IsImportedType(swift::Demangle::NodePointer node) {
900900
if (!node)
901901
return false;
902-
if (node->hasText() && node->getText() == "__C")
902+
if (node->hasText() && node->getText() == swift::MANGLING_MODULE_OBJC)
903903
return true;
904904
if (node->hasChildren())
905905
return IsImportedType(node->getFirstChild());
@@ -3920,7 +3920,7 @@ static bool IsSIMDNode(NodePointer node) {
39203920
NodePointer module = node->getFirstChild();
39213921
NodePointer identifier = node->getChild(1);
39223922
return module->getKind() == Node::Kind::Module &&
3923-
module->getText() == "__C" &&
3923+
module->getText() == swift::MANGLING_MODULE_OBJC &&
39243924
identifier->getKind() == Node::Kind::Identifier &&
39253925
identifier->getText().startswith("simd_");
39263926
}

0 commit comments

Comments
 (0)