mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
Handle spaces and quotes in file names in MRI scripts.
llvm-svn: 220364
This commit is contained in:
parent
1cc1b9191d
commit
c82df04466
@ -1,5 +1,5 @@
|
|||||||
; RUN: echo create %t.a > %t.mri
|
; 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 save >> %t.mri
|
||||||
; RUN: echo end >> %t.mri
|
; RUN: echo end >> %t.mri
|
||||||
|
|
||||||
|
@ -961,6 +961,9 @@ static void runMRIScript() {
|
|||||||
StringRef Line = *I;
|
StringRef Line = *I;
|
||||||
StringRef CommandStr, Rest;
|
StringRef CommandStr, Rest;
|
||||||
std::tie(CommandStr, Rest) = Line.split(' ');
|
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())
|
auto Command = StringSwitch<MRICommand>(CommandStr.lower())
|
||||||
.Case("addlib", MRICommand::AddLib)
|
.Case("addlib", MRICommand::AddLib)
|
||||||
.Case("addmod", MRICommand::AddMod)
|
.Case("addmod", MRICommand::AddMod)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user