Skip to content

Commit c15fc5a

Browse files
committed
[LLDB] Modifying expression code in MakeLoadImageUtilityFunction to be more consistent
MakeLoadImageUtilityFunction() is not using extern "C" for external C functions and it is not using eLanguageTypeC_plus_plus. So I am modifying it to be consistent. Also see: rdar://87544782 Differential Revision: https://reviews.llvm.org/D121831 (cherry picked from commit 33d7417)
1 parent 305475e commit c15fc5a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -576,8 +576,8 @@ PlatformPOSIX::MakeLoadImageUtilityFunction(ExecutionContext &exe_ctx,
576576
const char *error_str;
577577
};
578578
579-
extern void *memcpy(void *, const void *, size_t size);
580-
extern size_t strlen(const char *);
579+
extern "C" void *memcpy(void *, const void *, size_t size);
580+
extern "C" size_t strlen(const char *);
581581
582582
583583
void * __lldb_dlopen_wrapper (const char *name,
@@ -624,7 +624,7 @@ PlatformPOSIX::MakeLoadImageUtilityFunction(ExecutionContext &exe_ctx,
624624
DiagnosticManager diagnostics;
625625

626626
auto utility_fn_or_error = process->GetTarget().CreateUtilityFunction(
627-
std::move(expr), dlopen_wrapper_name, eLanguageTypeObjC, exe_ctx);
627+
std::move(expr), dlopen_wrapper_name, eLanguageTypeC_plus_plus, exe_ctx);
628628
if (!utility_fn_or_error) {
629629
std::string error_str = llvm::toString(utility_fn_or_error.takeError());
630630
error.SetErrorStringWithFormat("dlopen error: could not create utility"

0 commit comments

Comments
 (0)