Fariborz Jahanian [Wed, 3 Jul 2013 23:44:11 +0000 (23:44 +0000)]
Minor refactoring of my last patch.
llvm-svn: 185593
Stephen Lin [Wed, 3 Jul 2013 23:39:13 +0000 (23:39 +0000)]
Have ARMBaseRegisterInfo::getCallPreservedMask return the 'correct' mask for the GHC calling convention.
This is purely academic because GHC calls are always tail calls so the register mask will never be used; however, this change makes the code clearer and brings the ARM implementation of the GHC calling convention in line with the X86 implementation. Also, it might save someone else some time trying to figuring out what is happening...
llvm-svn: 185592
Fariborz Jahanian [Wed, 3 Jul 2013 23:05:00 +0000 (23:05 +0000)]
[ObjectiveC Migration]: Provide knobs for
migrating setter/getter methods to an eventual
property declaraiton. This is wip.
// rdar://
14345082
llvm-svn: 185591
Sebastian Pop [Wed, 3 Jul 2013 22:50:36 +0000 (22:50 +0000)]
scop detection: early return
to reduce indentation level
No functionality changed.
llvm-svn: 185590
Eric Christopher [Wed, 3 Jul 2013 22:40:21 +0000 (22:40 +0000)]
Hoist all of the Entry.getLoc() calls int a single variable.
llvm-svn: 185589
Eric Christopher [Wed, 3 Jul 2013 22:40:18 +0000 (22:40 +0000)]
Make DotDebugLocEntry a class, reorder the members along with comments
for them and update all uses.
llvm-svn: 185588
Quentin Colombet [Wed, 3 Jul 2013 21:42:57 +0000 (21:42 +0000)]
[ARM] Improve the instruction selection of vector loads.
In the ARM back-end, build_vector nodes are lowered to a target specific
build_vector that uses floating point type.
This works well, unless the inserted bitcasts survive until instruction
selection. In that case, they incur moves between integer unit and floating
point unit that may result in inefficient code.
In other words, this conversion may introduce artificial dependencies when the
code leading to the build vector cannot be completed with a floating point type.
In particular, this happens when loads are not aligned.
Before this patch, in that case, the compiler generates general purpose loads
and creates the floating point vector from them, instead of directly using the
vector unit.
The patch uses a vector friendly sequence of code when the inserted bitcasts to
floating point survived DAGCombine.
This is done by a target specific DAGCombine that changes the target specific
build_vector into a sequence of insert_vector_elt that get rid of the bitcasts.
<rdar://problem/
14170854>
llvm-svn: 185587
Eric Christopher [Wed, 3 Jul 2013 21:37:03 +0000 (21:37 +0000)]
Elaborate on comment.
llvm-svn: 185586
Eric Christopher [Wed, 3 Jul 2013 21:23:59 +0000 (21:23 +0000)]
Add names to the header file since they help in documenting the API
(and for consistency).
llvm-svn: 185585
Roman Divacky [Wed, 3 Jul 2013 21:08:41 +0000 (21:08 +0000)]
Check LongDoubleFormat instead of just Width as this is PowerPC specific.
llvm-svn: 185584
Bill Schmidt [Wed, 3 Jul 2013 21:03:35 +0000 (21:03 +0000)]
[PowerPC] FreeBSD does not require f128 in its data layout string.
Long double is 64 bits on FreeBSD PPC, so the f128 entry is superfluous.
llvm-svn: 185583
Bill Schmidt [Wed, 3 Jul 2013 21:03:06 +0000 (21:03 +0000)]
[PowerPC] FreeBSD does not require f128 in its data layout string.
Long double is 64 bits on FreeBSD PPC, so the f128 entry is superfluous.
llvm-svn: 185582
Renato Golin [Wed, 3 Jul 2013 20:56:33 +0000 (20:56 +0000)]
Add platform specific tests doc
llvm-svn: 185581
Bill Schmidt [Wed, 3 Jul 2013 20:54:09 +0000 (20:54 +0000)]
"bool" should be a context-sensitive keyword in Altivec mode.
PR16456 reported that Clang implements a hybrid between AltiVec's
"Keyword and Predefine Method" and its "Context Sensitive Keyword
Method," where "bool" is always a keyword, but "vector" and "pixel"
are context-sensitive keywords. This isn't permitted by the AltiVec
spec. For consistency with gcc, this patch implements the Context
Sensitive Keyword Method for bool, and stops treating true and false
as keywords in Altivec mode.
The patch removes KEYALTIVEC as a trigger for defining these keywords
in include/clang/Basic/TokenKinds.def, and adds logic for "vector
bool" that mirrors the existing logic for "vector pixel." The test
case is taken from the bug report.
llvm-svn: 185580
Daniel Malea [Wed, 3 Jul 2013 20:51:44 +0000 (20:51 +0000)]
Remove @expectedFailureGcc from TestInlineStepping as function prologue bug is not reproducible anymore.
llvm-svn: 185579
Roman Divacky [Wed, 3 Jul 2013 20:48:06 +0000 (20:48 +0000)]
Add support for TF/TC modes available on eg. PowerPC64.
llvm-svn: 185578
Manman Ren [Wed, 3 Jul 2013 20:45:07 +0000 (20:45 +0000)]
Update testing cases to check dwarf-2 for Darwin.
llvm-svn: 185577
Daniel Malea [Wed, 3 Jul 2013 20:44:40 +0000 (20:44 +0000)]
Skip Test-rdar-9974002 with Clang 3.4 (due to llvm.org/pr16214)
- should resolve remaining failures on clang buildbot
llvm-svn: 185576
Tilmann Scheller [Wed, 3 Jul 2013 20:38:01 +0000 (20:38 +0000)]
ARM: Prevent ARMAsmParser::shouldOmitCCOutOperand() from misidentifying certain Thumb2 add immediate T3 encodings.
Before the fix Thumb2 instructions of type "add rD, rN, #imm" (T3 encoding, see ARM ARM A8.8.4) with rD and rN both being low registers (r0-r7) were classified as having the T4 encoding.
The T4 encoding doesn't have a cc_out operand so for above instructions the operand gets erroneously removed, corrupting the token stream and leading to parse errors later in the process.
This bug prevented "add r1, r7, #0xcbcbcbcb" from being assembled correctly.
Fixes <rdar://problem/
14224440>.
llvm-svn: 185575
Chad Rosier [Wed, 3 Jul 2013 20:37:50 +0000 (20:37 +0000)]
Revert r185557 as it was a bit (a lot) premature.
llvm-svn: 185574
Eric Christopher [Wed, 3 Jul 2013 20:36:36 +0000 (20:36 +0000)]
Move typedefs inside the class that they belong to.
llvm-svn: 185573
Roman Divacky [Wed, 3 Jul 2013 19:45:54 +0000 (19:45 +0000)]
Dont define __LONG_DOUBLE_128__ unless LongDoubleWidth is really 128bits width.
It's not the case on ie. FreeBSD.
llvm-svn: 185572
Daniel Malea [Wed, 3 Jul 2013 19:34:25 +0000 (19:34 +0000)]
Add missing -std=c99 flag to appease GCC 4.6
- this issue was detected on recent GCC buildbot runs
llvm-svn: 185571
Daniel Malea [Wed, 3 Jul 2013 19:29:46 +0000 (19:29 +0000)]
Re-apply TestHelp.py fix
llvm-svn: 185570
Marshall Clow [Wed, 3 Jul 2013 19:20:30 +0000 (19:20 +0000)]
Commit patch for integer sequences. Suggested by Richard, reworked by Howard, and annotated by me
llvm-svn: 185569
Eli Bendersky [Wed, 3 Jul 2013 19:19:12 +0000 (19:19 +0000)]
Add target hook CodeGen queries when generating builtin pow*.
Without fmath-errno, Clang currently generates calls to @llvm.pow.* intrinsics
when it sees pow*(). This may not be suitable for all targets (for
example le32/PNaCl), so the attached patch adds a target hook that CodeGen
queries. The target can state its preference for having or not having the
intrinsic generated. Non-PNaCl behavior remains unchanged;
PNaCl-specific test added.
llvm-svn: 185568
Daniel Malea [Wed, 3 Jul 2013 18:50:03 +0000 (18:50 +0000)]
Fix python 2.6 compatibility issue introduced by r184615
- argparse_compat library does not support reading environment variables
- should unblock Linux GCC buildbot from running tests again
llvm-svn: 185567
Chad Rosier [Wed, 3 Jul 2013 18:38:08 +0000 (18:38 +0000)]
Use an RWMutex instead of a Mutex in PassRegistry.
Patch by Alex Crichton <alex@crichton.co>. Approved by Chris Lattner.
llvm-svn: 185566
Richard Smith [Wed, 3 Jul 2013 18:35:53 +0000 (18:35 +0000)]
Enable -ffreestanding for this test, to avoid #include_next'ing the system's
<stdint.h> (which might not exist or might not work).
llvm-svn: 185565
Ulrich Weigand [Wed, 3 Jul 2013 18:29:47 +0000 (18:29 +0000)]
[PowerPC] Support lmw/stmw in the asm parser
This adds support for the load/store multiple instructions,
currently used by the asm parser only.
llvm-svn: 185564
Bill Schmidt [Wed, 3 Jul 2013 18:21:12 +0000 (18:21 +0000)]
Provide test case for commit r185544.
Verify that assembling an empty file does not auto-include altivec.h.
llvm-svn: 185563
Eli Friedman [Wed, 3 Jul 2013 18:06:11 +0000 (18:06 +0000)]
Add file suffix for assembler-with-cpp.
Fixes crash when trying to recover from a crash on an assembler-with-cpp
file. (Not sure how to write a testcase.)
llvm-svn: 185562
Ulrich Weigand [Wed, 3 Jul 2013 17:59:07 +0000 (17:59 +0000)]
[PowerPC] Use mtocrf when available
Just as with mfocrf, it is also preferable to use mtocrf instead of
mtcrf when only a single CR register is to be written.
Current code however always emits mtcrf. This probably does not matter
when using an external assembler, since the GNU assembler will in fact
automatically replace mtcrf with mtocrf when possible. It does create
inefficient code with the integrated assembler, however.
To fix this, this patch adds MTOCRF/MTOCRF8 instruction patterns and
uses those instead of MTCRF/MTCRF8 everything. Just as done in the
MFOCRF patch committed as 185556, these patterns will be converted
back to MTCRF if MTOCRF is not available on the machine.
As a side effect, this allows to modify the MTCRF pattern to accept
the full range of mask operands for the benefit of the asm parser.
llvm-svn: 185561
Daniel Malea [Wed, 3 Jul 2013 17:58:31 +0000 (17:58 +0000)]
Revert commits that cause broken builds on GCC buildbots
- build fails due to PyCallable template definition inside an extern "C" scope
This commit reverts 185240, 184893 and 184608.
llvm-svn: 185560
Ed Maste [Wed, 3 Jul 2013 17:41:40 +0000 (17:41 +0000)]
Remove empty files left behind from move to POSIX/
llvm-svn: 185559
Howard Hinnant [Wed, 3 Jul 2013 17:39:28 +0000 (17:39 +0000)]
Matthew Dempsky: Attached patch replaces the type punning with memcpy(), which on
x86/x86-64 clang optimizes to direct word accesses anyway. This fixes an unaligned word access in murmurhash/cityhash.
llvm-svn: 185558
Chad Rosier [Wed, 3 Jul 2013 17:25:50 +0000 (17:25 +0000)]
Chris has agree to take part ownership of the driver.
llvm-svn: 185557
Ulrich Weigand [Wed, 3 Jul 2013 17:05:42 +0000 (17:05 +0000)]
[PowerPC] Always use mfocrf if available
When accessing just a single CR register, it is always preferable to
use mfocrf instead of mfcr, if the former is available on the CPU.
Current code makes that distinction in many, but not all places
where a single CR register value is retrieved. One missing
location is PPCRegisterInfo::lowerCRSpilling.
To fix this and make this simpler in the future, this patch changes
the bulk of the back-end to always assume mfocrf is available and
simply generate it when needed.
On machines that actually do not support mfocrf, the instruction
is replaced by mfcr at the very end, in EmitInstruction.
This has the additional benefit that we no longer need the
MFCRpseud hack, since before EmitInstruction we always have
a MFOCRF instruction pattern, which already models data flow
as required.
The patch also adds the MFOCRF8 version of the instruction,
which was missing so far.
Except for the PPCRegisterInfo::lowerCRSpilling case, no change
in generated code intended.
llvm-svn: 185556
Jordan Rose [Wed, 3 Jul 2013 16:42:02 +0000 (16:42 +0000)]
[scan-build] Log compiler invocation to stderr, not stdout.
This is important for preprocessing steps, which may output to stdout.
Also, change ENV accesses using barewords to use string keys instead.
PR16414
llvm-svn: 185555
Rafael Espindola [Wed, 3 Jul 2013 16:41:29 +0000 (16:41 +0000)]
Prefix failing commands with not to make clear they are expected to fail.
llvm-svn: 185554
Michael Sartain [Wed, 3 Jul 2013 16:35:41 +0000 (16:35 +0000)]
Symbol prologue code checks if funciton lines up with symbol and uses function prologue code with line info if so.
Differential Revision: http://llvm-reviews.chandlerc.com/D1082
llvm-svn: 185553
Rafael Espindola [Wed, 3 Jul 2013 16:35:26 +0000 (16:35 +0000)]
Remove another old test.
It was only passing because 'grep andpd' was not finding any andpd, but
we don't fail if part of a pipe fails.
llvm-svn: 185552
Rafael Espindola [Wed, 3 Jul 2013 16:30:01 +0000 (16:30 +0000)]
Remove test for the old EH system. It doesn't parse anymore.
llvm-svn: 185551
Rafael Espindola [Wed, 3 Jul 2013 16:27:55 +0000 (16:27 +0000)]
Fix test: It was missing run lines and llvm-dis has no -disable-verify option.
llvm-svn: 185550
Ed Maste [Wed, 3 Jul 2013 16:26:34 +0000 (16:26 +0000)]
Update error message; detach-keeps-stopped is also not on FreeBSD
llvm-svn: 185549
Jordan Rose [Wed, 3 Jul 2013 16:20:29 +0000 (16:20 +0000)]
With CLANG_ENABLE_STATIC_ANALYZER=0, link clang properly and skip clang-check.
Previously, the CMake build still tried to link clang against the static
analyzer libraries, even if CLANG_ENABLE_STATIC_ANALYZER was off.
Furthermore, clang-check depends on the analyzer, so it should be disabled
(in both CMake and configure builds).
In theory, clang-check could be made to conditionally include analyzer
support (like clang itself), but for now this at least gets a CMake ALL_BUILD
working.
Patch by Stephen Kelly, modified by me.
llvm-svn: 185548
Rafael Espindola [Wed, 3 Jul 2013 15:57:14 +0000 (15:57 +0000)]
Add support for gnu archives with a string table and no symtab.
While there, use early returns to reduce nesting.
llvm-svn: 185547
Rafael Espindola [Wed, 3 Jul 2013 15:46:03 +0000 (15:46 +0000)]
Make llvm-nm return 1 on error.
This is a small compatibility improvement with gnu nm and makes llvm-nm more
useful as a testing tool.
llvm-svn: 185546
Bill Schmidt [Wed, 3 Jul 2013 15:36:02 +0000 (15:36 +0000)]
Fix PR16454: Don't #include altivec.h when preprocessing assembly.
When the -maltivec flag is present, altivec.h is auto-included for the
compilation. This is not appropriate when the job action is to
preprocess a file containing assembly code. So don't do that.
I was unable to convert the test in the bug report into a regression
test. The original symptom was exposed with:
% touch x.S
% ./bin/clang -target powerpc64-unknown-linux-gnu -maltivec -S -o - x.S
I tried this test (and numerous variants) on a PPC64 system:
----------------------------------------------------------------------------
// RUN: touch %t
// RUN: %clang -maltivec -S %t -o - | FileCheck %s
// Verify that assembling an empty file does not auto-include altivec.h.
// CHECK-NOT: static vector
----------------------------------------------------------------------------
However, this test passes for some reason even on a clang built
without the fix. I'd be happy to add a test case but at this point
I'm not able to figure one out, and I don't want to hold up the patch
unnecessarily. Please let me know if you have ideas.
Thanks,
Bill
llvm-svn: 185544
Serge Pavlov [Wed, 3 Jul 2013 15:32:48 +0000 (15:32 +0000)]
Test case for PR7887 - failed with asm("")
llvm-svn: 185543
Ulrich Weigand [Wed, 3 Jul 2013 15:13:30 +0000 (15:13 +0000)]
[PowerPC] Remove dead code from PPCDAGToDAGISel::SelectSETCC
The subroutine getCRIdxForSetCC has a parameter "Other" and comment:
If this returns with Other != -1, then the returned comparison
is an or of two simpler comparisons.
However for at least the last five years this routine has never
returned a value of Other != -1; these cases are now handled
differently to begin with.
This patch removes the parameter and the code in SelectSETCC that
attempted to handle the Other != -1 case.
llvm-svn: 185541
Craig Topper [Wed, 3 Jul 2013 15:07:05 +0000 (15:07 +0000)]
Use SmallVectorImpl::iterator/const_iterator instead of SmallVector to avoid specifying the vector size.
llvm-svn: 185540
Craig Topper [Wed, 3 Jul 2013 14:48:37 +0000 (14:48 +0000)]
Fix regular expression used by 'make update' to only look for 'I' and '?' at the start of svn info results and to check for spaces after 'I' instead of just after '?'.
Previously it was able to match 'I' anywhere in the filenames of the svn info results instead of just files that where ignored or unknown to svn. This would cause 'make update' to infinitely recurse if a file was modified with I anywhere in its name since svn info would return a Path pointing to the llvm root for those files.
llvm-svn: 185539
Evgeniy Stepanov [Wed, 3 Jul 2013 14:39:14 +0000 (14:39 +0000)]
[msan] Unpoison stack allocations and undef values in blacklisted functions.
This changes behavior of -msan-poison-stack=0 flag from not poisoning stack
allocations to actively unpoisoning them.
llvm-svn: 185538
Rafael Espindola [Wed, 3 Jul 2013 14:14:00 +0000 (14:14 +0000)]
We don't need to know the OpenSUSE version, so don't parse it.
Patch by Johannes Obermayr.
llvm-svn: 185537
Sergey Matveev [Wed, 3 Jul 2013 13:45:13 +0000 (13:45 +0000)]
[sanitizer] Fix memory leak in sanitizer_common discovered by LeakSanitizer.
llvm-svn: 185536
Edwin Vane [Wed, 3 Jul 2013 13:21:24 +0000 (13:21 +0000)]
cpp11-migrate: Add Replace-AutoPtr Transform
Add a new transform to replace uses of 'std::auto_ptr' by 'std::unique_ptr'.
Copy-ctor and assign-operator are wrapped with a call to 'std::move()'.
Note that until header modification is ready it is not that useful, that's why
it's marked as (EXPERIMENTAL) in the command line description and a "Known
Limitations" section is present in the transform documentation.
Author: Guillaume Papin <guillaume.papin@epitech.eu>
llvm-svn: 185535
Rui Ueyama [Wed, 3 Jul 2013 12:55:56 +0000 (12:55 +0000)]
[PECOFF][Writer] Fix SizeOfImage header. It should include the first unmapped page.
llvm-svn: 185534
Ulrich Weigand [Wed, 3 Jul 2013 12:51:09 +0000 (12:51 +0000)]
[PowerPC] Make specialized AltiVec patterns isCodeGenOnly
A couple of AltiVec patterns are just specialized forms of the
generic instruction pattern, and should therefore be marked
isCodeGenOnly to avoid confusing the asm parser:
VCFSX_0, VCTUXS_0, VCFUX_0, VCTSXS_0, and V_SETALLONES.
Noticed by inspection of the generated PPCGenAsmMatcher.inc.
llvm-svn: 185533
Ulrich Weigand [Wed, 3 Jul 2013 12:32:41 +0000 (12:32 +0000)]
[PowerPC] Support mtspr/mfspr in the asm parser
This adds support for the generic forms of mtspr/mfspr
for the asm parser. The compiler will continue to use
the specialized patters for mtlr etc. since those are
needed to correctly describe data flow.
llvm-svn: 185532
Daniel Jasper [Wed, 3 Jul 2013 12:22:18 +0000 (12:22 +0000)]
Prevent error message when formatting an empty file.
This fixes llvm.org/PR16514.
llvm-svn: 185531
Daniel Jasper [Wed, 3 Jul 2013 10:34:47 +0000 (10:34 +0000)]
Don't insert confusing line breaks in comparisons.
In general, clang-format breaks after an operator if the LHS spans
multiple lines. Otherwise, this can lead to confusing effects and
effectively hide the operator precendence, e.g. in
if (
aaaaaaaaaaaaaa ==
bbbbbbbbbbbbbb && c) { ...
This patch removes this rule for comparisons, if the LHS is not a binary
expression itself as many users were wondering why clang-format inserts
an unnecessary linebreak.
Before:
if (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) >
5) { ...
After:
if (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) > 5) { ...
In the long run, we might:
- Want to do this for other binary expressions as well.
- Do this only if the RHS is short or even only if it is a literal.
llvm-svn: 185530
Richard Sandiford [Wed, 3 Jul 2013 10:10:02 +0000 (10:10 +0000)]
[SystemZ] Fold more spills
Add a mapping from register-based <INSN>R instructions to the corresponding
memory-based <INSN>. Use it to cut down on the number of spill loads.
Some instructions extend their operands from smaller fields, so this
required a new TSFlags field to say how big the unextended operand is.
This optimisation doesn't trigger for C(G)R and CL(G)R because in practice
we always combine those instructions with a branch. Adding a test for every
other case probably seems excessive, but it did catch a missed optimisation
for DSGF (fixed in r185435).
llvm-svn: 185529
Mihai Popa [Wed, 3 Jul 2013 09:21:44 +0000 (09:21 +0000)]
This corrects the implementation of Thumb ADR instruction. There are three issues:
1. it should accept only 4-byte aligned addresses
2. the maximum offset should be 1020
3. it should be encoded with the offset scaled by two bits
llvm-svn: 185528
Tim Northover [Wed, 3 Jul 2013 09:20:36 +0000 (09:20 +0000)]
ARM: relax the atomic release barrier to "dmb ishst" on Swift
Swift cores implement store barriers that are stronger than the ARM
specification but weaker than general barriers. They are, in fact, just about
enough to provide the ordering needed for atomic operations with release
semantics.
This patch makes use of that quirk.
llvm-svn: 185527
Richard Sandiford [Wed, 3 Jul 2013 09:19:58 +0000 (09:19 +0000)]
[SystemZ] Rename mapping table fields
Rename Function->DispKey and PairType->DispSize. I'd originally used
"Function" because I thought it might be useful for other InstMappings.
However, it turns out that having two very similar instructions with the
same Function makes it pretty useless for anything other than the displacement
size key. Other InstMappings will want the key to be defined for only one
instruction in the pair.
No behavioural change intended.
llvm-svn: 185526
Richard Sandiford [Wed, 3 Jul 2013 09:11:00 +0000 (09:11 +0000)]
[SystemZ] Fix caller-allocated save slot FIXME
Get rid of some old code (and associated FIXME) for handling the
caller-allocated register save area. No behavioural change intended.
llvm-svn: 185525
Rui Ueyama [Wed, 3 Jul 2013 09:09:13 +0000 (09:09 +0000)]
Guard a test that fails on a Release build.
llvm-svn: 185524
Eric Christopher [Wed, 3 Jul 2013 08:26:07 +0000 (08:26 +0000)]
Remove unused field.
llvm-svn: 185523
Pavel Labath [Wed, 3 Jul 2013 08:23:49 +0000 (08:23 +0000)]
[analyzer] Improve handling of noreturn destructors
Summary:
The analyzer incorrectly handled noreturn destructors which were hidden inside
function calls. This happened because NoReturnFunctionChecker only listened for
PostStmt events, which are not executed for destructor calls. I've changed it to
listen to PostCall events, which should catch both cases.
Reviewers: jordan_rose
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1056
llvm-svn: 185522
Rui Ueyama [Wed, 3 Jul 2013 08:15:00 +0000 (08:15 +0000)]
[PECOFF][Writer] Separate AtomChunk from SectionChunk.
The optional data directory header contains addresses to some atoms such
as the import address table in data section. Such fields can naturally
be set by relocation if we make the optional data driectory as an atom.
Currently we assume that atoms are always in a section, so we can't create
a file header with atoms. This patch separates section chunk from atom
chunk, to allow atom-based file header.
llvm-svn: 185521
Eric Christopher [Wed, 3 Jul 2013 08:13:55 +0000 (08:13 +0000)]
Constify a few functions.
llvm-svn: 185520
Richard Osborne [Wed, 3 Jul 2013 07:49:03 +0000 (07:49 +0000)]
[XCore] Whitespace fixes, no functionality change.
llvm-svn: 185519
Richard Osborne [Wed, 3 Jul 2013 07:48:50 +0000 (07:48 +0000)]
[XCore] Add ISel pattern for LDWCP
Patch by Robert Lytton.
llvm-svn: 185518
Rui Ueyama [Wed, 3 Jul 2013 07:32:40 +0000 (07:32 +0000)]
Add "explicit" to ctors where appropriate.
llvm-svn: 185517
Rui Ueyama [Wed, 3 Jul 2013 06:09:33 +0000 (06:09 +0000)]
[PECOFF] Handle hint field in Hint/Name table in the import library.
A hint is an index of the export pointer table in a DLL, at which
PE/COFF loader starts looking for a symbol name. The import library
comes with hints and symbol pairs, and as long as hints are in sync
with the actual symbol table in DLL, the symbols will be resolved
quickly. So, we shouldn't ignore hints but propagate them to an output.
llvm-svn: 185516
Rui Ueyama [Wed, 3 Jul 2013 05:44:09 +0000 (05:44 +0000)]
[PECOFF][Writer] Simplifies the COFFBaseDefinedAtom ctor by defining a new class.
llvm-svn: 185515
Craig Topper [Wed, 3 Jul 2013 05:18:47 +0000 (05:18 +0000)]
Use SmallVectorImpl::const_iterator instead of SmallVector to avoid specifying the vector size.
llvm-svn: 185514
Craig Topper [Wed, 3 Jul 2013 05:16:59 +0000 (05:16 +0000)]
Use SmallVectorImpl instead of SmallVector as method argument to avoid specifying vector size.
llvm-svn: 185513
Craig Topper [Wed, 3 Jul 2013 05:11:49 +0000 (05:11 +0000)]
Use SmallVectorImpl instead of SmallVector for iterators and references to avoid specifying the vector size unnecessarily.
llvm-svn: 185512
Eric Christopher [Wed, 3 Jul 2013 05:01:24 +0000 (05:01 +0000)]
Use SmallVectorImpl::iterator/const_iterator instead of SmallVector
to avoid specifying the vector size.
llvm-svn: 185511
Jason Molenda [Wed, 3 Jul 2013 04:52:51 +0000 (04:52 +0000)]
Remove lldb's custom copy of the C++ demangler, used only on Mac
OS X. Testsuite shows no change in results using the system runtime's
demangler.
<rdar://problem/
12029914>
llvm-svn: 185510
Craig Topper [Wed, 3 Jul 2013 04:42:33 +0000 (04:42 +0000)]
Use SmallVectorImpl::iterator/const_iterator instead of SmallVector to avoid specifying the vector size.
llvm-svn: 185509
Craig Topper [Wed, 3 Jul 2013 04:40:27 +0000 (04:40 +0000)]
Introduce some typedefs for DenseMaps containing SmallVectors so the vector size doesn't have to repeated when creating iterators for the DenseMap.
llvm-svn: 185508
Craig Topper [Wed, 3 Jul 2013 04:30:58 +0000 (04:30 +0000)]
Return SmallVectorImpl& instead of SmallVector& in a couple places to avoid having to specify the vector size in multiple places.
llvm-svn: 185507
Craig Topper [Wed, 3 Jul 2013 04:27:31 +0000 (04:27 +0000)]
Add a space between type and variable name. No functional change.
llvm-svn: 185506
Craig Topper [Wed, 3 Jul 2013 04:24:43 +0000 (04:24 +0000)]
Use SmallVectorImpl& instead of SmallVector& to avoid needlessly respecifying the small vector size.
llvm-svn: 185505
Craig Topper [Wed, 3 Jul 2013 04:17:25 +0000 (04:17 +0000)]
Use SmallVectorImpl::iterator/const_iterator instead of SmallVector to avoid specifying the vector size.
llvm-svn: 185504
Michael Gottesman [Wed, 3 Jul 2013 04:15:22 +0000 (04:15 +0000)]
Change the gettimeofday test to only test on a posix platform.
llvm-svn: 185503
Michael Gottesman [Wed, 3 Jul 2013 04:00:54 +0000 (04:00 +0000)]
Added support in FunctionAttrs for adding relevant function/argument attributes for the posix call gettimeofday.
This implies annotating it as nounwind and its arguments as nocapture. To be
conservative, we do not annotate the arguments with noalias since some platforms
do not have restrict on the declaration for gettimeofday.
llvm-svn: 185502
Michael Gottesman [Wed, 3 Jul 2013 04:00:51 +0000 (04:00 +0000)]
Added posix function gettimeofday to LibFunc::Func for all platforms but Windows.
*NOTE* In a recent version of posix, they added the restrict keyword to the
arguments for this function. From some spelunking it seems that on some
platforms, the call has restrict on its arguments and others it does not. Thus I
left off the restrict keyword from the function prototype in the comment.
llvm-svn: 185501
Eric Christopher [Wed, 3 Jul 2013 02:23:53 +0000 (02:23 +0000)]
Avoid doing a lot of computation when we have multiple ranges and
avoid adding information for the debug_inlined section when it isn't
going to be emitted anyhow.
llvm-svn: 185500
NAKAMURA Takumi [Wed, 3 Jul 2013 02:20:49 +0000 (02:20 +0000)]
SystemZInstrInfo.cpp: Tweak an assertion. [-Wunused-variable]
llvm-svn: 185499
Eric Christopher [Wed, 3 Jul 2013 01:57:28 +0000 (01:57 +0000)]
Move iterator to where it's used and update comments.
llvm-svn: 185498
Eric Christopher [Wed, 3 Jul 2013 01:57:26 +0000 (01:57 +0000)]
Move instance variable before experimental section.
llvm-svn: 185497
Eric Christopher [Wed, 3 Jul 2013 01:57:23 +0000 (01:57 +0000)]
Fix typo to make grep for DW_AT_comp_dir work without case-insensitive
grep.
llvm-svn: 185496
Eric Christopher [Wed, 3 Jul 2013 01:57:20 +0000 (01:57 +0000)]
Remove unnecessary forward declare.
llvm-svn: 185495
Michael Sartain [Wed, 3 Jul 2013 01:52:14 +0000 (01:52 +0000)]
Fix ObjectFileELF crc32 code used when no build id is present.
Differential Revision: http://llvm-reviews.chandlerc.com/D1081
llvm-svn: 185494
Serge Pavlov [Wed, 3 Jul 2013 01:43:57 +0000 (01:43 +0000)]
Fixed test options.
llvm-svn: 185493
Eric Christopher [Wed, 3 Jul 2013 01:22:29 +0000 (01:22 +0000)]
Add a helpful comment.
llvm-svn: 185492