summaryrefslogtreecommitdiffstats
path: root/llvm/utils/not/not.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [not] Improve error reporting consistency.Jonas Devlieghere2018-11-091-3/+5
| | | | | | | Makes `not` use WithColor from Support so it prints 'error' in color when applicable. llvm-svn: 346460
* Refactor ExecuteAndWait to take StringRefs.Zachary Turner2018-06-121-1/+5
| | | | | | | | | | | | | | | | | | | 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
* Convenience/safety fix for llvm::sys::Execute(And|No)WaitAlexander Kornienko2017-09-131-2/+1
| | | | | | | | | | | | | | | | | | | | 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
* Remove unused header, NFC.Vedant Kumar2016-12-011-1/+0
| | | | llvm-svn: 288407
* Add a small "usage:" comment at the top of not.cppSean Silva2014-11-261-0/+5
| | | | | | Mostly pulled from Rafael's r185678 commit message. llvm-svn: 222855
* Use findProgramByName.Michael J. Spencer2014-11-041-2/+7
| | | | llvm-svn: 221221
* not: Only consider exit code 3 to be a crash with --crashReid Kleckner2014-06-231-4/+5
| | | | | | | This fixes Clang's test/Index/comment-xml-schema.c with Cygwin's xmllint.exe, which uses exit(3) for XML validation failure. llvm-svn: 211550
* [Win32] Let utils/not aware of abort(), aka llvm_unreachable(), in msvcrt.NAKAMURA Takumi2014-06-131-0/+7
| | | | | | | It has exit code as 3. abort(), aka unreachable, may be handled as crash. FIXME: Could we move this into Win32/Program.inc? llvm-svn: 210895
* [C++11] Use 'nullptr'.Craig Topper2014-06-081-1/+2
| | | | llvm-svn: 210442
* Add a --crash option to not.Rafael Espindola2013-07-051-2/+21
| | | | | | | | | | | | | Now the two possible uses of not are * not cmd Will return true if cmd doesn't crash and returns false. * not --crash cmd Will return true if cmd crashes. It will be used/tested in a followup commit for the clang crash recovery testing. llvm-svn: 185678
* Avoid using PathV1.h in Program.h.Rafael Espindola2013-06-131-2/+1
| | | | llvm-svn: 183940
* Have sys::FindProgramByName return a std::string.Rafael Espindola2013-06-131-2/+3
| | | | llvm-svn: 183928
* Remove the program class.Rafael Espindola2013-06-121-3/+2
| | | | | | | It was only used to implement ExecuteAndWait and ExecuteNoWait. Expose just those two functions and make Execute and Wait implementations details. llvm-svn: 183864
* Merge System into Support.Michael J. Spencer2010-11-291-2/+2
| | | | llvm-svn: 120298
* not is testing for a normal exit with a non-zero value. It shouldn'tDan Gohman2010-10-291-1/+11
| | | | | | return success if the child process is killed with a signal. llvm-svn: 117701
* Add count/not tools as executables.Daniel Dunbar2009-09-241-0/+17
- Apparently, I'm willing to do incredibly stupid things in the name of portability. llvm-svn: 82685
OpenPOWER on IntegriCloud