File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
test/tools/llvm-debuginfod-find Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -195,15 +195,15 @@ static SmallVector<std::string, 0> getHeaders() {
195
195
uint64_t LineNumber = 0 ;
196
196
for (StringRef Line : llvm::split ((*HeadersFile)->getBuffer (), ' \n ' )) {
197
197
LineNumber++;
198
+ if (!Line.empty () && Line.back () == ' \r ' )
199
+ Line = Line.drop_back ();
198
200
if (!isHeader (Line)) {
199
201
if (!all_of (Line, llvm::isSpace))
200
202
WithColor::warning ()
201
203
<< " could not parse debuginfod header: " << Filename << ' :'
202
204
<< LineNumber << ' \n ' ;
203
205
continue ;
204
206
}
205
- if (Line.back () == ' \r ' )
206
- Line = Line.drop_back ();
207
207
Headers.emplace_back (Line);
208
208
}
209
209
return Headers;
Original file line number Diff line number Diff line change @@ -2,13 +2,13 @@ REQUIRES: curl
2
2
3
3
RUN: %python %S/Inputs/capture_req.py llvm-debuginfod-find --debuginfo 0 \
4
4
RUN: | FileCheck --check-prefix NO-HEADERS %s
5
- RUN: DEBUGINFOD_HEADERS_FILE=bad %python %S/Inputs/capture_req.py \
5
+ RUN: env DEBUGINFOD_HEADERS_FILE=bad %python %S/Inputs/capture_req.py \
6
6
RUN: llvm-debuginfod-find --debuginfo 0 \
7
7
RUN: | FileCheck --check-prefix NO-HEADERS %s
8
- RUN: DEBUGINFOD_HEADERS_FILE=%S/Inputs/headers %python %S/Inputs/capture_req.py \
8
+ RUN: env DEBUGINFOD_HEADERS_FILE=%S/Inputs/headers %python %S/Inputs/capture_req.py \
9
9
RUN: llvm-debuginfod-find --debuginfo 0 \
10
10
RUN: | FileCheck --check-prefix HEADERS %s
11
- RUN: DEBUGINFOD_HEADERS_FILE=%S/Inputs/headers DEBUGINFOD_URLS=fake not llvm-debuginfod-find --debuginfo 0 2>&1 \
11
+ RUN: env DEBUGINFOD_HEADERS_FILE=%S/Inputs/headers DEBUGINFOD_URLS=fake not llvm-debuginfod-find --debuginfo 0 2>&1 \
12
12
RUN: | FileCheck --check-prefix ERR -DHEADER_FILE=%S/Inputs/headers %s
13
13
14
14
NO-HEADERS: Accept: */*
You can’t perform that action at this time.
0 commit comments