mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-16 07:49:43 +00:00
[lit] Make TestConvenienceVariables a cpp file
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. While we figure out how to solve this issue I've turned the source file into a cpp file and added extern c. This should unbreak the bots. llvm-svn: 349642
This commit is contained in:
parent
798c5982a0
commit
b5c1d07920
@ -1,4 +1,4 @@
|
||||
breakpoint set -f hello.c -p Hello
|
||||
breakpoint set -f hello.cpp -p Hello
|
||||
run
|
||||
script print(lldb.debugger)
|
||||
script print(lldb.target)
|
||||
|
@ -1,6 +0,0 @@
|
||||
int printf(const char *format, ...);
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
printf("Hello World\n");
|
||||
return 0;
|
||||
}
|
11
lldb/lit/Driver/Inputs/hello.cpp
Normal file
11
lldb/lit/Driver/Inputs/hello.cpp
Normal file
@ -0,0 +1,11 @@
|
||||
// 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, ...);
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
printf("Hello World\n");
|
||||
return 0;
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
RUN: %build %p/Inputs/hello.c -o %t
|
||||
RUN: %build %p/Inputs/hello.cpp -o %t
|
||||
RUN: %lldb %t -s %p/Inputs/convenience.in -o quit | FileCheck %s
|
||||
|
||||
script print(lldb.debugger)
|
||||
@ -15,7 +15,7 @@ CHECK-SAME: executable = TestConvenienceVariables.test
|
||||
CHECK: script print(lldb.thread.GetStopDescription(100))
|
||||
CHECK: breakpoint 1.1
|
||||
CHECK: script lldb.frame.GetLineEntry().GetLine()
|
||||
CHECK: 4
|
||||
CHECK: 8
|
||||
CHECK: script lldb.frame.GetLineEntry().GetFileSpec().GetFilename()
|
||||
CHECK: hello.c
|
||||
CHECK: script lldb.frame.GetFunctionName()
|
||||
|
Loading…
x
Reference in New Issue
Block a user