diff options
Diffstat (limited to 'llvm/lib/Support/Program.cpp')
-rw-r--r-- | llvm/lib/Support/Program.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/Support/Program.cpp b/llvm/lib/Support/Program.cpp index 8484b46e522..8c56fb6db2d 100644 --- a/llvm/lib/Support/Program.cpp +++ b/llvm/lib/Support/Program.cpp @@ -63,6 +63,15 @@ ProcessInfo sys::ExecuteNoWait(StringRef Program, const char **Args, return PI; } +bool sys::commandLineFitsWithinSystemLimits(StringRef Program, + ArrayRef<const char *> Args) { + SmallVector<StringRef, 8> StringRefArgs; + StringRefArgs.reserve(Args.size()); + for (const char *A : Args) + StringRefArgs.emplace_back(A); + return commandLineFitsWithinSystemLimits(Program, StringRefArgs); +} + // Include the platform-specific parts of this class. #ifdef LLVM_ON_UNIX #include "Unix/Program.inc" |