forked from OSchip/llvm-project
Handle spaces and quotes in file names in MRI scripts.
llvm-svn: 220364
This commit is contained in:
parent
277ace025d
commit
68bae2c7f6
|
@ -1,5 +1,5 @@
|
|||
; RUN: echo create %t.a > %t.mri
|
||||
; RUN: echo addmod %p/Inputs/trivial-object-test.elf-x86-64 >> %t.mri
|
||||
; RUN: echo "addmod \"%p/Inputs/trivial-object-test.elf-x86-64\" " >> %t.mri
|
||||
; RUN: echo save >> %t.mri
|
||||
; RUN: echo end >> %t.mri
|
||||
|
||||
|
|
|
@ -961,6 +961,9 @@ static void runMRIScript() {
|
|||
StringRef Line = *I;
|
||||
StringRef CommandStr, Rest;
|
||||
std::tie(CommandStr, Rest) = Line.split(' ');
|
||||
Rest = Rest.trim();
|
||||
if (!Rest.empty() && Rest.front() == '"' && Rest.back() == '"')
|
||||
Rest = Rest.drop_front().drop_back();
|
||||
auto Command = StringSwitch<MRICommand>(CommandStr.lower())
|
||||
.Case("addlib", MRICommand::AddLib)
|
||||
.Case("addmod", MRICommand::AddMod)
|
||||
|
|
Loading…
Reference in New Issue