Commit Graph

150456 Commits

Author SHA1 Message Date
Kostya Serebryany 831a1d7cec [sanitizer] introduce LargeMmapAllocator::GetBlockBeginFastSingleThreaded, required for LeakSanitizer to work faster. Also fix lint.
llvm-svn: 182917
2013-05-30 08:43:30 +00:00
Manuel Klimek 8910d192d0 Add asserts to guard against regressions.
llvm-svn: 182916
2013-05-30 07:45:53 +00:00
Alexander Potapenko a8b41762e4 [ASan] Minor cleanup: remove a couple of unused variables.
llvm-svn: 182915
2013-05-30 07:30:07 +00:00
Daniel Jasper 35d2cd04d6 Fix warning on varialbe unused in opt builds.
llvm-svn: 182914
2013-05-30 07:01:43 +00:00
Daniel Jasper 51fb2b2151 Fix crasher when formatting certain block comments.
Smallest reproduction:
/*
**
*/

llvm-svn: 182913
2013-05-30 06:40:07 +00:00
Rui Ueyama b33e8bcef8 [WinLink][Driver] Handle file extensions and defualt output file name.
llvm-svn: 182912
2013-05-30 06:00:10 +00:00
Serge Pavlov 96409f9b50 Added documentation to TypeVisitor. No code changes.
llvm-svn: 182911
2013-05-30 05:04:43 +00:00
Galina Kistanova 5308abb22a Fixed bug when tests in executable partially used absolute paths.
llvm-svn: 182910
2013-05-30 04:56:28 +00:00
Nick Lewycky d7f27094c0 Swizzle vector inputs if it helps us eliminate shuffles.
llvm-svn: 182909
2013-05-30 04:33:38 +00:00
Rafael Espindola 4f60a38f18 Change how we iterate over relocations on ELF.
For COFF and MachO, sections semantically have relocations that apply to them.
That is not the case on ELF.

In relocatable objects (.o), a section with relocations in ELF has offsets to
another section where the relocations should be applied.

In dynamic objects and executables, relocations don't have an offset, they have
a virtual address. The section sh_info may or may not point to another section,
but that is not actually used for resolving the relocations.

This patch exposes that in the ObjectFile API. It has the following advantages:

* Most (all?) clients can handle this more efficiently. They will normally walk
all relocations, so doing an effort to iterate in a particular order doesn't
save time.

* llvm-readobj now prints relocations in the same way the native readelf does.

* probably most important, relocations that don't point to any section are now
visible. This is the case of relocations in the rela.dyn section. See the
updated relocation-executable.test for example.

llvm-svn: 182908
2013-05-30 03:05:14 +00:00
Aaron Ballman 194a79e152 Switching the tests to use size_t instead of unsigned int to hopefully appease the Linux x64 build bot (take 2, forgot this test case).
llvm-svn: 182907
2013-05-30 02:17:14 +00:00
Aaron Ballman 12354641fe Switching the tests to use size_t instead of unsigned int to hopefully appease the Linux x64 build bot.
llvm-svn: 182906
2013-05-30 02:02:23 +00:00
Aaron Ballman 324fbeeba7 Add support to fallback on operator new when a placement operator new[] is called for which there is no valid declaration. This fallback only happens in Microsoft compatibility mode. This patch addresses PR13164, and improves support for the WDK.
llvm-svn: 182905
2013-05-30 01:55:39 +00:00
Jordan Rose 543bdd1237 [analyzer; new edges] In for(;;), use the ForStmt itself for loop notes.
Most loop notes (like "entering loop body") are attached to the condition
expression guarding a loop or its equivalent. For loops may not have a
condition expression, though. Rather than crashing, just use the entire
ForStmt as the location. This is probably the best we can do.

<rdar://problem/14016063>

llvm-svn: 182904
2013-05-30 01:05:58 +00:00
Eric Christopher d1c5a31721 Rename variable to be more descriptive.
llvm-svn: 182903
2013-05-30 00:43:35 +00:00
Eric Christopher 1e1c7f1b15 Formatting.
llvm-svn: 182902
2013-05-30 00:43:32 +00:00
Eric Christopher 64ae44a075 Reformat comments here.
llvm-svn: 182901
2013-05-30 00:43:30 +00:00
Eric Christopher 8463b42781 Add a comment and some tests including the NULL byte.
llvm-svn: 182900
2013-05-30 00:43:26 +00:00
Bill Wendling 2aa007c59c This testcase tests command line attributes which we don't yet support.
In fact, we're probably going to support these flags in completely different
ways. So this test is no longer valid.

llvm-svn: 182899
2013-05-30 00:32:04 +00:00
Rafael Espindola c6634d397e Remove dead return.
llvm-svn: 182898
2013-05-30 00:29:46 +00:00
Michael Gottesman 0db7c27c2d Added a unittest for APFloat::getSmallestNormalized.
llvm-svn: 182897
2013-05-30 00:18:47 +00:00
Michael Gottesman 5455d5b987 Added code to the unittest for APFloat::getSmallest to double check that we consider the result to be denormal.
I additionally changed certain checks to use EXPECT_FALSE instead of a boolean
complement with EXPECT_TRUE.

llvm-svn: 182896
2013-05-30 00:18:44 +00:00
Argyrios Kyrtzidis 55fb21efbb [libclang] When indexing a @synthesize, don't consider that it defines a getter/setter if one is already defined by the user.
Fixes rdar://13925258

llvm-svn: 182895
2013-05-29 23:58:31 +00:00
Michael Gottesman 63e6d21c72 Add a unittest for APFloat::getSmallest.
llvm-svn: 182894
2013-05-29 23:58:29 +00:00
Greg Clayton 83793fc188 <rdar://problem/13956179>
Cleaned up the thread updating code in the OperatingSystemPython class. It doesn't need to clear the "new_thread_list" anymore as it is always empty. 

It also now assigns the "core_thread_list" to "new_thread_list" if no threads are detected through python.

llvm-svn: 182893
2013-05-29 23:31:14 +00:00
Greg Clayton 086e085efa Remove unused variable.
llvm-svn: 182892
2013-05-29 23:22:22 +00:00
Richard Smith b7f7faafd4 Document -fno-sanitize-recover and -fsanitize-undefined-trap-on-error and attempt to explain the difference between them.
llvm-svn: 182890
2013-05-29 22:57:31 +00:00
Shankar Easwaran a5008e3a63 [lld][elf] Add --dynamic-linker option to the ELF linker.
Users can override the default value of the dynamic linker to be set to the
one that appears in the command line. The path can even be empty!. 

Added a test for the option.

llvm-svn: 182889
2013-05-29 22:51:01 +00:00
Andrew Kaylor baa14e852b Fixing problems with thread create during step test.
llvm-svn: 182888
2013-05-29 22:40:17 +00:00
Andrew Kaylor bc46d567b7 Disabling watchpoint test with intermittent failure.
llvm-svn: 182887
2013-05-29 22:12:53 +00:00
Manuel Klimek ae1fbfb740 Fixes error when splitting block comments.
When trying to fall back to search from the end onwards, we
would still find leading whitespace if the leading whitespace
went on after the end of the line.

llvm-svn: 182886
2013-05-29 22:06:18 +00:00
Andrew Trick ad6d08ac6f Order CALLSEQ_START and CALLSEQ_END nodes.
Fixes PR16146: gdb.base__call-ar-st.exp fails after
pre-RA-sched=source fixes.

Patch by Xiaoyi Guo!

This also fixes an unsupported dbg.value test case. Codegen was
previously incorrect but the test was passing by luck.

llvm-svn: 182885
2013-05-29 22:03:55 +00:00
Ted Kremenek e3dc7f74be Split off casts to void* for -Wint-to-pointer-cast to subgroup -Wint-to-void-pointer-cast.
This change is motivated from user feedback that some APIs use
void* as an opaque "context" object that may not really be a pointer.
Such users want an ability to turn off the warning for casts
to void* while preserving the warning for other cases.

Implements <rdar://problem/14016721>.

llvm-svn: 182884
2013-05-29 21:50:46 +00:00
Ahmed Bougacha 00e08db393 X86: Fix Defs/Uses for insts that imp-def/imp-use both an A-register and EFLAGS.
This corrects a problem where x86 instructions that implicitly define/use both
an A-register (RAX, EAX, ..) and EFLAGS were declared as only defining/using
EFLAGS, because the outer "let Defs/Uses = [EFLAGS]" in the various multiclasses
overrides the "let Defs/Uses = [areg]" in BinOpAI.

The instructions deriving from BinOpAI were moved out of the "let Defs", and a
BinOpAI_FF class was created, for instructions that implicitly define and use
EFLAGS and the A-register (SBC, ADC).

llvm-svn: 182883
2013-05-29 21:13:57 +00:00
David Majnemer 970f30e248 Add another test case for r182814.
llvm-svn: 182882
2013-05-29 21:09:52 +00:00
Roman Divacky 95ad7794a9 Turn CLANG_ENABLE_{ARCMT,REWRITER,STATIC_ANALYZER} into proper options so that
users can disable those. Just like in autoconf generated makefiles.

llvm-svn: 182881
2013-05-29 21:09:18 +00:00
Jordan Rose 1bd1927a14 [analyzer] Accept references to variables declared "extern void" (C only).
In C, 'void' is treated like any other incomplete type, and though it is
never completed, you can cast the address of a void-typed variable to do
something useful. (In C++ it's illegal to declare a variable with void type.)

Previously we asserted on this code; now we just treat it like any other
incomplete type.

And speaking of incomplete types, we don't know their extent. Actually
check that in TypedValueRegion::getExtent, though that's not being used
by any checkers that are on by default.

llvm-svn: 182880
2013-05-29 20:50:34 +00:00
Chad Rosier 33b736626e Don't assume the registers will be enumerated sequentially.
llvm-svn: 182879
2013-05-29 20:42:21 +00:00
Arnaud A. de Grandmaison 916f3ccacf Add colored diagnostics when building LLVM with cmake + ninja + clang
When invoked from Ninja, clang does not detect that it can use colors : see https://github.com/martine/ninja/issues/174

llvm-svn: 182878
2013-05-29 20:41:35 +00:00
JF Bastien f60e0e44ca Enable FastISel on ARM for Linux and NaCl
FastISel was only enabled for iOS ARM and Thumb2, this patch enables it
for ARM (not Thumb2) on Linux and NaCl.

Thumb2 support needs a bit more work, mainly around register class
restrictions.

The patch punts to SelectionDAG when doing TLS relocation on non-Darwin
targets. I will fix this and other FastISel-to-SelectionDAG failures in
a separate patch.

The patch also forces FastISel to retain frame pointers: iOS always
keeps them for backtracking (so emitted code won't change because of
this), but Linux was getting much worse code that was incorrect when
using big frames (such as test-suite's lencod). I'll also fix this in a
later patch, it will probably require a peephole so that FastISel
doesn't rematerialize frame pointers back-to-back.

The test changes are straightforward, similar to:
  http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130513/174279.html
They also add a vararg test that got dropped in that change.

I ran all of test-suite on A15 hardware with --optimize-option=-O0 and
all the tests pass.

llvm-svn: 182877
2013-05-29 20:38:10 +00:00
Bill Wendling 70b1400e6d Don't reach into the middle of TargetMachine and cache one of its ivars.
Not only does this break encapsulation, it's gross.

llvm-svn: 182876
2013-05-29 20:37:19 +00:00
Sean Callanan 467441d511 Error out if the expression for a breakpoint
condition doesn't return a result, instead
of blindly trying to use that result.

<rdar://problem/14009519>

llvm-svn: 182875
2013-05-29 20:22:18 +00:00
Rafael Espindola ce2168f990 Remove unused field.
llvm-svn: 182874
2013-05-29 19:51:12 +00:00
Jim Ingham cbf7e26b3b For "expr", say what the timeout units are in the help string.
llvm-svn: 182873
2013-05-29 19:40:14 +00:00
Tim Northover b65f6b0820 Teach ReMaterialization to be more cunning about subregisters
This allows rematerialization during register coalescing to handle
more cases involving operations like SUBREG_TO_REG which might need to
be rematerialized using sub-register indices.

For example, code like:
    v1(GPR64):sub_32 = MOVZ something
    v2(GPR64) = COPY v1(GPR64)
should be convertable to:
    v2(GPR64):sub_32 = MOVZ something

but previously we just gave up in places like this

llvm-svn: 182872
2013-05-29 19:32:06 +00:00
Argyrios Kyrtzidis 345d05fbbe [libclang] For "@import .." code-completion results, associate a CXCursor_ModuleImportDecl cursor instead of CXCursor_NotImplemented.
llvm-svn: 182871
2013-05-29 18:50:15 +00:00
Reid Kleckner d8cbeec178 [ms-cxxabi] Implement MSVC virtual base adjustment
While we can't yet emit vbtables, this allows us to find virtual bases
of objects constructed in other TUs.

This make iostream hello world work, since basic_ostream virtually
inherits from basic_ios.

Differential Revision: http://llvm-reviews.chandlerc.com/D795

llvm-svn: 182870
2013-05-29 18:02:47 +00:00
Adrian Prantl 4db8f64422 Simplify logic by using the appropriate functions.
llvm-svn: 182869
2013-05-29 17:33:31 +00:00
Timur Iskhodzhanov 013da5cb37 Replaced 'bool .* = 0;' with '... = false;'
llvm-svn: 182868
2013-05-29 17:26:25 +00:00
Manman Ren 4213c39e3c LTO+Debug Info: revert r182791.
Since the testing case uses ref_addr, which requires version 3+ to work,
we will solve the dwarf version issue first.

This patch also causes failures in one of the bots. I will update the patch
accordingly in my next attempt.

rdar://13926659

llvm-svn: 182867
2013-05-29 17:16:59 +00:00