History log of /llvm-project/llvm/unittests/Support/ProgramTest.cpp (Results 26 – 50 of 56)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-7.0.1, llvmorg-7.0.1-rc3, llvmorg-7.0.1-rc2, llvmorg-7.0.1-rc1, llvmorg-7.0.0, llvmorg-7.0.0-rc3, llvmorg-7.0.0-rc2, llvmorg-7.0.0-rc1, llvmorg-6.0.1, llvmorg-6.0.1-rc3
# 08426e1f 12-Jun-2018 Zachary Turner <zturner@google.com>

Refactor ExecuteAndWait to take StringRefs.

This simplifies some code which had StringRefs to begin with, and
makes other code more complicated which had const char* to begin
with.

In the end, I th

Refactor ExecuteAndWait to take StringRefs.

This simplifies some code which had StringRefs to begin with, and
makes other code more complicated which had const char* to begin
with.

In the end, I think this makes for a more idiomatic and platform
agnostic API. Not all platforms launch process with null terminated
c-string arrays for the environment pointer and argv, but the api
was designed that way because it allowed easy pass-through for
posix-based platforms. There's a little additional overhead now
since on posix based platforms we'll be takign StringRefs which
were constructed from null terminated strings and then copying
them to null terminate them again, but from a readability and
usability standpoint of the API user, I think this API signature
is strictly better.

llvm-svn: 334518

show more ...


Revision tags: llvmorg-6.0.1-rc2
# 432a3883 30-Apr-2018 Nico Weber <nicolasweber@gmx.de>

IWYU for llvm-config.h in llvm, additions.

See r331124 for how I made a list of files missing the include.
I then ran this Python script:

for f in open('filelist.txt'):
f = f.strip()

IWYU for llvm-config.h in llvm, additions.

See r331124 for how I made a list of files missing the include.
I then ran this Python script:

for f in open('filelist.txt'):
f = f.strip()
fl = open(f).readlines()

found = False
for i in xrange(len(fl)):
p = '#include "llvm/'
if not fl[i].startswith(p):
continue
if fl[i][len(p):] > 'Config':
fl.insert(i, '#include "llvm/Config/llvm-config.h"\n')
found = True
break
if not found:
print 'not found', f
else:
open(f, 'w').write(''.join(fl))

and then looked through everything with `svn diff | diffstat -l | xargs -n 1000 gvim -p`
and tried to fix include ordering and whatnot.

No intended behavior change.

llvm-svn: 331184

show more ...


# 712e8d29 29-Apr-2018 Nico Weber <nicolasweber@gmx.de>

s/LLVM_ON_WIN32/_WIN32/, llvm

LLVM_ON_WIN32 is set exactly with MSVC and MinGW (but not Cygwin) in
HandleLLVMOptions.cmake, which is where _WIN32 defined too. Just use the
default macro instead of

s/LLVM_ON_WIN32/_WIN32/, llvm

LLVM_ON_WIN32 is set exactly with MSVC and MinGW (but not Cygwin) in
HandleLLVMOptions.cmake, which is where _WIN32 defined too. Just use the
default macro instead of a reinvented one.

See thread "Replacing LLVM_ON_WIN32 with just _WIN32" on llvm-dev and cfe-dev.
No intended behavior change.

This moves over all uses of the macro, but doesn't remove the definition
of it in (llvm-)config.h yet.

llvm-svn: 331127

show more ...


Revision tags: llvmorg-6.0.1-rc1, llvmorg-5.0.2, llvmorg-5.0.2-rc2, llvmorg-5.0.2-rc1, llvmorg-6.0.0, llvmorg-6.0.0-rc3, llvmorg-6.0.0-rc2, llvmorg-6.0.0-rc1, llvmorg-5.0.1, llvmorg-5.0.1-rc3, llvmorg-5.0.1-rc2, llvmorg-5.0.1-rc1
# 208eecd5 13-Sep-2017 Alexander Kornienko <alexfh@google.com>

Convenience/safety fix for llvm::sys::Execute(And|No)Wait

Summary:
Change the type of the Redirects parameter of llvm::sys::ExecuteAndWait,
ExecuteNoWait and other APIs that wrap them from `const St

Convenience/safety fix for llvm::sys::Execute(And|No)Wait

Summary:
Change the type of the Redirects parameter of llvm::sys::ExecuteAndWait,
ExecuteNoWait and other APIs that wrap them from `const StringRef **` to
`ArrayRef<Optional<StringRef>>`, which is safer and simplifies the use of these
APIs (no more local StringRef variables just to get a pointer to).

Corresponding clang changes will be posted as a separate patch.

Reviewers: bkramer

Reviewed By: bkramer

Subscribers: vsk, llvm-commits

Differential Revision: https://reviews.llvm.org/D37563

llvm-svn: 313155

show more ...


Revision tags: llvmorg-5.0.0, llvmorg-5.0.0-rc5, llvmorg-5.0.0-rc4, llvmorg-5.0.0-rc3, llvmorg-5.0.0-rc2, llvmorg-5.0.0-rc1, llvmorg-4.0.1, llvmorg-4.0.1-rc3
# 9a67b073 06-Jun-2017 Chandler Carruth <chandlerc@gmail.com>

Re-sort #include lines for unittests. This uses a slightly modified
clang-format (https://reviews.llvm.org/D33932) to keep primary headers
at the top and handle new utility headers like 'gmock' consi

Re-sort #include lines for unittests. This uses a slightly modified
clang-format (https://reviews.llvm.org/D33932) to keep primary headers
at the top and handle new utility headers like 'gmock' consistently with
other utility headers.

No other change was made. I did no manual edits, all of this is
clang-format.

This should allow other changes to have more clear and focused diffs,
and is especially motivated by moving some headers into more focused
libraries.

llvm-svn: 304786

show more ...


Revision tags: llvmorg-4.0.1-rc2, llvmorg-4.0.1-rc1, llvmorg-4.0.0, llvmorg-4.0.0-rc4, llvmorg-4.0.0-rc3, llvmorg-4.0.0-rc2, llvmorg-4.0.0-rc1
# 17d266bc 13-Jan-2017 Malcolm Parsons <malcolm.parsons@gmail.com>

Remove unused lambda captures. NFC

llvm-svn: 291916


Revision tags: llvmorg-3.9.1, llvmorg-3.9.1-rc3, llvmorg-3.9.1-rc2, llvmorg-3.9.1-rc1, llvmorg-3.9.0, llvmorg-3.9.0-rc3, llvmorg-3.9.0-rc2, llvmorg-3.9.0-rc1
# 07670b3e 29-Jun-2016 Zachary Turner <zturner@google.com>

Resubmit "Update llvm command line parser to support subcommands."

This fixes an issue where occurrence counts would be unexpectedly
reset when parsing different parts of a command line multiple
tim

Resubmit "Update llvm command line parser to support subcommands."

This fixes an issue where occurrence counts would be unexpectedly
reset when parsing different parts of a command line multiple
times.

**ORIGINAL COMMIT MESSAGE**

This allows command line tools to use syntaxes like the following:

llvm-foo.exe command1 -o1 -o2
llvm-foo.exe command2 -p1 -p2

Where command1 and command2 contain completely different sets of
valid options. This is backwards compatible with previous uses
of llvm cl which did not support subcommands, as any option
which specifies no optional subcommand (e.g. all existing
code) goes into a special "top level" subcommand that expects
dashed options to appear immediately after the program name.
For example, code which is subcommand unaware would generate
a command line such as the following, where no subcommand
is specified:

llvm-foo.exe -q1 -q2

The top level subcommand can co-exist with actual subcommands,
as it is implemented as an actual subcommand which is searched
if no explicit subcommand is specified. So llvm-foo.exe as
specified above could be written so as to support all three
aforementioned command lines simultaneously.

There is one additional "special" subcommand called AllSubCommands,
which can be used to inject an option into every subcommand.
This is useful to support things like help, so that commands
such as:

llvm-foo.exe --help
llvm-foo.exe command1 --help
llvm-foo.exe command2 --help

All work and display the help for the selected subcommand
without having to explicitly go and write code to handle each
one separately.

This patch is submitted without an example of anything actually
using subcommands, but a followup patch will convert the
llvm-pdbdump tool to use subcommands.

Reviewed By: beanz

llvm-svn: 274171

show more ...


# d16490df 28-Jun-2016 Manman Ren <manman.ren@gmail.com>

Revert r274054 to try to appease the bot

llvm-svn: 274072


# 2012d744 28-Jun-2016 Zachary Turner <zturner@google.com>

Update llvm command line parser to support subcommands.

This allows command line tools to use syntaxes like the following:

llvm-foo.exe command1 -o1 -o2
llvm-foo.exe command2 -p1 -p2

Where com

Update llvm command line parser to support subcommands.

This allows command line tools to use syntaxes like the following:

llvm-foo.exe command1 -o1 -o2
llvm-foo.exe command2 -p1 -p2

Where command1 and command2 contain completely different sets of
valid options. This is backwards compatible with previous uses
of llvm cl which did not support subcommands, as any option
which specifies no optional subcommand (e.g. all existing
code) goes into a special "top level" subcommand that expects
dashed options to appear immediately after the program name.
For example, code which is subcommand unaware would generate
a command line such as the following, where no subcommand
is specified:

llvm-foo.exe -q1 -q2

The top level subcommand can co-exist with actual subcommands,
as it is implemented as an actual subcommand which is searched
if no explicit subcommand is specified. So llvm-foo.exe as
specified above could be written so as to support all three
aforementioned command lines simultaneously.

There is one additional "special" subcommand called AllSubCommands,
which can be used to inject an option into every subcommand.
This is useful to support things like help, so that commands
such as:

llvm-foo.exe --help
llvm-foo.exe command1 --help
llvm-foo.exe command2 --help

All work and display the help for the selected subcommand
without having to explicitly go and write code to handle each
one separately.

This patch is submitted without an example of anything actually
using subcommands, but a followup patch will convert the
llvm-pdbdump tool to use subcommands.

Reviewed By: beanz
Differential Revision: http://reviews.llvm.org/D21485

llvm-svn: 274054

show more ...


Revision tags: llvmorg-3.8.1, llvmorg-3.8.1-rc1
# 91d3cfed 05-Apr-2016 Duncan P. N. Exon Smith <dexonsmith@apple.com>

Revert "Fix Clang-tidy modernize-deprecated-headers warnings in remaining files; other minor fixes."

This reverts commit r265454 since it broke the build. E.g.:

http://lab.llvm.org:8080/green/jo

Revert "Fix Clang-tidy modernize-deprecated-headers warnings in remaining files; other minor fixes."

This reverts commit r265454 since it broke the build. E.g.:

http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_build/22413/

llvm-svn: 265459

show more ...


# 1760dc2a 05-Apr-2016 Eugene Zelenko <eugene.zelenko@gmail.com>

Fix Clang-tidy modernize-deprecated-headers warnings in remaining files; other minor fixes.

Some Include What You Use suggestions were used too.

Use anonymous namespaces in source files.

Different

Fix Clang-tidy modernize-deprecated-headers warnings in remaining files; other minor fixes.

Some Include What You Use suggestions were used too.

Use anonymous namespaces in source files.

Differential revision: http://reviews.llvm.org/D18778

llvm-svn: 265454

show more ...


Revision tags: llvmorg-3.8.0, llvmorg-3.8.0-rc3
# c2e23116 03-Feb-2016 Reid Kleckner <rnk@google.com>

Silence -Wsign-conversion issue in ProgramTest.cpp

Unfortunately, ProgramInfo::ProcessId is signed on Unix and unsigned on
Windows, breaking the standard fix of using '0U' in the gtest
expectation.

Silence -Wsign-conversion issue in ProgramTest.cpp

Unfortunately, ProgramInfo::ProcessId is signed on Unix and unsigned on
Windows, breaking the standard fix of using '0U' in the gtest
expectation.

llvm-svn: 259704

show more ...


Revision tags: llvmorg-3.8.0-rc2, llvmorg-3.8.0-rc1, llvmorg-3.7.1, llvmorg-3.7.1-rc2, llvmorg-3.7.1-rc1
# 85ca2949 04-Nov-2015 Pawel Bylica <chfast@gmail.com>

Fix unit tests on Windows: handle env vars with non-ASCII chars.

Summary: On Windows we have to take UTF16 encoded env vars and convert them to UTF8. This patch fixes CopyEnvironment helper function

Fix unit tests on Windows: handle env vars with non-ASCII chars.

Summary: On Windows we have to take UTF16 encoded env vars and convert them to UTF8. This patch fixes CopyEnvironment helper function used by process unit tests.

Reviewers: yaron.keren

Subscribers: yaron.keren, llvm-commits

Differential Revision: http://reviews.llvm.org/D14278

llvm-svn: 252039

show more ...


Revision tags: llvmorg-3.7.0, llvmorg-3.7.0-rc4, llvmorg-3.7.0-rc3, studio-1.4, llvmorg-3.7.0-rc2, llvmorg-3.7.0-rc1, llvmorg-3.6.2, llvmorg-3.6.2-rc1, llvmorg-3.6.1, llvmorg-3.6.1-rc1, llvmorg-3.5.2, llvmorg-3.5.2-rc1, llvmorg-3.6.0, llvmorg-3.6.0-rc4, llvmorg-3.6.0-rc3, llvmorg-3.6.0-rc2, llvmorg-3.6.0-rc1, llvmorg-3.5.1, llvmorg-3.5.1-rc2, llvmorg-3.5.1-rc1
# c38deee8 24-Nov-2014 Paul Robinson <paul_robinson@playstation.sony.com>

More long path name support on Windows, this time in program execution.
Allows long paths for the executable and redirected stdin/stdout/stderr.
Addresses PR21563.

llvm-svn: 222671


# 9c359669 03-Sep-2014 Rafael Espindola <rafael.espindola@gmail.com>

Add writeFileWithSystemEncoding to LibLLVMSuppor.

This patch adds to LLVMSupport the capability of writing files with
international characters encoded in the current system encoding. This
is relevan

Add writeFileWithSystemEncoding to LibLLVMSuppor.

This patch adds to LLVMSupport the capability of writing files with
international characters encoded in the current system encoding. This
is relevant for Windows, where we can either use UTF16 or the current
code page (the legacy Windows international characters). On UNIX, the
file is always saved in UTF8.

This will be used in a patch for clang to thoroughly support response
files creation when calling other tools, addressing PR15171. On
Windows, to correctly support internationalization, we need the
ability to write response files both in UTF16 or the current code
page, depending on the tool we will call. GCC for mingw, for instance,
requires files to be encoded in the current code page. MSVC tools
requires files to be encoded in UTF16.

Patch by Rafael Auler!

llvm-svn: 217068

show more ...


Revision tags: llvmorg-3.5.0, llvmorg-3.5.0-rc4, llvmorg-3.5.0-rc3, llvmorg-3.5.0-rc2, llvmorg-3.5.0-rc1
# 66f09ad0 08-Jun-2014 Craig Topper <craig.topper@gmail.com>

[C++11] Use 'nullptr'.

llvm-svn: 210442


# ec1aacaf 31-May-2014 Peter Collingbourne <peter@pcc.me.uk>

Fix the behavior of ExecuteAndWait with a non-zero timeout.

llvm-svn: 209951


Revision tags: llvmorg-3.4.2, llvmorg-3.4.2-rc1, llvmorg-3.4.1, llvmorg-3.4.1-rc2, llvmorg-3.4.1-rc1
# 8a8cd2ba 07-Jan-2014 Chandler Carruth <chandlerc@gmail.com>

Re-sort all of the includes with ./utils/sort_includes.py so that
subsequent changes are easier to review. About to fix some layering
issues, and wanted to separate out the necessary churn.

Also com

Re-sort all of the includes with ./utils/sort_includes.py so that
subsequent changes are easier to review. About to fix some layering
issues, and wanted to separate out the necessary churn.

Also comment and sink the include of "Windows.h" in three .inc files to
match the usage in Memory.inc.

llvm-svn: 198685

show more ...


Revision tags: llvmorg-3.4.0, llvmorg-3.4.0-rc3, llvmorg-3.4.0-rc2, llvmorg-3.4.0-rc1
# d88b9832 01-Oct-2013 Tareq A. Siraj <tareq.a.siraj@intel.com>

Add non-blocking Wait() for launched processes

- New ProcessInfo class to encapsulate information about child processes.
- Generalized the Wait() to support non-blocking wait on child processes.
- E

Add non-blocking Wait() for launched processes

- New ProcessInfo class to encapsulate information about child processes.
- Generalized the Wait() to support non-blocking wait on child processes.
- ExecuteNoWait() now returns a ProcessInfo object with information about
the launched child. Users will be able to use this object to
perform non-blocking wait.
- ExecuteNoWait() now accepts an ExecutionFailed param that tells if execution
failed or not.

These changes will allow users to implement basic process parallel
tools.

Differential Revision: http://llvm-reviews.chandlerc.com/D1728

llvm-svn: 191763

show more ...


# bf40e959 20-Sep-2013 Tareq A. Siraj <tareq.a.siraj@intel.com>

Fixed typo in CreateProcessTrailingSlash test

--gtest_filter was filtering an invalid name for the test.

Differential Revision: http://llvm-reviews.chandlerc.com/D1733

llvm-svn: 191100


Revision tags: llvmorg-3.3.1-rc1
# 479a9bd0 26-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com>

Remove unused includes.

llvm itself is now PathV1 clean.

llvm-svn: 184947


# e03dfd9b 26-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com>

Port GetMainExecutable over to PathV2.

I will remove the V1 version as soon as I change clang in the next commit.

llvm-svn: 184914


# 7c1023ad 13-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com>

Avoid using PathV1.h in Program.h.

llvm-svn: 183940


# cb2eca0f 12-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com>

Remove the program class.

It was only used to implement ExecuteAndWait and ExecuteNoWait. Expose just
those two functions and make Execute and Wait implementations details.

llvm-svn: 183864


Revision tags: llvmorg-3.3.0, llvmorg-3.3.0-rc3, llvmorg-3.3.0-rc2, llvmorg-3.3.0-rc1
# 95012aaa 30-Apr-2013 Reid Kleckner <reid@kleckner.net>

Try to fix ProgramTest on FreeBSD

This seemed like the cleanest way to find the test executable. Also fix
the file mode.

llvm-svn: 180770


123