mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-18 16:03:17 +00:00
Handle spaces and quotes in file names in MRI scripts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220364 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f9ebe0ad75
commit
230b53fd1b
@ -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…
x
Reference in New Issue
Block a user