Commit Graph

1799 Commits

Author SHA1 Message Date
Nick Lewycky
e7c1aef2b8 Move WEAK marking to the declaration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144603 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-15 01:23:22 +00:00
Nick Lewycky
ec381a4183 Fix linking for some users who already have tsan enabled code and are trying to
link it against llvm code, by making our definitions weak. "Some users."


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144596 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-15 00:14:04 +00:00
Nick Lewycky
4d0a9ff365 Add support for tsan annotations (thread sanitizer, a valgrind-based tool).
These annotations are disabled entirely when either ENABLE_THREADS is off, or
building a release build. When enabled, they add calls to functions with no
statements to ManagedStatic's getters.

Use these annotations to inform tsan that the race used inside ManagedStatic
initialization is actually benign. Thanks to Kostya Serebryany for helping
write this patch!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144567 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-14 20:50:16 +00:00
Benjamin Kramer
a7b966fc8d Fix a typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143890 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-06 20:36:50 +00:00
Daniel Dunbar
589fbb1770 ADT/StringRef: Add ::lower() and ::upper() methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143880 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-06 18:04:43 +00:00
Peter Collingbourne
5ced70d8f8 Return only the least significant 8 bits of the exit status from
Process::Wait on Windows (mimicing POSIX behaviour).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143876 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-06 16:45:46 +00:00
Benjamin Kramer
41a964931a Add more PRI.64 macros for MSVC and use them throughout the codebase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143799 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-05 08:57:40 +00:00
Daniel Dunbar
a3a2dfd4a2 build: Add initial cut at LLVMBuild.txt files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143634 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-03 18:53:17 +00:00
Sebastian Pop
0173864d8a rename getHostTriple into getDefaultTargetTriple
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143502 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-01 21:32:20 +00:00
Sebastian Pop
de2e0b5e6d rename LLVM_HOSTTRIPLE into LLVM_DEFAULT_TARGET_TRIPLE
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143501 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-01 21:31:44 +00:00
Eli Friedman
c94792507d Remove a couple unused methods. PR11201.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143452 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-01 05:11:01 +00:00
Dan Gohman
33ba8b0e96 Remove the Alpha backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143164 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-27 22:56:32 +00:00
Benjamin Kramer
bc1430a0a0 BlockFrequency: Use a smarter overflow check.
This trades one 64 bit div for one 64 bit mul and some arithmetic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143106 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-27 16:38:50 +00:00
Dan Gohman
3e6157de57 Remove the Blackfin backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142880 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-25 00:05:42 +00:00
Dan Gohman
29074ccf6c Remove the SystemZ backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142878 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-24 23:48:32 +00:00
NAKAMURA Takumi
5d0700786d Windows/Path.inc: [PR8460] Get rid of ScopedNullTerminator. Thanks to Zvi Rackover!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142785 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-24 03:27:19 +00:00
Benjamin Kramer
7102b617bf Print branch probabilities as percentages.
50% is much more readable than 5.000000e-01.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142752 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-23 11:32:54 +00:00
Benjamin Kramer
341473c86d Add compare operators to BranchProbability and use it to determine if an edge is hot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142751 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-23 11:19:14 +00:00
Anton Korobeynikov
cda065df61 Fix build on mingw-w64.
Patch by Ruben Van Boxem!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142646 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-21 09:38:50 +00:00
David Meyer
e1d0b4fc25 Remove unused include of sys/uio.h in MemoryBuffer.cpp. It was not correctly protected by ifdef either.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142623 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-20 21:57:46 +00:00
Benjamin Kramer
e7a0719161 Fix handling of the From parameter in StringRef::find.
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
2011-10-17 20:49:40 +00:00
Benjamin Kramer
962bad70f4 Let printf do the formatting instead aligning strings ourselves.
While at it, merge some format strings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142140 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-16 16:30:34 +00:00
Chris Lattner
462b43cbf6 remove the dead 'ShowLine' argument from SMDiagnostic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142108 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-16 05:47:55 +00:00
Chris Lattner
3f2d5f60b3 Make SMDiagnostic a little more sane. Instead of passing around 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
2011-10-16 05:43:57 +00:00
Chris Lattner
d8b7aa2613 Enhance llvm::SourceMgr to support diagnostic ranges, the same way clang 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
2011-10-16 04:47:35 +00:00
Benjamin Kramer
6e6a558ebc Add a bad char heuristic to StringRef::find.
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
2011-10-15 10:08:31 +00:00
NAKAMURA Takumi
569c4a4767 Revert r142046, "Fix for llvm::sys::getHostTriple on Windows. Instead of 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
2011-10-15 04:29:36 +00:00
Chad Rosier
8e3ef11550 Fix for llvm::sys::getHostTriple on Windows. Instead of relying on the triple
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
2011-10-15 02:10:06 +00:00
NAKAMURA Takumi
c5c36765e6 Windows/Memory.inc: Support the ability to allocate memory "near" another 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
2011-10-15 01:58:16 +00:00
Michael J. Spencer
2dd0cfe118 Support/Windows: Add support modifying memory permissions on Windows. Patch by Aaron Ballman!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141910 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-13 23:16:01 +00:00
Michael J. Spencer
7d2bc08254 Support/Windows: Add efficent RW mutex on Windows. Patch by Aaron Ballman!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141907 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-13 23:10:56 +00:00
Eli Friedman
90406e18b8 Avoid undefined behavior in signed integer negation. Patch by Ahmed Charles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141905 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-13 22:49:56 +00:00
Eli Friedman
90196fced2 Fix APFloat::getSmallestNormalized so the shift doesn't depend on undefined behavior. Patch from Ahmed Charles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141818 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-12 21:56:19 +00:00
Eli Friedman
7247a5f20e Fix APFloat::getLargest so that it actually returns the correct value. 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
2011-10-12 21:51:36 +00:00
Daniel Dunbar
2c607b665d Clean up a few references to System/. We still have docs/SystemLibrary.html
lying around...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141703 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-11 20:02:52 +00:00
Bruno Cardoso Lopes
9d2fa87816 The Mips specific function for instruction cache invalidation cannot be
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
2011-10-10 18:41:02 +00:00
Eli Friedman
9eb6b4d91b Fix APInt::operator*= so that it computes the correct result for large 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
2011-10-07 23:40:49 +00:00
Eric Christopher
ce4984f86e Add more initializers to quiet a clang warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141163 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-05 05:00:26 +00:00
Nick Lewycky
03dd4e8bd3 Fix typo in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141032 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-03 21:30:08 +00:00
Michael J. Spencer
0bcd9c70b1 Add Windows x64 stack walking support. Patch by Aaron Ballman!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140906 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-01 00:05:20 +00:00
Jakob Stoklund Olesen
7850dd0f25 Fix a bug in compare_numeric().
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
2011-09-30 17:03:55 +00:00
Chad Rosier
ce496ca9c8 These symbols appear to be visible by SearchForAddressOfSymbol and no longer
require special case handling.
rdar://10117377

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140629 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-27 20:01:41 +00:00
Daniel Dunbar
bb0a6126cf sys::Process: Add a SetWorkingDirectory method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140433 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-23 23:23:36 +00:00
Richard Trieu
23946fcaae Change:
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
2011-09-21 03:09:09 +00:00
Bob Wilson
aabc6a9b79 Remove the hack to check UNAME_RELEASE when identifying the Darwin version.
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
2011-09-20 22:05:56 +00:00
Douglas Gregor
f34fa6f34e U is good enough
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140166 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-20 18:33:29 +00:00
Douglas Gregor
f83f0f8246 Eliminate sign-comparison warnings in APInt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140158 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-20 18:11:52 +00:00
Akira Hatanaka
70303688bc Add mips64 & mips64el to Triple. Patch by Liu with modifications.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140157 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-20 18:09:37 +00:00
Eric Christopher
627445f3e6 Rename LLVM_MULTITHREADED define and fix build without threads.
Patch by Arrowdodger.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140064 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-19 20:43:23 +00:00
Benjamin Kramer
586a55a290 Silence -Wsign-compare warnings from GCC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140043 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-19 20:08:54 +00:00
NAKAMURA Takumi
92ec8e1427 Add Win32 support to llvm::llvm_execute_on_thread(). Thanks to Aaron Ballman!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140011 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-19 07:41:43 +00:00
Eli Friedman
ecc9b5ec23 Fix a minor bug in fs::create_directories. Patch by Albert Wong.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139928 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-16 18:36:31 +00:00
Ivan Krasin
71280b55a3 use 64-bit types instead of off_t/size_t to avoid the issue when
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
2011-09-15 23:13:00 +00:00
Benjamin Kramer
b3514569d0 CommandLine: Add support for 64 bit unsigned integer options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139848 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-15 21:17:37 +00:00
Nick Lewycky
3a4178ea13 Add some more DWARF extensions from:
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
2011-09-15 05:21:03 +00:00
Nick Lewycky
f59c532cfd Update Dwarf enums list for DWARF 4.
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
2011-09-15 04:23:44 +00:00
Douglas Gregor
d26d6b68dd Update the comment for system_temp_directory() to indicate when it
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
2011-09-14 23:21:47 +00:00
Bill Wendling
544e4124fe Include limits.h to make sure PATH_MAX is known on Solaris 10.
Patch by Joakim Johansson!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139743 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-14 21:49:42 +00:00
Douglas Gregor
55cf815e19 Add a simple routine to determine the typical system directory for
temporary data. 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139725 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-14 20:27:01 +00:00
Douglas Gregor
dcd9996241 Add APInt support for converting to/from hexatridecimal strings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139695 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-14 15:54:46 +00:00
Bruno Cardoso Lopes
c4cc40c001 One more patch towards JIT support for Mips.
- 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
2011-09-14 03:00:41 +00:00
Benjamin Kramer
357b571841 Remove unimplemented function prototypes from PathV2. They can be readded 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
2011-09-14 01:14:36 +00:00
Benjamin Kramer
836623420d ObjectFile: Add support for mach-o-style dSYM companion files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139676 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-14 00:39:22 +00:00
Benjamin Kramer
8c74f7f299 Add the DataExtractor utility class.
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
2011-09-13 19:42:16 +00:00
Devang Patel
5443140021 Add DW_ATE_UTF, which clang started using in my previous commit!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139503 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-12 17:18:20 +00:00
Tobias Grosser
05d7138018 Add AMDIL as valid target triple to LLVM.
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
2011-08-29 15:44:55 +00:00
Nick Lewycky
b1b051ec97 Fix integer overflow bug in raw_ostream::write. This showed up as a
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
2011-08-28 03:30:02 +00:00
Benjamin Kramer
f66f76c1a3 Report failure if there are less bytes than requested in a MemoryObject.
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
2011-08-27 07:45:46 +00:00
Benjamin Kramer
cf847bfa6f Intel family 6 model 44 is Gulftown/Westmere-EP and doesn't have AVX.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138573 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-25 18:05:56 +00:00
Evan Cheng
3e74d6fdd2 Move TargetRegistry and TargetSelect from Target to Support where they belong.
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
2011-08-24 18:08:43 +00:00
Ivan Krasin
38fb2db6c9 This patch adds support of le32 pseudo-cpu that stands for generic
32-bit little-endian CPU. Used by PNaCl and Emscripten.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138335 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-23 16:59:00 +00:00
NAKAMURA Takumi
07097ddbc0 lib/Support/Windows/Windows.h: Update required IE ver. 0x0600 should be enough for Windows XP.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138319 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-23 03:49:11 +00:00
Ivan Krasin
d883453213 Add NativeClient support to Triple::ParseOS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138291 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-22 23:08:53 +00:00
Jordy Rose
eeb37f1a56 Make DynamicLibrary thread-safe w/r/t call to dlerror() after dlopen(). PR10718
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138260 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-22 19:01:52 +00:00
Benjamin Kramer
2e608c6b61 PathV2: Handle more reserved filenames on windows.
Patch by Aaron Ballman!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138213 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-20 21:36:38 +00:00
NAKAMURA Takumi
77c108241a lib/Support/CrashRecoveryContext.cpp: Add Win32 support to CrashRecoveryContext. Thanks to Aaron Ballman!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138199 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-20 06:35:36 +00:00
NAKAMURA Takumi
aa629668db lib/Support/Windows/Windows.h: Require at least Windows XP(5.1) API. We will not support Windows 2000 any more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138198 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-20 06:35:31 +00:00
Ivan Krasin
fb23462889 Add NativeClient operating system support.
This patch adds support of NativeClient (*-*-nacl) OS support to LLVM.
It's already supported in autoconf/config.sub.

The motivation for this change is to start upstreaming PNaCl work. The
whole set of patches include llvm backends (i686, x86_64, ARM),
llvm-gcc (probably, would not be upstreamed because it's deprecated)
and clang (the work has been just started, the amount of changes is
going to be low and the most of the work is expected to be done close
to the mainline).




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138005 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-18 22:54:21 +00:00
Jordy Rose
008a5f515a Static fields require an out-of-line definition. Fix DynamicLibrary for real.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137844 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-17 18:38:42 +00:00
Jordy Rose
f0813ceeaf Unbork Windows build. Thanks, Francois.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137798 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-17 00:59:50 +00:00
Jordy Rose
0bce85fbfa Use DynamicLibrary instances as a way to get symbols from a specific library. Preparation for upcoming (preliminary) support for plugins for the static analyzer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137791 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-17 00:29:32 +00:00
Duncan Sands
1f6a329f79 Silence a bunch (but not all) "variable written but not read" warnings
when building with assertions disabled.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137460 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-12 14:54:45 +00:00
Bob Wilson
21ab6c066d Clarify a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137204 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-10 05:02:22 +00:00
Bob Wilson
0dc8b42987 Put Darwin-specific code inside an __APPLE__ ifdef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137137 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-09 19:54:32 +00:00
Bob Wilson
f5b757642d Recognize the UNAME_RELEASE environment variable to match Darwin's uname.
When this variable is set, "uname -r" will return its value instead of the
real OS version.  Make this affect LLVM's triple for consistency.
<rdar://problem/9919167>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137111 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-09 05:13:36 +00:00
Sean Callanan
efd7919618 Added several architecture names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136552 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-30 01:29:54 +00:00
Nick Lewycky
2b9c50776a Don't look at $PWD in GetCurrentDirectory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136477 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-29 18:26:59 +00:00
Nick Lewycky
3c036e520e Teach Path::GetCurrentDirectory to use $PWD, to support users who like to do
screwy things by setting PWD != getcwd(). For example, some developers I know
will use this to control the value in gcc's DW_AT_comp_dir value in debug
output. With this patch, that trick will now work on clang too.

The only other effect of this change is that the static analysis will now
respect $PWD when reporting the directory of the files in its HTML output. I
think that's fine.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136459 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-29 04:42:39 +00:00
Argyrios Kyrtzidis
814450a429 Add an optional 'bool makeAbsolute' in llvm::sys::fs::unique_file function.
If true and 'model' parameter is not an absolute path, a temp directory will be prepended.
Make it true by default to match current behaviour.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136310 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 00:29:20 +00:00
Jakub Staszak
ffcc2a542c Optimize 96-bit division a little bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136222 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-27 16:00:40 +00:00
Jakub Staszak
636a02b57c Move static methods to the anonymous namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136221 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-27 15:51:51 +00:00
Frits van Bommel
a09d514b29 Trim includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136218 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-27 15:20:06 +00:00
Duncan Sands
652b48bf23 Teach the Triple class about kfreebsd (FreeBSD kernel with
a GNU userspace).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136085 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-26 15:30:04 +00:00
Jakub Staszak
15b35677d0 BranchProbability::print returns void now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135994 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-25 22:27:42 +00:00
Jakub Staszak
a26ec886a3 Add BlockFrequency class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135992 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-25 22:24:51 +00:00
Chris Lattner
b7fbcc9696 switch Triple to take twines instead of stringrefs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135889 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-24 20:45:08 +00:00
Chris Lattner
3f25ee080c Add Twine support for characters, and switch twine to use a union internally
to eliminate some casting.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135888 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-24 20:44:30 +00:00
Chandler Carruth
48ac8e9be7 Move TargetRegistry.cpp from lib/Support to lib/Target where it belongs.
The header file was already properly located. The previous need for it
in Support had to do with the version string printing which was fixed in
r135757.

Also update build dependencies where libraries that needed the
functionality of the Target library (in the form of the TargetRegistry)
were picking it up via Support. This is pretty pervasive, essentially
every TargetInfo library (ARMInfo, etc) uses TargetRegistry, making it
depend on Target. All of these were previously just sneaking by.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135760 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-22 08:16:53 +00:00
Chandler Carruth
4039313b4c Move the registered target printing in version strings completely out of
the Support library. Now its part of the TargetRegistry, and the three
commands that care about this explicitly register this extra bit of
version information.

The set of commands which care was computed by intersecting those which
use the Support library's version string printing and those that
initialize all the registered targets in a way that produces
a meaningful list. The only odd ball out is that 'clang -cc1as -version'
no longer prints the registered targets. I don't think anyone is really
interested in that (especially as the fact that llvm-mc does so is under
a FIXME), but if someone really does want this back I'll happily apply
the same patch there.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135757 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-22 07:50:48 +00:00
Chandler Carruth
077c408717 Move the logic for printing the registered targets into a static
function on the TargetRegistry. Also clean it up and use the modern LLVM
utility libraries available instead of rolling a few things manually.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135756 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-22 07:50:44 +00:00