Commit Graph

110418 Commits

Author SHA1 Message Date
Eli Friedman 30a49e93e3 New approach to r136737: insert the necessary fences for atomic ops in platform-independent code, since a bunch of platforms (ARM, Mips, PPC, Alpha are the relevant targets here) need to do essentially the same thing.
I think this completes the basic CodeGen for atomicrmw and cmpxchg.

llvm-svn: 136813
2011-08-03 21:06:02 +00:00
Johnny Chen 16fc2cc9fa Remove copy-and-paste residues.
llvm-svn: 136812
2011-08-03 20:58:02 +00:00
Bill Wendling edcfd1e876 Remove CreateUnwind from the IRBuillder.
llvm-svn: 136811
2011-08-03 20:53:38 +00:00
Johnny Chen c99dd97fc5 Fix typos.
llvm-svn: 136809
2011-08-03 20:40:35 +00:00
Johnny Chen a8d4df429a Add license header comment.
llvm-svn: 136808
2011-08-03 20:39:26 +00:00
Kaelyn Uhrain acbdc5748e Improve overloaded function handling in the typo correction code.
Change TypoCorrection to store a set of NamedDecls instead of a single
NamedDecl. Also add initial support for performing function overload
resolution to Sema::DiagnoseEmptyLookup.

llvm-svn: 136807
2011-08-03 20:36:05 +00:00
Johnny Chen d855d82a16 Conditionize the 'print "Set environment ..."' stmt.
llvm-svn: 136806
2011-08-03 20:28:34 +00:00
Johnny Chen 0601b679a2 Add a test directory for lldb C++ API programs.
llvm-svn: 136805
2011-08-03 20:24:30 +00:00
Ted Kremenek 1c2fb270ce [analyzer] Introduce MallocOverflowSecurityChecker, a simple flow-sensitive checker that may be useful for security auditing. This checker is currently too noisy to be on by default.
llvm-svn: 136804
2011-08-03 20:17:43 +00:00
Benjamin Kramer 103e2ec2df Remove unused variables.
llvm-svn: 136803
2011-08-03 19:53:48 +00:00
Bob Wilson 0a8d5c6047 Some revisions to Devang's change r136759 for merged global debug info.
llvm-svn: 136802
2011-08-03 19:42:51 +00:00
Jim Ingham b7f0bfc5dc Add a directory to make the second copy of libd.dylib in, so we don't have
to make & delete directories in the test case.  Make a real copy of libd.dylib
in that directory so the two libraries are actually different.  Use (and remove)
the DYLD_LIBRARY_PATH to point to the new library.

llvm-svn: 136801
2011-08-03 19:32:42 +00:00
Johnny Chen f044a1e788 Patch from David Forsythe for FreeBSD build!
llvm-svn: 136800
2011-08-03 18:55:26 +00:00
Bill Wendling c5a136103b Go back to the old definition. It's not clear that a 'resume' can be 'outlined' from the function with the landing pad for all platforms.
llvm-svn: 136799
2011-08-03 18:37:32 +00:00
Johnny Chen 5ad1245b0e Add expectedFailure decorator.
rdar://problem/9890530

llvm-svn: 136798
2011-08-03 18:35:48 +00:00
Andrew Trick bf69d03382 SCEV: Use AssertingVH to catch dangling BasicBlock* when passes forget
to notify SCEV of a change. Add forgetLoop in a couple of those places.

llvm-svn: 136797
2011-08-03 18:32:11 +00:00
Johnny Chen e5ffe78c13 Unquote the env_cmd_string variable.
Skip the test case test_dyld_library_path(self) because it causes the debugserver to crash.

llvm-svn: 136796
2011-08-03 18:28:41 +00:00
Andrew Trick 9d8c2af257 whitespace
llvm-svn: 136795
2011-08-03 18:28:21 +00:00
Fariborz Jahanian 2bda1b65b1 objective-c: Methods declared in methods must type match
those declated in its protocols. First half or // rdar://6191214

llvm-svn: 136794
2011-08-03 18:21:12 +00:00
Jim Ingham f169c394ca Don't set DYLD_LIBRARY_PATH in the Python environment (which will get passed down to
debugserver) but set it in the debugger settings (which will just get passed down to
the target).

llvm-svn: 136793
2011-08-03 17:41:28 +00:00
Jonathan D. Turner e3b457461a Fix a few typos
llvm-svn: 136792
2011-08-03 17:36:09 +00:00
Enrico Granata 9bb48e6407 temporarily blacklisting a test case causing hangs on Mac OS X
llvm-svn: 136791
2011-08-03 17:20:19 +00:00
Bill Wendling 0524b8d1f4 Explain how clauses are applied.
llvm-svn: 136790
2011-08-03 17:17:06 +00:00
Raghesh Aloor 62b13120ee Memaccess: Codegeneration for a simple access function change
Code is generated for a simple access function change imported
from JSCOP file. An access of A[i] is changed to A[0]. The code
for A[0] is generated directly without refering to isl function calls.

llvm-svn: 136789
2011-08-03 17:02:50 +00:00
Douglas Gregor 73b8551188 Comment the weird behavior of __has_feature(is_empty) and __has_feature(is_pod)
llvm-svn: 136788
2011-08-03 17:01:05 +00:00
Jakob Stoklund Olesen da618420ee Handle IMPLICIT_DEF instructions in X86FloatingPoint.
This fixes PR10575.

llvm-svn: 136787
2011-08-03 16:33:19 +00:00
Douglas Gregor 1d394809b4 Make the type of the IntegerLiteral for bitfield paddings an actual
integer, and initialise its TypeSourceInfo. The initialisation fixes a
crash when using pre-compiled preambles with C++ code-completion. From
Erik Verbruggen! Fixes PR10511.

llvm-svn: 136786
2011-08-03 16:26:46 +00:00
Enrico Granata 7823ee3307 testing for a previous issue where formats in summaries where not enforced in all cases ; removed an unused local variable
llvm-svn: 136785
2011-08-03 16:23:33 +00:00
Sean Callanan a789aa770e Improved the expression parser's detection of the
current context.  Previously, if there was a variable
called "self" available, the expression parser
assumed it was inside a method.  But class methods
in Objective-C also take a "self" parameter, of DWARF
type "id".  We now detect this properly, and only
assume we're in an instance method if "self" is a
pointer to an Objective-C object.

llvm-svn: 136784
2011-08-03 16:23:08 +00:00
Douglas Gregor 996ab689fb Remove stray comma
llvm-svn: 136783
2011-08-03 16:22:53 +00:00
Douglas Gregor 6f8912ef27 Introduce a constant for the number of predefined declarations in an
AST file, along with an enumeration naming those predefined
declarations. No functionality change, but this will make it easier to
introduce new predefined declarations, when/if we need them.

llvm-svn: 136781
2011-08-03 16:05:40 +00:00
Chris Lattner 3f3b6f4c80 give an example of a 'lowered vtable reference'
llvm-svn: 136780
2011-08-03 15:54:40 +00:00
Douglas Gregor f718062f25 Introduce the local -> global declaration ID mapping into the AST
reader, to allow AST files to be loaded with their declarations
remapped to different ID numbers. Fix a number of places where we were
either failing to map local declaration IDs into global declaration
IDs or where interpreting the local declaration IDs within the wrong
module. 

I've tested this via the usual "random gaps" method. It works well
except for the preamble tests, because our handling of the precompiled
preamble requires declaration and preprocessed entity to be stable
when parsing code and then loading that back into memory. This
property will hold in general, but my randomized testing naturally
breaks this property to get more coverage. In the future, I expect
that the precompiled preamble logic won't need this property.

I am very unhappy with the current handling of the translation unit,
which is a rather egregious hack. We're going to have to do something
very different here for loading multiple AST files, because we don't
want to have to cope with merging two translation units. Likely, we'll
just handle translation units entirely via "update" records, and
predefine a single, fixed declaration ID for the translation
unit. That will come later.

llvm-svn: 136779
2011-08-03 15:48:04 +00:00
Raghesh Aloor 7a04f4f9ba Memaccess: Display Changed Access Relation
The changed access relations imported from JSCOP file is shown
as output of -analyze pass.

llvm-svn: 136774
2011-08-03 13:47:59 +00:00
Jay Foad 24a01962af Use cast<> instead of a C-style cast to get some free assertions.
llvm-svn: 136771
2011-08-03 10:05:04 +00:00
John McCall 32a4da04c2 In ARC, don't try to reclaim the result of a call to performSelector
unless done in a context where the value is used retained.

llvm-svn: 136769
2011-08-03 07:02:44 +00:00
Chris Lattner 5b82a0ac0c fix PR10286, a problem with the .ll printer handling block addresses that are out-of-scope.
llvm-svn: 136768
2011-08-03 06:15:41 +00:00
Bob Wilson e826a2a56b Handle "homogeneous aggregates" as required by the ARM AAPCS-VFP ABI.
A homogeneous aggregate is an aggregate data structure where after flattening
any nesting there are 1 to 4 elements of the same base type that is either a
float, double, or Neon vector.  All Neon vectors of the same size, either 64
or 128 bits, are treated as equivalent for this purpose.  When using the
AAPCS-VFP ABI, check for homogeneous aggregates and pass them as arguments by
expanding them into a sequence of their base types.  This requires extending
the existing support for expanded arguments to handle not only structs, but
also constant arrays and complex types.

llvm-svn: 136767
2011-08-03 05:58:22 +00:00
Johnny Chen 9bfd9144e6 Fixed an issue of wrong (by +2) branch target calculation in the disassembler's symbolic information output.
A8.6.23 BLX (immediate T2)
Target Address = Align(PC, 4) + offset value

rdar://problem/9885678

llvm-svn: 136766
2011-08-03 04:50:37 +00:00
Greg Clayton fad9eef23b Fixed an issue with parsing object files from .a archives.
The entire .a file gets cached, and after the first .o file
gets loaded, a cached version would get used when trying to
extract the skinny slice from a fat BSD archive and would
cause a code path to get taken in the BSD archive parser
even if we aren't at a BSD archive offset.

llvm-svn: 136765
2011-08-03 04:39:36 +00:00
Enrico Granata 9910bc855d Fixed an issue where the KVO swizzled type would be returned as the dynamic type instead of the actual user-level type
- see the test case in lang/objc/objc-dynamic-value for an example
Objective-C dynamic type lookup now works for every Objective-C type
 - previously, true dynamic lookup was only performed for type id

llvm-svn: 136763
2011-08-03 02:18:51 +00:00
Anna Zaks 59546b8f79 Static Analyzer diagnostics visualization: when the last location on a path is end of the function, the arrow should point to the closing brace, not the statement before it. Patch by Ted Kremenek.
llvm-svn: 136761
2011-08-03 01:57:49 +00:00
Johnny Chen cf901ed229 Add a test file to go with r136745. It fails, though, for:
expr ptr[i]->point.x

Radar to be filed.

llvm-svn: 136760
2011-08-03 01:34:29 +00:00
Devang Patel dc9cbaaf23 Use byte offset, instead of element number, to access merged global.
llvm-svn: 136759
2011-08-03 01:25:46 +00:00
Greg Clayton 73da24413c Create the scratch AST context in the accessor function, not
only when the executable is set.

llvm-svn: 136758
2011-08-03 01:23:55 +00:00
Nick Lewycky d405b7e2ae Small cleanups:
- use SmallVectorImpl& for the function argument.
  - ignore the operands on the GEP, even if they aren't constant! Much as we
    pretend the malloc succeeds, we pretend that malloc + whatever-you-GEP'd-by
    is not null. It's magic!

llvm-svn: 136757
2011-08-03 01:11:40 +00:00
Bill Wendling 035ea32870 Add this back in for now. There are still a few passes which create unwind instructions at the moment.
llvm-svn: 136756
2011-08-03 01:07:57 +00:00
Jim Ingham b53cb271ca Add method Module::IsLoadedInTarget, and then in the MacOS X dynamic loader, after we
have initialized our shared library state, discard all the modules that didn't make
it into the running process.

llvm-svn: 136755
2011-08-03 01:03:17 +00:00
Jim Ingham e716ae02a9 Fix a copy/paste error in a comment.
llvm-svn: 136754
2011-08-03 01:00:06 +00:00
John McCall 625ed88f07 When rewriting a call to a K&R function to lead to a well-prototyped
function, be sure to drop parameter attributes when dropping their
associated arguments.  Patch by Aaron Landwehr!

llvm-svn: 136753
2011-08-03 00:43:55 +00:00