Skip to content

Commit 33d7417

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
1 parent fe74183 commit 33d7417

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
@@ -560,8 +560,8 @@ PlatformPOSIX::MakeLoadImageUtilityFunction(ExecutionContext &exe_ctx,
560560
const char *error_str;
561561
};
562562
563-
extern void *memcpy(void *, const void *, size_t size);
564-
extern size_t strlen(const char *);
563+
extern "C" void *memcpy(void *, const void *, size_t size);
564+
extern "C" size_t strlen(const char *);
565565
566566
567567
void * __lldb_dlopen_wrapper (const char *name,
@@ -608,7 +608,7 @@ PlatformPOSIX::MakeLoadImageUtilityFunction(ExecutionContext &exe_ctx,
608608
DiagnosticManager diagnostics;
609609

610610
auto utility_fn_or_error = process->GetTarget().CreateUtilityFunction(
611-
std::move(expr), dlopen_wrapper_name, eLanguageTypeObjC, exe_ctx);
611+
std::move(expr), dlopen_wrapper_name, eLanguageTypeC_plus_plus, exe_ctx);
612612
if (!utility_fn_or_error) {
613613
std::string error_str = llvm::toString(utility_fn_or_error.takeError());
614614
error.SetErrorStringWithFormat("dlopen error: could not create utility"

0 commit comments

Comments
 (0)