Skip to content

Commit 53a43aa

Browse files
committed
fixup! create literal AsmLabels
1 parent 818cf22 commit 53a43aa

File tree

4 files changed

+2
-17
lines changed

4 files changed

+2
-17
lines changed

lldb/include/lldb/Expression/Expression.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,6 @@ struct FunctionCallLabel {
118118
/// from JITted expressions.
119119
inline constexpr llvm::StringRef FunctionCallLabelPrefix = "$__lldb_func";
120120

121-
bool consumeFunctionCallLabelPrefix(llvm::StringRef &name);
122-
bool hasFunctionCallLabelPrefix(llvm::StringRef name);
123-
124121
} // namespace lldb_private
125122

126123
#endif // LLDB_EXPRESSION_EXPRESSION_H

lldb/source/Expression/Expression.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,3 @@ Expression::Expression(ExecutionContextScope &exe_scope)
3030
m_jit_end_addr(LLDB_INVALID_ADDRESS) {
3131
assert(m_target_wp.lock());
3232
}
33-
34-
bool lldb_private::consumeFunctionCallLabelPrefix(llvm::StringRef &name) {
35-
// On Darwin mangled names get a '_' prefix.
36-
name.consume_front("_");
37-
return name.consume_front(FunctionCallLabelPrefix);
38-
}
39-
40-
bool lldb_private::hasFunctionCallLabelPrefix(llvm::StringRef name) {
41-
// On Darwin mangled names get a '_' prefix.
42-
name.consume_front("_");
43-
return name.starts_with(FunctionCallLabelPrefix);
44-
}

lldb/source/Expression/IRExecutionUnit.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -966,7 +966,7 @@ lldb::addr_t IRExecutionUnit::FindInUserDefinedSymbols(
966966

967967
lldb::addr_t IRExecutionUnit::FindSymbol(lldb_private::ConstString name,
968968
bool &missing_weak) {
969-
if (hasFunctionCallLabelPrefix(name.GetStringRef())) {
969+
if (name.GetStringRef().starts_with(FunctionCallLabelPrefix)) {
970970
if (auto addr_or_err = ResolveFunctionCallLabel(name.GetStringRef(),
971971
m_sym_ctx, missing_weak)) {
972972
return *addr_or_err;

lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9790,7 +9790,7 @@ void TypeSystemClang::LogCreation() const {
97909790
// $__lldb_func:<mangled name>:<module id>:<definition/declaration DIE id>
97919791
llvm::Expected<llvm::SmallVector<llvm::StringRef, 3>>
97929792
TypeSystemClang::splitFunctionCallLabel(llvm::StringRef label) const {
9793-
if (!consumeFunctionCallLabelPrefix(label))
9793+
if (!label.consume_front(FunctionCallLabelPrefix))
97949794
return llvm::createStringError(
97959795
"expected function call label prefix not found in %s", label.data());
97969796
if (!label.consume_front(":"))

0 commit comments

Comments
 (0)