aboutsummaryrefslogtreecommitdiff
path: root/lib/Support
AgeCommit message (Collapse)Author
2012-05-27Path::GetTemporaryDirectory(): Add an assertion if TempDirectory is alive, ↵NAKAMURA Takumi
to check when someone would remove the tempdir. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157529 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-24Remove the PTX back-end and all of its artifacts (triple, etc.)Justin Holewinski
This back-end was deprecated in favor of the NVPTX back-end. NV_CONTRIB git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157417 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-24Fix -Wcovered-switch-default warning.Patrik Hägglund
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157381 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-18fix corner case in ConstantRange::intersectWith().Nuno Lopes
this fixes the missed optimization I was seeing in the CorrelatedValuePropagation pass git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157032 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-14[Support/YAMLParser] Use rtrim on plain scalars.Michael J. Spencer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156787 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-11[Support/StringRef] Add find_last_not_of and {r,l,}trim.Michael J. Spencer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156652 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-11Allow unique_file to take a mode for file permissions, but defaultEric Christopher
to user only read/write. Part of rdar://11325849 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156591 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-09Set the default iOS version to 3.0.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156492 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-09Use the cpuid 64 bit flag to pick the default CPU name for an unknown model.Bob Wilson
For the Family 6 switch in sys::getHostCPUName, an unrecognized model was reported as "i686". That's a really bad default since it means that new CPUs will be treated as if they can only use 32-bit code. This just looks at the cpuid extended feature flag for 64 bit support, and if that is set, it uses a default x86-64 cpu. Similar logic is already used for the Family 15 code. <rdar://problem/11314502> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156486 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-09Don't return true on a function with a void return type.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156484 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-09Add Triple::getiOSVersion.Chad Rosier
This new function provides a way to get the iOS version number from ios triples. Part of rdar://11409204 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156483 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-08Fix it so llvm-objdump -arch does accept x86 and x86-64 as valid arch names.Kevin Enderby
PR12731. Patch by Meador Inge! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156444 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-08[Support] Fix sys::GetRandomNumber() to always use a high quality seed.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156414 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-08Windows/PathV2.inc: Retry rename() for (maximum) 2 seconds.NAKAMURA Takumi
Files might be opend by system scanners (eg. file indexer, virus scanner, &c). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156380 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-07Don't assume size_t is unsigned long long.Matt Beaumont-Gay
Fixes a -Woverflow warning from gcc when building for 32-bit platforms. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156313 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-06make SourceMgr tolerate empty SMLoc()'s better.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156260 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-06Unix/Process.inc: Give more useful random seed to srand. Workaround for PR12743.NAKAMURA Takumi
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156252 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-06Support/Process: Move llvm::sys::Process::GetRandomNumber() from Process.cpp ↵NAKAMURA Takumi
to Unix/Process.inc. FIXME: GetRandomNumber() is not implemented in Win32. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156251 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-05reapply my patch, with a fix for an off-by-one error. Turned out to be a lotChris Lattner
of work for a drive-by fix :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156246 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-05revert my patches, which are causing problems.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156245 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-05refactor some code to expose column numbers more and make diagnostic ↵Chris Lattner
printing slightly more efficient. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156243 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-05[Support] Add missing include.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156240 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-05[Support] Fix up comments.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156239 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-05[Support] Rewrite sys::fs::unique_file to not be stupid with /dev/urandom.Daniel Dunbar
- Just use sys::Process::GetRandomNumber instead of having two poor implementations. - This is ~70 times (!) faster on my OS X machine. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156238 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-05[Support] Add sys::Process::GetRandomNumber().Daniel Dunbar
- Primitive API, but we rarely have need for random numbers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156237 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-04This patch adds a new NVPTX back-end to LLVM which supports code generation ↵Justin Holewinski
for NVIDIA PTX 3.0. This back-end will (eventually) replace the current PTX back-end, while maintaining compatibility with it. The new target machines are: nvptx (old ptx32) => 32-bit PTX nvptx64 (old ptx64) => 64-bit PTX The sources are based on the internal NVIDIA NVPTX back-end, and contain more functionality than the current PTX back-end currently provides. NV_CONTRIB git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156196 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-02Change the Intel Atom detection code to recognizePreston Gurd
Lincroft and Medfield. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156025 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01YAMLParser: get rid of global ctors & dtors.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155907 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-27[Support/YAMLParser] Fix ASan found bugs.Michael J. Spencer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155735 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-26[Support/YAML] Properly fix unitialized variable warning by inserting aMichael J. Spencer
'REPLACEMENT CHARACTER' (U+FFFD) when getAsInteger fails. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155653 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-23Add a missing cpu subtype.Evan Cheng
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155402 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-23[Support/Unix] Unconditionally include time.h.Michael J. Spencer
When building LLVM on Linux with libc++ with CMake TIME_WITH_SYS_TIME is undefined, and HAVE_SYS_TIME_H is defined. This ends up including sys/time.h but not time.h. Unix/TimeValue.inc requires time.h for asctime_r and localtime. libstdc++ seems to include time.h anyway, but libc++ does not. Fix this by always including time.h git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155382 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-23Conflict with st_dev/st_ino identifiers under Debian GNU/HurdSylvestre Ledru
The problem is that the struct file_status on UNIX systems has two members called st_dev and st_ino; those are also members of the struct stat, and they are reserved identifiers which can also be provided as #define (and this is the case for st_dev on Hurd). The solution (attached) is to rename them, for example adding a "fs_" prefix (= file status) to them. Patch by Pino Toscano git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155354 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-23Don't die with an assertion if the Result bitwidth is already correct. ThisChris Lattner
fixes an assert reading "1239123123123123" when the result is already 64-bit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155329 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-22Remove some potential warnings about variables used uninitialized.Bill Wendling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155307 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-21No need for "else if" after a return. Autosense "0o123" as octal inChris Lattner
StringRef::getAsInteger git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155298 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-21move Signals to .rodataNuno Lopes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155283 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-21YAMLParser: silence warning about tautological comparison on unsigned-char ↵Benjamin Kramer
platforms. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155280 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-18SourceMgr: Colorize diagnostics.Benjamin Kramer
Same color scheme as clang uses. The colors are only enabled if the output is a tty. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155035 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-18SmallPtrSet: Reuse DenseMapInfo's pointer hash function instead of inventing ↵Benjamin Kramer
a bad one ourselves. DenseMap's hash function uses slightly more entropy and reduces hash collisions significantly. I also experimented with Hashing.h, but it didn't gave a lot of improvement while being much more expensive to compute. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154996 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-18fix error check in assertSeth Cantrell
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154971 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-17C++ has newlines at the end of files (including include files).David Blaikie
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154962 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-17platform support for counting column widths and checking isprintSeth Cantrell
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154944 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-17Goodbye, JSONParser...Manuel Klimek
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154930 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-16Reapply 'Add reverseColor to raw_ostream'.Benjamin Kramer
To be used in printing unprintable source in clang diagnostics. Patch by Seth Cantrell, with a minor fix for mingw by me. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154805 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-16Revert r154800 which breaks windows builders.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154802 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-16Add reverseColor to raw_ostream.Argyrios Kyrtzidis
To be used in printing unprintable source in clang diagnostics. Patch by Seth Cantrell! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154800 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-11Fix the build under Debian GNU/Hurd.Sylvestre Ledru
Thanks to Pino Toscano for the patch git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154500 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-11FoldingSet: Push the hash through FoldingSetTraits::Equals, so clients can ↵Benjamin Kramer
use it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154496 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-05In MemoryBuffer::getOpenFile() make sure that the buffer is null-terminated ifArgyrios Kyrtzidis
the caller requested a null-terminated one. When mapping the file there could be a racing issue that resulted in the file being larger than the FileSize passed by the caller. We already have an assertion for this in MemoryBuffer::init() but have a runtime guarantee that the buffer will be null-terminated, so do a copy that adds a null-terminator. Protects against crash of rdar://11161822. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154082 91177308-0d34-0410-b5e6-96231b3b80d8