summaryrefslogtreecommitdiff
path: root/lib/Support
Commit message (Collapse)AuthorAge
* Fix handling of the From parameter in StringRef::find.Benjamin Kramer2011-10-17
| | | | | | Enable bounds checking to catch this kind of bug earlier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142247 91177308-0d34-0410-b5e6-96231b3b80d8
* Let printf do the formatting instead aligning strings ourselves.Benjamin Kramer2011-10-16
| | | | | | While at it, merge some format strings. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142140 91177308-0d34-0410-b5e6-96231b3b80d8
* remove the dead 'ShowLine' argument from SMDiagnostic.Chris Lattner2011-10-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142108 91177308-0d34-0410-b5e6-96231b3b80d8
* Make SMDiagnostic a little more sane. Instead of passing around ↵Chris Lattner2011-10-16
| | | | | | | | | note/warning/error as a string, pass it around as an enum. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142107 91177308-0d34-0410-b5e6-96231b3b80d8
* Enhance llvm::SourceMgr to support diagnostic ranges, the same way clang ↵Chris Lattner2011-10-16
| | | | | | | | | | | | | | | | | does. Enhance the X86 asmparser to produce ranges in the one case that was annoying me, for example: test.s:10:15: error: invalid operand for instruction movl 0(%rax), 0(%edx) ^~~~~~~ It should be straight-forward to enhance filecheck, tblgen, and/or the .ll parser to use ranges where appropriate if someone is interested. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142106 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a bad char heuristic to StringRef::find.Benjamin Kramer2011-10-15
| | | | | | | | | Based on Horspool's simplified version of Boyer-Moore. We use a constant-sized table of uint8_ts to keep cache thrashing low, needles bigger than 255 bytes are uncommon anyways. The worst case is still O(n*m) but we do a lot better on the average case now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142061 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r142046, "Fix for llvm::sys::getHostTriple on Windows. Instead of ↵NAKAMURA Takumi2011-10-15
| | | | | | | | | | relying on the triple" It extremely breaks builds when optimization is enabled. Twine should not hold temporary objects. By the way, I might feel sad if I saw "i786-" "i1586-" or "iF86-". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142055 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix for llvm::sys::getHostTriple on Windows. Instead of relying on the tripleChad Rosier2011-10-15
| | | | | | | | | from config.h, it discovers the triple based on the execution environment. Patch by Aaron Ballman <aaron@aaronballman.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142046 91177308-0d34-0410-b5e6-96231b3b80d8
* Windows/Memory.inc: Support the ability to allocate memory "near" another ↵NAKAMURA Takumi2011-10-15
| | | | | | | | block of memory on Win32. It has fixed FIXME. Thanks to Aaron Ballman! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142039 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/Windows: Add support modifying memory permissions on Windows. Patch ↵Michael J. Spencer2011-10-13
| | | | | | by Aaron Ballman! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141910 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/Windows: Add efficent RW mutex on Windows. Patch by Aaron Ballman!Michael J. Spencer2011-10-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141907 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid undefined behavior in signed integer negation. Patch by Ahmed Charles.Eli Friedman2011-10-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141905 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix APFloat::getSmallestNormalized so the shift doesn't depend on undefined ↵Eli Friedman2011-10-12
| | | | | | behavior. Patch from Ahmed Charles. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141818 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix APFloat::getLargest so that it actually returns the correct value. ↵Eli Friedman2011-10-12
| | | | | | Found by accident while reviewing a patch to nearby code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141816 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up a few references to System/. We still have docs/SystemLibrary.htmlDaniel Dunbar2011-10-11
| | | | | | lying around... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141703 91177308-0d34-0410-b5e6-96231b3b80d8
* The Mips specific function for instruction cache invalidation cannot beBruno Cardoso Lopes2011-10-10
| | | | | | | | | compiled on mips32r1 processors because it uses synci and rdhwr instructions which are supported only on mips32r2, so I replaced this function with the call to function cacheflush which works for both mips32r1 and mips32r2. Patch by Sasa Stankovic git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141564 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix APInt::operator*= so that it computes the correct result for large ↵Eli Friedman2011-10-07
| | | | | | integers where there is unsigned overflow. Fix APFloat::toString so that it doesn't depend on the incorrect behavior in common cases (and computes the correct result in some rare cases). Fixes PR11086. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141441 91177308-0d34-0410-b5e6-96231b3b80d8
* Add more initializers to quiet a clang warning.Eric Christopher2011-10-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141163 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo in comments.Nick Lewycky2011-10-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141032 91177308-0d34-0410-b5e6-96231b3b80d8
* Add Windows x64 stack walking support. Patch by Aaron Ballman!Michael J. Spencer2011-10-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140906 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug in compare_numeric().Jakob Stoklund Olesen2011-09-30
| | | | | | Thanks to Alexandru Dura and Jonas Paulsson for finding it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140859 91177308-0d34-0410-b5e6-96231b3b80d8
* These symbols appear to be visible by SearchForAddressOfSymbol and no longer Chad Rosier2011-09-27
| | | | | | | require special case handling. rdar://10117377 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140629 91177308-0d34-0410-b5e6-96231b3b80d8
* sys::Process: Add a SetWorkingDirectory method.Daniel Dunbar2011-09-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140433 91177308-0d34-0410-b5e6-96231b3b80d8
* Change:Richard Trieu2011-09-21
| | | | | | | | | | | | | assert(!"error message"); To: assert(0 && "error message"); which is more consistant across the code base. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140234 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the hack to check UNAME_RELEASE when identifying the Darwin version.Bob Wilson2011-09-20
| | | | | | | | | This was only needed to locate llvm-gcc's installation directory when clang falls back to run llvm-gcc for i386 kexts. As of clang svn r140187, we're now just searching paths with several different Darwin versions on either side of the current version, so this is no longer needed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140188 91177308-0d34-0410-b5e6-96231b3b80d8
* U is good enoughDouglas Gregor2011-09-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140166 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate sign-comparison warnings in APIntDouglas Gregor2011-09-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140158 91177308-0d34-0410-b5e6-96231b3b80d8
* Add mips64 & mips64el to Triple. Patch by Liu with modifications.Akira Hatanaka2011-09-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140157 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename LLVM_MULTITHREADED define and fix build without threads.Eric Christopher2011-09-19
| | | | | | Patch by Arrowdodger. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140064 91177308-0d34-0410-b5e6-96231b3b80d8
* Silence -Wsign-compare warnings from GCC.Benjamin Kramer2011-09-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140043 91177308-0d34-0410-b5e6-96231b3b80d8
* Add Win32 support to llvm::llvm_execute_on_thread(). Thanks to Aaron Ballman!NAKAMURA Takumi2011-09-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140011 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a minor bug in fs::create_directories. Patch by Albert Wong.Eli Friedman2011-09-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139928 91177308-0d34-0410-b5e6-96231b3b80d8
* use 64-bit types instead of off_t/size_t to avoid the issue whenIvan Krasin2011-09-15
| | | | | | | | | | gold plugin is built with Large File Support (sizeof(off_t) == 64 on i686) and the rest of LLVM is built w/o Large File Support (sizeof(off_t) == 32 on i686) which corrupts the stack. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139873 91177308-0d34-0410-b5e6-96231b3b80d8
* CommandLine: Add support for 64 bit unsigned integer options.Benjamin Kramer2011-09-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139848 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some more DWARF extensions from:Nick Lewycky2011-09-15
| | | | | | | | 1. http://gcc.gnu.org/wiki/TemplateParmsDwarf 2. ftp://ftp.software.ibm.com/software/os390/czos/dwarf/mips_extensions.pdf git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139784 91177308-0d34-0410-b5e6-96231b3b80d8
* Update Dwarf enums list for DWARF 4.Nick Lewycky2011-09-15
| | | | | | | Note that DW_TAG_rvalue_reference_type is officially 0x42, not 0x41. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139779 91177308-0d34-0410-b5e6-96231b3b80d8
* Update the comment for system_temp_directory() to indicate when itDouglas Gregor2011-09-14
| | | | | | | | will ignore the erasedOnReboot option, and properly escape the backslash in "C:\TEMP". Thanks to Aaron and Francois. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139755 91177308-0d34-0410-b5e6-96231b3b80d8
* Include limits.h to make sure PATH_MAX is known on Solaris 10.Bill Wendling2011-09-14
| | | | | | | Patch by Joakim Johansson! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139743 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a simple routine to determine the typical system directory forDouglas Gregor2011-09-14
| | | | | | | temporary data. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139725 91177308-0d34-0410-b5e6-96231b3b80d8
* Add APInt support for converting to/from hexatridecimal stringsDouglas Gregor2011-09-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139695 91177308-0d34-0410-b5e6-96231b3b80d8
* One more patch towards JIT support for Mips.Bruno Cardoso Lopes2011-09-14
| | | | | | | | | | | | | | - Add TSFlags for the instruction formats. The idea here is to use as much encoding as possible from getBinaryCodeForInstr, and having TSFLags formats for that would make it easier to encode most part of the instructions (since Mips encodings are pretty straightforward) - Improve the mips mechanism for compilation callback - Add Mips specific code for invalidating the instruction cache - Next patch will address wrong tablegen encoding Commit msg added by my own but the patch is from Sasa Stankovic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139688 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unimplemented function prototypes from PathV2. They can be readded ↵Benjamin Kramer2011-09-14
| | | | | | | | when someone cares enough. Patch by Aaron Ballman! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139682 91177308-0d34-0410-b5e6-96231b3b80d8
* ObjectFile: Add support for mach-o-style dSYM companion files.Benjamin Kramer2011-09-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139676 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the DataExtractor utility class.Benjamin Kramer2011-09-13
| | | | | | | | | | It is an endian-aware helper that can read data from a StringRef. It will come in handy for DWARF parsing. This class is inspired by LLDB's DataExtractor, but is stripped down to the bare minimum needed for DWARF. Comes with unit tests! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139626 91177308-0d34-0410-b5e6-96231b3b80d8
* Add DW_ATE_UTF, which clang started using in my previous commit!Devang Patel2011-09-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139503 91177308-0d34-0410-b5e6-96231b3b80d8
* Add AMDIL as valid target triple to LLVM.Tobias Grosser2011-08-29
| | | | | | Submitted by: Villmow, Micah <Micah.Villmow@amd.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138734 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix integer overflow bug in raw_ostream::write. This showed up as aNick Lewycky2011-08-28
| | | | | | | non-deterministic crash in the test suite. Fixes PR10055! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138717 91177308-0d34-0410-b5e6-96231b3b80d8
* Report failure if there are less bytes than requested in a MemoryObject.Benjamin Kramer2011-08-27
| | | | | | | Before we just left the remaining bytes uninitialized. This is another step in making llvm valgrind-clean again. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138705 91177308-0d34-0410-b5e6-96231b3b80d8
* Intel family 6 model 44 is Gulftown/Westmere-EP and doesn't have AVX.Benjamin Kramer2011-08-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138573 91177308-0d34-0410-b5e6-96231b3b80d8
* Move TargetRegistry and TargetSelect from Target to Support where they belong.Evan Cheng2011-08-24
| | | | | | | These are strictly utilities for registering targets and components. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138450 91177308-0d34-0410-b5e6-96231b3b80d8