From f827b4b657d5922beef3799337e91ba98fce852e Mon Sep 17 00:00:00 2001 From: Muhammad Omair Javaid Date: Wed, 13 Jul 2022 16:44:19 +0500 Subject: [PATCH] [LLDB] Fix TestConvenienceVariables.test AArch64/Windows This patch fixes TestConvenienceVariables.test for AArch64 Windows. Clang/LLD was unable to find printf apparently available as a macro definition in stdio.h. --- lldb/test/Shell/Driver/Inputs/hello.cpp | 7 +------ lldb/test/Shell/Driver/TestConvenienceVariables.test | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/lldb/test/Shell/Driver/Inputs/hello.cpp b/lldb/test/Shell/Driver/Inputs/hello.cpp index 1ec0677..7a46e19 100644 --- a/lldb/test/Shell/Driver/Inputs/hello.cpp +++ b/lldb/test/Shell/Driver/Inputs/hello.cpp @@ -1,11 +1,6 @@ -// The build.py script always runs the compiler in C++ mode, regardless of the -// file extension. This results in mangled names presented to the linker which -// in turn cannot find the printf symbol. -extern "C" { -int printf(const char *format, ...); +#include int main(int argc, char **argv) { printf("Hello World\n"); return 0; } -} diff --git a/lldb/test/Shell/Driver/TestConvenienceVariables.test b/lldb/test/Shell/Driver/TestConvenienceVariables.test index 63ba15e..45dc767 100644 --- a/lldb/test/Shell/Driver/TestConvenienceVariables.test +++ b/lldb/test/Shell/Driver/TestConvenienceVariables.test @@ -19,7 +19,7 @@ CHECK-NEXT: SBProcess: pid = {{[0-9]+}}, state = stopped, threads = {{[0-9]+}}, CHECK: script print(lldb.thread.GetStopDescription(100)) CHECK-NEXT: breakpoint 1.1 CHECK: script lldb.frame.GetLineEntry().GetLine() -CHECK-NEXT: 8 +CHECK-NEXT: 4 CHECK: script lldb.frame.GetLineEntry().GetFileSpec().GetFilename() CHECK-NEXT: hello.c CHECK: script lldb.frame.GetFunctionName() -- 2.7.4