Commit Graph

1797 Commits

Author SHA1 Message Date
Michael J. Spencer a7a90bfdab Support/Windows: Add support modifying memory permissions on Windows. Patch by Aaron Ballman!
llvm-svn: 141910
2011-10-13 23:16:01 +00:00
Michael J. Spencer 0084615924 Support/Windows: Add efficent RW mutex on Windows. Patch by Aaron Ballman!
llvm-svn: 141907
2011-10-13 23:10:56 +00:00
Eli Friedman 53ba208c72 Avoid undefined behavior in signed integer negation. Patch by Ahmed Charles.
llvm-svn: 141905
2011-10-13 22:49:56 +00:00
Eli Friedman d433042388 Fix APFloat::getSmallestNormalized so the shift doesn't depend on undefined behavior. Patch from Ahmed Charles.
llvm-svn: 141818
2011-10-12 21:56:19 +00:00
Eli Friedman c53220134a Fix APFloat::getLargest so that it actually returns the correct value. Found by accident while reviewing a patch to nearby code.
llvm-svn: 141816
2011-10-12 21:51:36 +00:00
Daniel Dunbar 037fc9311a Clean up a few references to System/. We still have docs/SystemLibrary.html
lying around...

llvm-svn: 141703
2011-10-11 20:02:52 +00:00
Bruno Cardoso Lopes cc6659b2ae 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

llvm-svn: 141564
2011-10-10 18:41:02 +00:00
Eli Friedman 195464184e 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.
llvm-svn: 141441
2011-10-07 23:40:49 +00:00
Eric Christopher c4b9b526ba Add more initializers to quiet a clang warning.
llvm-svn: 141163
2011-10-05 05:00:26 +00:00
Nick Lewycky f66daac2f5 Fix typo in comments.
llvm-svn: 141032
2011-10-03 21:30:08 +00:00
Michael J. Spencer 44a36c872e Add Windows x64 stack walking support. Patch by Aaron Ballman!
llvm-svn: 140906
2011-10-01 00:05:20 +00:00
Jakob Stoklund Olesen c874e2d8fb Fix a bug in compare_numeric().
Thanks to Alexandru Dura and Jonas Paulsson for finding it.

llvm-svn: 140859
2011-09-30 17:03:55 +00:00
Chad Rosier bf415251df These symbols appear to be visible by SearchForAddressOfSymbol and no longer
require special case handling.
rdar://10117377

llvm-svn: 140629
2011-09-27 20:01:41 +00:00
Daniel Dunbar 9b92e2be30 sys::Process: Add a SetWorkingDirectory method.
llvm-svn: 140433
2011-09-23 23:23:36 +00:00
Richard Trieu a318b8dce6 Change:
assert(!"error message");

To:

  assert(0 && "error message");

which is more consistant across the code base.

llvm-svn: 140234
2011-09-21 03:09:09 +00:00
Bob Wilson 49621cb209 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.

llvm-svn: 140188
2011-09-20 22:05:56 +00:00
Douglas Gregor c98ac850eb U is good enough
llvm-svn: 140166
2011-09-20 18:33:29 +00:00
Douglas Gregor e4e20f43e4 Eliminate sign-comparison warnings in APInt
llvm-svn: 140158
2011-09-20 18:11:52 +00:00
Akira Hatanaka 6c3ad65288 Add mips64 & mips64el to Triple. Patch by Liu with modifications.
llvm-svn: 140157
2011-09-20 18:09:37 +00:00
Eric Christopher 4418a60272 Rename LLVM_MULTITHREADED define and fix build without threads.
Patch by Arrowdodger.

llvm-svn: 140064
2011-09-19 20:43:23 +00:00
Benjamin Kramer c20a3ebba0 Silence -Wsign-compare warnings from GCC.
llvm-svn: 140043
2011-09-19 20:08:54 +00:00
NAKAMURA Takumi dbd883b915 Add Win32 support to llvm::llvm_execute_on_thread(). Thanks to Aaron Ballman!
llvm-svn: 140011
2011-09-19 07:41:43 +00:00
Eli Friedman f67d3ff8f3 Fix a minor bug in fs::create_directories. Patch by Albert Wong.
llvm-svn: 139928
2011-09-16 18:36:31 +00:00
Ivan Krasin 639222d090 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.

llvm-svn: 139873
2011-09-15 23:13:00 +00:00
Benjamin Kramer 49fc9ddae6 CommandLine: Add support for 64 bit unsigned integer options.
llvm-svn: 139848
2011-09-15 21:17:37 +00:00
Nick Lewycky ee674b3e3b 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

llvm-svn: 139784
2011-09-15 05:21:03 +00:00
Nick Lewycky 34368124aa Update Dwarf enums list for DWARF 4.
Note that DW_TAG_rvalue_reference_type is officially 0x42, not 0x41.

llvm-svn: 139779
2011-09-15 04:23:44 +00:00
Douglas Gregor 8b74454619 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.

llvm-svn: 139755
2011-09-14 23:21:47 +00:00
Bill Wendling bdaa57fe6d Include limits.h to make sure PATH_MAX is known on Solaris 10.
Patch by Joakim Johansson!

llvm-svn: 139743
2011-09-14 21:49:42 +00:00
Douglas Gregor 123dc70c50 Add a simple routine to determine the typical system directory for
temporary data. 

llvm-svn: 139725
2011-09-14 20:27:01 +00:00
Douglas Gregor 663c068d46 Add APInt support for converting to/from hexatridecimal strings
llvm-svn: 139695
2011-09-14 15:54:46 +00:00
Bruno Cardoso Lopes 483c269a33 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.

llvm-svn: 139688
2011-09-14 03:00:41 +00:00
Benjamin Kramer 91ead3c1f5 Remove unimplemented function prototypes from PathV2. They can be readded when someone cares enough.
Patch by Aaron Ballman!

llvm-svn: 139682
2011-09-14 01:14:36 +00:00
Benjamin Kramer 557a81e9d7 ObjectFile: Add support for mach-o-style dSYM companion files.
llvm-svn: 139676
2011-09-14 00:39:22 +00:00
Benjamin Kramer 88a1d9fc00 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!

llvm-svn: 139626
2011-09-13 19:42:16 +00:00
Devang Patel b5a07abe94 Add DW_ATE_UTF, which clang started using in my previous commit!
llvm-svn: 139503
2011-09-12 17:18:20 +00:00
Tobias Grosser 516dbb24b5 Add AMDIL as valid target triple to LLVM.
Submitted by: Villmow, Micah <Micah.Villmow@amd.com>

llvm-svn: 138734
2011-08-29 15:44:55 +00:00
Nick Lewycky 7bfd86d046 Fix integer overflow bug in raw_ostream::write. This showed up as a
non-deterministic crash in the test suite. Fixes PR10055!

llvm-svn: 138717
2011-08-28 03:30:02 +00:00
Benjamin Kramer 5ff961c376 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.

llvm-svn: 138705
2011-08-27 07:45:46 +00:00
Benjamin Kramer 5a122f37fe Intel family 6 model 44 is Gulftown/Westmere-EP and doesn't have AVX.
llvm-svn: 138573
2011-08-25 18:05:56 +00:00
Evan Cheng 2bb4035707 Move TargetRegistry and TargetSelect from Target to Support where they belong.
These are strictly utilities for registering targets and components.

llvm-svn: 138450
2011-08-24 18:08:43 +00:00
Ivan Krasin 771ef8c66a This patch adds support of le32 pseudo-cpu that stands for generic
32-bit little-endian CPU. Used by PNaCl and Emscripten.

llvm-svn: 138335
2011-08-23 16:59:00 +00:00
NAKAMURA Takumi fd6cb64c48 lib/Support/Windows/Windows.h: Update required IE ver. 0x0600 should be enough for Windows XP.
llvm-svn: 138319
2011-08-23 03:49:11 +00:00
Ivan Krasin b296790bb6 Add NativeClient support to Triple::ParseOS.
llvm-svn: 138291
2011-08-22 23:08:53 +00:00
Jordy Rose 5765f4c24c Make DynamicLibrary thread-safe w/r/t call to dlerror() after dlopen(). PR10718
llvm-svn: 138260
2011-08-22 19:01:52 +00:00
Benjamin Kramer 58994ec9b9 PathV2: Handle more reserved filenames on windows.
Patch by Aaron Ballman!

llvm-svn: 138213
2011-08-20 21:36:38 +00:00
NAKAMURA Takumi 1eae12cc9f lib/Support/CrashRecoveryContext.cpp: Add Win32 support to CrashRecoveryContext. Thanks to Aaron Ballman!
llvm-svn: 138199
2011-08-20 06:35:36 +00:00
NAKAMURA Takumi 613655f89c lib/Support/Windows/Windows.h: Require at least Windows XP(5.1) API. We will not support Windows 2000 any more.
llvm-svn: 138198
2011-08-20 06:35:31 +00:00
Ivan Krasin 44306e2e5f 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).

llvm-svn: 138005
2011-08-18 22:54:21 +00:00
Jordy Rose 04bc405a29 Static fields require an out-of-line definition. Fix DynamicLibrary for real.
llvm-svn: 137844
2011-08-17 18:38:42 +00:00
Jordy Rose 1a3ca9201a Unbork Windows build. Thanks, Francois.
llvm-svn: 137798
2011-08-17 00:59:50 +00:00
Jordy Rose a19917da7c Use DynamicLibrary instances as a way to get symbols from a specific library. Preparation for upcoming (preliminary) support for plugins for the static analyzer.
llvm-svn: 137791
2011-08-17 00:29:32 +00:00
Duncan Sands a41634e307 Silence a bunch (but not all) "variable written but not read" warnings
when building with assertions disabled.

llvm-svn: 137460
2011-08-12 14:54:45 +00:00
Bob Wilson 527bd07934 Clarify a comment.
llvm-svn: 137204
2011-08-10 05:02:22 +00:00
Bob Wilson f60d6df887 Put Darwin-specific code inside an __APPLE__ ifdef.
llvm-svn: 137137
2011-08-09 19:54:32 +00:00
Bob Wilson de9ec45e5a 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>

llvm-svn: 137111
2011-08-09 05:13:36 +00:00
Sean Callanan 147c83ed4d Added several architecture names.
llvm-svn: 136552
2011-07-30 01:29:54 +00:00
Nick Lewycky 9ee5f77141 Don't look at $PWD in GetCurrentDirectory.
llvm-svn: 136477
2011-07-29 18:26:59 +00:00
Nick Lewycky 38b9b568b9 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.

llvm-svn: 136459
2011-07-29 04:42:39 +00:00
Argyrios Kyrtzidis 348937de07 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.

llvm-svn: 136310
2011-07-28 00:29:20 +00:00
Jakub Staszak 9b8a6a3b2b Optimize 96-bit division a little bit.
llvm-svn: 136222
2011-07-27 16:00:40 +00:00
Jakub Staszak a9e8aa0482 Move static methods to the anonymous namespace.
llvm-svn: 136221
2011-07-27 15:51:51 +00:00
Frits van Bommel ec9cd83905 Trim includes.
llvm-svn: 136218
2011-07-27 15:20:06 +00:00
Duncan Sands fe44f67d43 Teach the Triple class about kfreebsd (FreeBSD kernel with
a GNU userspace).

llvm-svn: 136085
2011-07-26 15:30:04 +00:00
Jakub Staszak e92d047b51 BranchProbability::print returns void now.
llvm-svn: 135994
2011-07-25 22:27:42 +00:00
Jakub Staszak 49993f26bf Add BlockFrequency class.
llvm-svn: 135992
2011-07-25 22:24:51 +00:00
Chris Lattner d757d3f5c2 switch Triple to take twines instead of stringrefs.
llvm-svn: 135889
2011-07-24 20:45:08 +00:00
Chris Lattner 9650f0678c Add Twine support for characters, and switch twine to use a union internally
to eliminate some casting.

llvm-svn: 135888
2011-07-24 20:44:30 +00:00
Chandler Carruth 43025a0869 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.

llvm-svn: 135760
2011-07-22 08:16:53 +00:00
Chandler Carruth 2d71c421f9 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.

llvm-svn: 135757
2011-07-22 07:50:48 +00:00
Chandler Carruth 2baac02c94 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.

llvm-svn: 135756
2011-07-22 07:50:44 +00:00
Chandler Carruth ea7e55272c Add an extension point to the CommandLine library where clients can
register extra version information to be printed. This is designed to
allow those tools which link in various targets to also print those
registered targets under --version.

Currently this printing logic is embedded into the Support library
directly; a huge layering violation. This is the first step to hoisting
it out into the tools without adding lots of duplicated code.

llvm-svn: 135755
2011-07-22 07:50:40 +00:00
NAKAMURA Takumi af8d50ddb3 lib/Support/Triple.cpp: Recognize "-march=ppc32" to llc properly, as quick hack.
FIXME: There is an inconsistency. llvm::Triple does not understand "ppc32" and PowerPC/TargetInfo holds "ppc32".
llvm-svn: 135745
2011-07-22 04:02:22 +00:00
Chris Lattner 5cf753c95e move tier out of an anonymous namespace, it doesn't make sense
to for it to be an an anon namespace and be in a header.

Eliminate some extraenous uses of tie.

llvm-svn: 135669
2011-07-21 06:21:31 +00:00
Jeffrey Yasskin 7a16288157 Add APInt(numBits, ArrayRef<uint64_t> bigVal) constructor to prevent future ambiguity
errors like the one corrected by r135261.  Migrate all LLVM callers of the old
constructor to the new one.

llvm-svn: 135431
2011-07-18 21:45:40 +00:00
Benjamin Kramer 2b8cb92209 Simplify & microoptimize code. No intended functionality change.
llvm-svn: 135364
2011-07-18 00:00:20 +00:00
Frits van Bommel f8bf4c213a In Twine::str(), if the Twine stores only a std::string, just return a direct copy of that instead of first copying to a SmallString and converting that to a std::string. Also fix some indentation.
llvm-svn: 135267
2011-07-15 11:05:37 +00:00
Chandler Carruth 1bf4a30d4d Explicitly cast the second argument to unsigned in order to select the
desired overload.

This is a bit of a hackish workaround to fix the compile after r135259.
Let me know if there is a better approach.

llvm-svn: 135261
2011-07-15 07:31:10 +00:00
Jeffrey Yasskin 03b81a2eb4 Add an APFloat::convertToInt(APSInt) function that automatically manages the
memory for the result.

llvm-svn: 135259
2011-07-15 07:04:56 +00:00
NAKAMURA Takumi ee24d32071 Windows/DynamicLibrary.inc: Fix trivial warnings. Thanks to John Myers!
llvm-svn: 134812
2011-07-09 08:41:20 +00:00
Bob Wilson d0f0600b49 Update comments for SandyBridge CPU identifiers.
llvm-svn: 134759
2011-07-08 22:33:59 +00:00
Bob Wilson eff24111b9 Recognize Intel CPUs with Family=6 and Model=44.
According to Intel Application Note 485, this value is used for
"Intel Core i7 and Intel Xeon processor".  Just include it with the other
"corei7-avx" entries.

llvm-svn: 134750
2011-07-08 22:09:35 +00:00
Joerg Sonnenberger e0cbf7409c Recognize mipseb as alias for mips for symmetry with mipsel.
llvm-svn: 134617
2011-07-07 16:53:52 +00:00
Eli Friedman 499647bfc3 Fix missing triple support for RTEMS target.
llvm-svn: 134532
2011-07-06 20:56:26 +00:00
Chad Rosier 30c3463309 By default mkstemp() creates a temporary file with mode 0600, but the mode
used for open is 0666.  Therefore, add the necessary permission bits for
consistency.
rdar://8621462

llvm-svn: 134430
2011-07-05 18:55:31 +00:00
Duncan Sands a1c44332e5 Revert previous commit. It seems that whether casting to void
is valid or not depends on which system you build.

llvm-svn: 134321
2011-07-02 13:14:22 +00:00
Duncan Sands dda99eef54 Supress gcc-4.5 warning about the result not being used.
llvm-svn: 134319
2011-07-02 13:06:23 +00:00
Douglas Gregor de3c92674e Add initial *-*-rtems* target, from Joel Sherrill
llvm-svn: 134282
2011-07-01 22:41:06 +00:00
Nick Lewycky 5dc6b794b1 Fix the implementation of ConstantRange::sub(ConstantRange). Patch by Xi Wang!
llvm-svn: 133648
2011-06-22 21:13:46 +00:00
Ted Kremenek b05f02e956 add option for literal formatting to APInt::toString()
toString() now takes an optional bool argument that,
depending on the radix, adds the appropriate prefix
to the integer's string representation that makes it into a
meaningful C literal, e.g.:

hexademical: '-f' becomes '-0xf'
octal: '77' becomes '077'
binary: '110' becomes '0b110'

Patch by nobled@dreamwidth.org!

llvm-svn: 133032
2011-06-15 00:51:55 +00:00
Evan Cheng 871b71247b Aliased flag options should be directed to stdout, not stderr to be consistent. Patch by Julien Lerouge.
llvm-svn: 132931
2011-06-13 20:45:54 +00:00
Andrew Trick 3d4e64b082 Branch profiling: floating-point avoidance.
Patch by: Jakub Staszak!

Introduces BranchProbability. Changes unsigned to uint32_t all over and
uint64_t only when overflow is expected.

llvm-svn: 132867
2011-06-11 01:05:22 +00:00
Chris Lattner 889c40e2e1 add another sandybridge alias.
llvm-svn: 132772
2011-06-09 06:38:17 +00:00
Zhongxing Xu 3e4abe5470 singed int causes signed extension, which contradicts the intention to pick up
integers with high 32 bits being zero.

llvm-svn: 132538
2011-06-03 08:29:51 +00:00
Joerg Sonnenberger af5f23ee07 Add new -d option to tblgen. It writes a make(1)-style dependency file.
llvm-svn: 132395
2011-06-01 13:10:15 +00:00
John McCall be6d0c0aea ...this is not a good commit day for me.
llvm-svn: 132294
2011-05-29 19:44:55 +00:00
John McCall 085d891d80 On Darwin ARM, set the UNWIND_RESUME libcall to _Unwind_SjLj_Resume.
This is important for the correct lowering of unwind instructions
(which doesn't matter at all) and llvm.eh.resume calls (which does).

llvm-svn: 132291
2011-05-29 19:39:04 +00:00
Chris Lattner 9f1d2ded13 fix a bug for hosts without round, PR8893.
llvm-svn: 131842
2011-05-22 06:03:53 +00:00
Chris Lattner 6078926e26 random comment cleanups.
llvm-svn: 131829
2011-05-22 00:50:53 +00:00
Andrew Trick d5d0764b3b Have Program::Wait return -2 for crashed and timeouts instead of embedding
info in the error message. Per Dan's request.

llvm-svn: 131780
2011-05-21 00:56:46 +00:00
Benjamin Kramer 0bf26746d9 Rename the "sandybridge" subtarget to "corei7-avx", for GCC compatibility.
llvm-svn: 131730
2011-05-20 15:11:26 +00:00
Rafael Espindola f1bda7c90c Revert my previous patch. The cmake build had already been fixed.
llvm-svn: 131606
2011-05-19 00:02:45 +00:00
Rafael Espindola efbdd80d77 Fix the cmake build.
llvm-svn: 131602
2011-05-18 23:56:40 +00:00
Eli Friedman d1b0f0f1b8 Shuffle StandardPasses.cpp into VMCore; add it to CMake.
llvm-svn: 131600
2011-05-18 23:51:11 +00:00
Eli Friedman fadb03d6cc Third pass at allowing plugins to modify default passes. This time with a tweak so that we don't depend on an uninitialized argument.
llvm-svn: 131581
2011-05-18 21:40:04 +00:00
Eli Friedman 65816ac54d Revert r131556; it's breaking buildbots/clang tests.
llvm-svn: 131567
2011-05-18 20:39:27 +00:00
David Chisnall 13c90786e1 Second pass at allowing plugins to modify default passes. This time without bonus inter-library dependencies.
llvm-svn: 131556
2011-05-18 19:00:41 +00:00
Rafael Espindola 0693182265 Don't include information about the build into the information returned by
getHostTriple. This fixes a 32 bit clang running on a 64 bit ubuntu.

llvm-svn: 131463
2011-05-17 15:26:34 +00:00
Devang Patel 12419aee7a Doug convinced me that DW_AT_APPLE_objc_complete_type is more appropriate name.
s/DW_AT_APPLE_objc_class_extension/DW_AT_APPLE_objc_complete_type/g

llvm-svn: 131244
2011-05-12 21:29:42 +00:00
Devang Patel 2409e7843b Let Objective-C front-end identify class extension, in dwarf output, using an attribute DW_AT_APPLE_objc_class_extension.
llvm-svn: 131238
2011-05-12 19:06:16 +00:00
Andrew Trick 69005e5953 Typo and missing checkin from r131186.
llvm-svn: 131187
2011-05-11 16:44:08 +00:00
Andrew Trick 55aeb55aa3 Bugpoint support for miscompilations that result in a crash.
This change allows bugpoint to pinpoint the "opt" pass and bitcode
segment responsible for a crash caused by miscompilation. At least it
works well for me now, without having to create any custom execution
wrappers.

llvm-svn: 131186
2011-05-11 16:31:24 +00:00
Nick Lewycky e75ffa1b78 In option typo correction, consider -foo=VALUE flags as two distinct parts. The
comments claimed it did this, but the LHS value was actually an unused variable.

The new system considers only the '-foo' part when comparing it for typos
against flags that have values, but still look at the whole string for flags
that don't. That way, we'll still correct '-inst=combine' to '-instcombine'.

llvm-svn: 130685
2011-05-02 05:24:47 +00:00
NAKAMURA Takumi 4471f82e91 Windows/DynamicLibrary.inc: Clean up ELM_Callback. We may check the decl instead of the versions of individual libraries.
autoconf: Add checking ELM_Callback decl for mingw32 and mingw-w64.
cmake/config-ix.cmake: Add checking ELM_Callback decl for win32.

llvm-svn: 130657
2011-05-01 13:29:49 +00:00
Douglas Gregor 0e50682f26 Include <pthread.h> before we use pthread_self/pthread_kill
llvm-svn: 130510
2011-04-29 16:12:17 +00:00
Ted Kremenek e203bbb47e Add MemoryBuffer::getBufferKind() to report whether a memory buffer uses malloc'ed or mmap'ed memory. This is for performance analysis.
llvm-svn: 130432
2011-04-28 20:34:18 +00:00
Lenny Maiorani 367342e209 Remove bounded StringRef::compare() since nothing but Clang SA was using it and it is just as easy to use StringRef::substr() preceding StringRef::compare() to achieve the same thing.
llvm-svn: 130430
2011-04-28 20:20:12 +00:00
Chris Lattner 63e9190f71 allow adding a FoldingSetNodeID to a FastFoldingSetNode, resolving PR9499,
patch by Johannes Schaub!

llvm-svn: 130151
2011-04-25 20:58:50 +00:00
Jay Foad 72e705ed94 Like the coding standards say, do not use "using namespace std".
llvm-svn: 130054
2011-04-23 09:06:00 +00:00
Eric Christopher 3509d2dc95 Add support for 64-bit object files to Path.
llvm-svn: 129975
2011-04-22 03:50:19 +00:00
Devang Patel 6d1e4e9646 Add DW_OP_bit_piece.
llvm-svn: 129945
2011-04-21 22:26:13 +00:00
Daniel Dunbar 8991d611fd sys/Host: Change getHostTriple() to return the full Darwin version on OS X.
llvm-svn: 129852
2011-04-20 15:44:33 +00:00
Justin Holewinski 7d8895e767 PTX: Add intrinsics to list of built-in intrinsics, which allows them to be
used by Clang.  To help Clang integration, the PTX target has been split
     into two targets: ptx32 and ptx64, depending on the desired pointer size.

- Add GCCBuiltin class to all intrinsics
- Split PTX target into ptx32 and ptx64

llvm-svn: 129851
2011-04-20 15:37:17 +00:00
Daniel Dunbar 924699845a ADT/Triple: Drop support for -osx style triples, we are going with -macosx
instead.

llvm-svn: 129836
2011-04-19 23:55:20 +00:00
Daniel Dunbar 0854f347d2 ADT/Triple: Add support for Triple::MacOSX per feedback from Chris, will remove
Triple::OSX once Clang has moved.

llvm-svn: 129833
2011-04-19 23:34:12 +00:00
Daniel Dunbar 163a0966a9 ADT/Triple: Add isOSDarwin() and isOSWindows() helper functions.
llvm-svn: 129815
2011-04-19 21:12:05 +00:00
Daniel Dunbar 3c0fbce10b ADT/Triple: Fix Triple::getArchNameForAssembler to support OSX and iOS
enumeration values.

llvm-svn: 129814
2011-04-19 21:07:03 +00:00
Daniel Dunbar 99f904c72d ADT/Triple: Generalize and simplify getDarwinNumber to just be getOSVersion.
llvm-svn: 129799
2011-04-19 20:24:34 +00:00
Daniel Dunbar d74bac70c4 ADT/Triple: Add support for more explicit "osx" and "ios" OS names.
llvm-svn: 129798
2011-04-19 20:19:27 +00:00
Ted Kremenek 28af26d878 Add BumpPtrAllocator::getTotalMemory() to allow clients to query how much memory a BumpPtrAllocator allocated.
llvm-svn: 129727
2011-04-18 22:44:46 +00:00
Devang Patel 514b4006c2 Introduce support to encode Objective-C property information in debugging information generated for an interface.
llvm-svn: 129624
2011-04-16 00:11:51 +00:00
Lenny Maiorani fad9d95722 Implements StringRef::compare with bounds. It is behaves similarly to strncmp(). Unit tests also included.
llvm-svn: 129582
2011-04-15 17:56:50 +00:00
Chris Lattner 0ab5e2cded Fix a ton of comment typos found by codespell. Patch by
Luis Felipe Strano Moraes!

llvm-svn: 129558
2011-04-15 05:18:47 +00:00
Chris Lattner 0687ec7051 regexes are allowed to match empty things, e.g. {{.*}} in filecheck.
llvm-svn: 129193
2011-04-09 06:29:24 +00:00
Frits van Bommel 87e3367d32 Fix a few instances of "warning: extra ';' outside of a function [-pedantic]".
llvm-svn: 129002
2011-04-06 12:29:56 +00:00
Roman Divacky 92d313a021 Add support for detection of Intel SandyBridge.
llvm-svn: 128920
2011-04-05 20:25:36 +00:00
Andrew Trick 12004013ef Added *hidden* flags -print-options and -print-all-options so
developers can see if their driver changed any cl::Option's. The
current implementation isn't perfect but handles most kinds of
options. This is nice to have when decomposing the stages of
compilation and moving between different drivers. It's also a good
sanity check when comparing results produced by different command line
invocations that are expected to produce the comparable results.

Note: This is not an attempt to prolong the life of cl::Option. On the
contrary, it's a placeholder for a feature that must exist when
cl::Option is replaced by a more appropriate framework. A new
framework needs: a central option registry, dynamic name lookup,
non-global containers of option values (e.g. per-module,
per-function), *and* the ability to print options values and their defaults at
any point during compilation.

llvm-svn: 128910
2011-04-05 18:54:36 +00:00
Eric Christopher ee066fc4f3 Assorted bugfixes in object file handling:
- Adds support for sniffing PE/COFF files on win32 (.exe and .dll)
   which are COFF files that have an MS-DOS compatibility stub on
   the front of them.

 - Fixes a bug in the COFFObjectFile's support for the Microsoft COFF
   extension for long symbol names, wherein it was attempting to parse
   the leading '/' in an extended symbol name reference as part of the
   integer offset.

 - Fixes bugs in COFFObjectFile and ELFObjectFile wherein section
   and symbol iterators were being returned with uninitialized bytes;
   the type DataRefImpl is a union between 2 32-bit words (d.a and d.b)
   and a single intptr_t word (p). Only p was being initialized, so in
   32-bit builds the result would be iterators with random upper 32-bit
   words in their DataRefImpls. This caused random failures when
   seeking around in object files.

Patch by Graydon Hoare!

llvm-svn: 128799
2011-04-03 22:53:19 +00:00
Jakob Stoklund Olesen 846f95080c Reset StringMap's NumTombstones on clears and rehashes.
StringMap was not properly updating NumTombstones after a clear or rehash.

This was not fatal until now because the table was growing faster than
NumTombstones could, but with the previous change of preventing infinite
growth of the table the invariant (NumItems + NumTombstones <= NumBuckets)
stopped being observed, causing infinite loops in certain situations.

Patch by José Fonseca!

llvm-svn: 128567
2011-03-30 18:32:51 +00:00
Jakob Stoklund Olesen bdc1b01217 Prevent infinite growth of SmallPtrSet instances.
Rehash but don't grow when full of tombstones.

Patch by José Fonseca!

llvm-svn: 128566
2011-03-30 18:32:48 +00:00
Jakob Stoklund Olesen f587f4419c Prevent infinite growth of SmallMap instances.
Rehash but don't grow when full of tombstones.

Patch by José Fonseca!

llvm-svn: 128565
2011-03-30 18:32:44 +00:00
Benjamin Kramer af0ed953c5 Avoid turning a floating point division with a constant power of two into a denormal multiplication.
Some platforms may treat denormals as zero, on other platforms multiplication
with a subnormal is slower than dividing by a normal.

llvm-svn: 128555
2011-03-30 17:02:54 +00:00
Benjamin Kramer 03fd672609 Add APFloat::getExactInverse.
The idea is, that if an ieee 754 float is divided by a power of two, we can
turn the division into a cheaper multiplication. This function sees if we can
get an exact multiplicative inverse for a divisor and returns it if possible.

This is the hard part of PR9587.

I tested many inputs against llvm-gcc's frotend implementation of this
optimization and didn't find any difference. However, floating point is the
land of weird edge cases, so any review would be appreciated.

llvm-svn: 128545
2011-03-30 15:42:27 +00:00
Frits van Bommel 0bb2ad2cf7 Constant folding support for calls to umul.with.overflow(), basically identical to the smul.with.overflow() code.
llvm-svn: 128379
2011-03-27 14:26:13 +00:00
Andrew Trick a4ec5b2c19 revert r128199 until it can be made to work with Frontend/dependency-gen.c.
llvm-svn: 128218
2011-03-24 16:43:37 +00:00
Michael J. Spencer e42162ad59 Remove all uses of PATH_MAX and MAXPATHLEN from PathV2.
llvm-svn: 128199
2011-03-24 05:23:40 +00:00
Rafael Espindola 2475adce37 We don't need a null terminator for the output file.
llvm-svn: 128098
2011-03-22 19:20:47 +00:00
Ted Kremenek 857e535520 Properly initialize all fields in CrashReporterCleanupContext. This caused the buildbot failure earlier.
llvm-svn: 128071
2011-03-22 04:33:13 +00:00
Ted Kremenek 9931652775 Temporarily stop recovering resources in CrashRecoveryContext while I investigate further why this works on my machine and not on others.
llvm-svn: 128065
2011-03-22 02:06:32 +00:00
Ted Kremenek ab1a242ead Provide a means for CrashRecovery clients to determine if code is currently running while crash recovery cleanups are being processed.
llvm-svn: 128008
2011-03-21 18:38:03 +00:00