Skip to content

Commit dd78cb2

Browse files
hsutterzaucy
authored andcommitted
Revert "Enable debugging with LLDB (Xcode, Qt Creator, etc) (hsutter#744)"
This reverts commit 12793b0.
1 parent 777f5b1 commit dd78cb2

File tree

1 file changed

+2
-33
lines changed

1 file changed

+2
-33
lines changed

source/cppfront.cpp

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#include <iostream>
2020
#include <cstdio>
2121
#include <optional>
22-
#include <filesystem>
2322

2423
namespace cpp2 {
2524

@@ -69,14 +68,6 @@ static cmdline_processor::register_flag cmd_noline(
6968
[]{ flag_clean_cpp1 = true; }
7069
);
7170

72-
static auto flag_absolute_line_directives = false;
73-
static cmdline_processor::register_flag cmd_absolute_line_directives(
74-
9,
75-
"absolute-line-directives",
76-
"Emit absolute paths in #line directives",
77-
[] { flag_absolute_line_directives = true; }
78-
);
79-
8071
static auto flag_import_std = false;
8172
static cmdline_processor::register_flag cmd_import_std(
8273
0,
@@ -231,11 +222,6 @@ class positional_printer
231222
bool printed_extra = false;
232223
char last_printed_char = {};
233224

234-
struct line_directive_info {
235-
lineno_t out_pos_line; // output lineno where the line directive was printed
236-
lineno_t line; // the lineno in the line directive
237-
} prev_line_directive = {};
238-
239225
struct req_act_info {
240226
colno_t requested;
241227
colno_t offset;
@@ -415,15 +401,6 @@ class positional_printer
415401
return;
416402
}
417403

418-
// Don't print duplicate line directives on subsequent lines
419-
if (
420-
prev_line_directive.out_pos_line == curr_pos.lineno
421-
&& prev_line_directive.line == line
422-
)
423-
{
424-
return;
425-
}
426-
427404
// Otherwise, implement the request
428405
prev_line_info = { curr_pos.lineno, { } };
429406
ensure_at_start_of_new_line();
@@ -434,7 +411,6 @@ class positional_printer
434411
*out << "#line " << line << " " << std::quoted(cpp2_filename) << "\n";
435412
}
436413
just_printed_line_directive = true;
437-
prev_line_directive = { curr_pos.lineno, line };
438414
}
439415

440416
// Catch up with comment/blank lines
@@ -644,9 +620,7 @@ class positional_printer
644620
)
645621
-> void
646622
{
647-
cpp2_filename = (flag_absolute_line_directives) ?
648-
std::filesystem::absolute(std::filesystem::path(cpp2_filename_)).string() :
649-
cpp2_filename_;
623+
cpp2_filename = cpp2_filename_;
650624
assert(
651625
!is_open()
652626
&& !pcomments
@@ -5627,12 +5601,6 @@ class cppfront
56275601
)
56285602
)
56295603
{
5630-
// Print a line directive before every function definition
5631-
// (needed to enable debugging with lldb).
5632-
if (n.initializer) {
5633-
printer.print_extra("");
5634-
}
5635-
56365604
auto is_streaming_operator = [](std::string_view sv) {
56375605
return
56385606
sv == "operator<<"
@@ -5964,6 +5932,7 @@ class cppfront
59645932
// Else emit the definition
59655933
else if (n.initializer)
59665934
{
5935+
59675936
if (func->returns.index() == function_type_node::list) {
59685937
auto& r = std::get<function_type_node::list>(func->returns);
59695938
function_returns.emplace_back(r.get());

0 commit comments

Comments
 (0)