Commit Graph

119773 Commits

Author SHA1 Message Date
Fariborz Jahanian a28a78ec2f Support __has_attribute for objc_suppress_autosynthesis
which is automatic with proper spelling :).

llvm-svn: 147555
2012-01-04 22:29:28 +00:00
Marshall Clow d2bab35080 Improved comment to explain why we can use __cxa_get_globals_fast here
llvm-svn: 147554
2012-01-04 22:18:10 +00:00
Benjamin Kramer 9c48f26341 Silence warnings of a mysterious compiler that still defaults to C89.
llvm-svn: 147553
2012-01-04 22:06:45 +00:00
Daniel Dunbar ecb41cbcd6 Driver/Darwin: Remove a hack that avoided passing -demangle to iOS linkers.
llvm-svn: 147552
2012-01-04 21:45:27 +00:00
Sean Callanan 3441d5ae34 Added logging to track when the IR interpreter
resolves values in registers.

llvm-svn: 147551
2012-01-04 21:42:46 +00:00
Benjamin Kramer bea8e6aef1 Simplify more DenseMap.find users.
llvm-svn: 147550
2012-01-04 21:41:24 +00:00
Sean Callanan 49e446d9ea Added examples of commands that list and delete
breakpoints.

llvm-svn: 147549
2012-01-04 21:20:39 +00:00
Douglas Gregor 7f9abbdcc5 Add __has_feature(modules) to indicate when modules are available (in
any language variant), and restrict __has_feature(objc_modules) to
mean that we also have the Objective-C @import syntax. I anticipate
__has_feature(cxx_modules) and/or __has_feature(c_modules) for when we
nail down the module syntax for C/C++.

llvm-svn: 147548
2012-01-04 21:16:09 +00:00
Howard Hinnant 66d9327b80 Just getting started on the personality routine. This is just a skeleton. Still learning how to fill it in...
llvm-svn: 147547
2012-01-04 20:49:43 +00:00
Benjamin Kramer 2b84704efc StringMap.find never points to an empty bucket or tombstone, skip the check.
llvm-svn: 147546
2012-01-04 20:45:14 +00:00
Eli Friedman 2dd5d653f2 Fix test so it doesn't depend on the host's calling convention lowering code.
llvm-svn: 147545
2012-01-04 20:43:57 +00:00
Benjamin Kramer 28232eca4c Simplify code. No functionality change.
Using DenseMap iterators isn't free as they have to check for empty
buckets. Dominator queries are common so this gives a minor speedup.

llvm-svn: 147544
2012-01-04 20:20:08 +00:00
Sebastian Pop 3f2f65f1f8 add polly.sh script
llvm-svn: 147543
2012-01-04 20:11:18 +00:00
Sebastian Pop 0f357d6c22 use getHostTriple instead of getDefaultTargetTriple in getClosestTargetForJIT
Get back getHostTriple.

For JIT compilation, use the host triple instead of the default
target: this fixes some JIT testcases that used to fail when the
compiler has been configured as a cross compiler.

llvm-svn: 147542
2012-01-04 19:47:22 +00:00
Akira Hatanaka aac3e06bf7 Enable -soft-float for MIPS.
llvm-svn: 147541
2012-01-04 19:29:11 +00:00
Sean Callanan a4c6ad1914 Fixed the help text for raw commands like "expr"
to include -- in sample command lines.  Now LLDB
prints

  expression [-f <format>] -- <expr>

instead of

  expression [-f <format>] <expr>

and also adds a new example line:

  expression <expr>

to show that in the absense of arguments the --
can be ommitted.

llvm-svn: 147540
2012-01-04 19:11:25 +00:00
Sean Callanan 06d3d01295 Instead of blindly printing a string when
eFormatCString is specified, I have made
DataExtractor::Dump properly escape the string.
This prevents LLDB from printing characters
that confuse terminals.

llvm-svn: 147536
2012-01-04 17:36:30 +00:00
Douglas Gregor b8c6f1e950 Implement declaration merging for variables in disjoint modules.
llvm-svn: 147535
2012-01-04 17:21:36 +00:00
Douglas Gregor b258569405 Implement declaration merging for non-template functions from
different modules. This implementation is a first approximation of
what we want, using only the function type to determine
equivalence. Later, we'll want to deal with some of the more subtle
issues, including:

  - C allows a prototyped declaration and a non-prototyped declaration
    to be merged, which we should support
  - We may want to ignore the return type when merging, then
    complain if the return types differ. Or, we may want to leave it
    as it us, so that we only complain if overload resolution
    eventually fails.
  - C++ non-static member functions need to consider cv-qualifiers
    and ref-qualifiers.
  - Function templates need to consider the template parameters and
    return type.
  - Function template specializations will have special rules.
  - We can now (accidentally!) end up overloading in C, even without
    the "overloadable" attribute, and will need to detect this at some
    point.
  
The actual detection of "is this an overload?" is implemented by
Sema::IsOverload(), which will need to be moved into the AST library
for re-use here. That will be a future refactor.

llvm-svn: 147534
2012-01-04 17:13:46 +00:00
Douglas Gregor 9b7b39116e Implement declaration merging for typedefs loaded from disjoint
modules, so long as the typedefs refer to the same underlying
type. This ensures that the typedefs end up in the same redeclaration
chain.

To test this, fix name lookup for C/Objective-C to properly deal with
multiple declarations with the same name in the same scope.

llvm-svn: 147533
2012-01-04 16:44:10 +00:00
Marshall Clow f368486f4c Better comment
llvm-svn: 147532
2012-01-04 14:56:09 +00:00
Benjamin Kramer 6dced3b468 Penryn doesn't support sse4.2, don't enable it in the first place.
While the code took care of disabling the sse42 flag it didn't know
about popcnt. This broke -march=native on penryn.

llvm-svn: 147531
2012-01-04 14:36:57 +00:00
David Chisnall 207a630052 Restore r147493 and remove the part of the test that was checking the wrong thing.
llvm-svn: 147530
2012-01-04 12:02:13 +00:00
Nick Lewycky 6d1d4bb6a1 Remove pointless asserts.
llvm-svn: 147529
2012-01-04 09:42:30 +00:00
Nick Lewycky 0c48afa0ed Teach instcombine all sorts of great stuff about shifts that have exact, nuw or
nsw bits on them.

llvm-svn: 147528
2012-01-04 09:28:29 +00:00
Craig Topper f726e15f44 Allow vector shuffle normalizing to use concat vector even if the sources are commuted in the shuffle mask.
llvm-svn: 147527
2012-01-04 09:23:09 +00:00
Ted Kremenek 5799cddde0 Extend ConditionBRVisitor to handle condition variable assignments.
llvm-svn: 147526
2012-01-04 08:18:09 +00:00
Craig Topper 279c77b677 Implement VECTOR_SHUFFLE canonicalizations during DAG combine.
llvm-svn: 147525
2012-01-04 08:07:43 +00:00
Douglas Gregor 8d76cca3a2 Don't treat 'import' as a contextual keyword when we're in a caching lexer, or when modules are disabled.
llvm-svn: 147524
2012-01-04 06:20:15 +00:00
Rafael Espindola 2aa7acfadb Process attributes in explicit function template instantiations. Fixes part of
PR11690.

llvm-svn: 147523
2012-01-04 05:40:59 +00:00
Eli Friedman 36d129435e Add an explicit LambdaExprContext to Declarator, to parallel BlockLiteralContext. Use it to ensure semantic analysis of types isn't confused by the lack of a type specifier.
llvm-svn: 147522
2012-01-04 04:41:38 +00:00
NAKAMURA Takumi 91a3f886ef test/CodeGen/X86/jump_sign.ll: Add -mcpu=pentiumpro for non-x86 hosts. It uses "cmov".
llvm-svn: 147521
2012-01-04 03:52:23 +00:00
Akira Hatanaka f093f5be3e Have functions return structures smaller than 128-bit in registers if ABI
is either N32 or N64. 

llvm-svn: 147520
2012-01-04 03:34:42 +00:00
Akira Hatanaka 3b775b8cc3 Rename immLUiOpnd.
llvm-svn: 147519
2012-01-04 03:09:26 +00:00
Akira Hatanaka b89a4bfe41 - Define base classes for Jump-and-link instructions and make 32-bit and 64-bit
versions derive from them.
- JALR64 is not needed since N64 does not emit jal. 
- Add template parameter to BranchLink that sets the rt field. 
- Fix the set of temporary registers for O32 and N64.

llvm-svn: 147518
2012-01-04 03:02:47 +00:00
Eli Friedman 898caf8f26 Fix messed-up indentation in r147515.
llvm-svn: 147517
2012-01-04 02:46:53 +00:00
Akira Hatanaka c669d7a6db Have getRegForInlineAsmConstraint return the correct register class when target
is Mips64.

llvm-svn: 147516
2012-01-04 02:45:01 +00:00
Eli Friedman c7c97144af Stub out the Sema interface for lambda expressions, and change the parser to use it. Unconditionally error on lambda expressions because they don't work in any meaningful way yet.
llvm-svn: 147515
2012-01-04 02:40:39 +00:00
Kostya Serebryany cc1d7893d6 [asan] remove objdump-based tests in favour of much simpler LLVM-ish tests
llvm-svn: 147514
2012-01-04 02:08:46 +00:00
Evan Cheng 801d98b3f0 Fix more places which should be checking for iOS, not darwin.
llvm-svn: 147513
2012-01-04 01:55:04 +00:00
Evan Cheng 104dbb0fd1 For x86, canonicalize max
(x > y) ? x : y
=>
(x >= y) ? x : y

So for something like
(x - y) > 0 : (x - y) ? 0
It will be
(x - y) >= 0 : (x - y) ? 0

This makes is possible to test sign-bit and eliminate a comparison against
zero. e.g.
subl   %esi, %edi
testl  %edi, %edi
movl   $0, %eax
cmovgl %edi, %eax
=>
xorl   %eax, %eax
subl   %esi, $edi
cmovsl %eax, %edi

rdar://10633221

llvm-svn: 147512
2012-01-04 01:41:39 +00:00
Rafael Espindola f90b6d1580 Revert r147493. It broke test/CodeGenObjC/constant-strings.m.
llvm-svn: 147511
2012-01-04 01:32:19 +00:00
Kostya Serebryany 842ae27ae3 [asan] one more test for asan instrumentation: (*a)++ should be instrumented only once.
llvm-svn: 147509
2012-01-04 01:02:14 +00:00
Ted Kremenek 990464cb30 Teach the static analyzer to not treat XPC types as CF types.
llvm-svn: 147506
2012-01-04 00:35:48 +00:00
Ted Kremenek e8300e5eba Minor code formatting cleanups.
llvm-svn: 147505
2012-01-04 00:35:45 +00:00
Fariborz Jahanian 1fc1c6c307 In non-gc, non-arc mode, property of 'Class' type
variety is treated as a 'void *'. No need to issue
warning reserved for objc object properties.
// rdar://10565506

llvm-svn: 147504
2012-01-04 00:31:53 +00:00
Eli Friedman 90dc17510b Get rid of an unnecessary check; the AST for init-lists is the same independent of whether we're in C++11 mode.
llvm-svn: 147503
2012-01-03 23:54:05 +00:00
Chris Lattner 6b77a07f75 Turn a few more inline asm errors into "emitErrors" instead of fatal errors.
Before we'd get:

$ clang t.c 
fatal error: error in backend: Invalid operand for inline asm constraint 'i'!

Now we get:

$ clang t.c
t.c:16:5: error: invalid operand for inline asm constraint 'i'!
    "movq         (%4), %%mm0\n"
    ^

Which at least gets us the inline asm that is the problem.

llvm-svn: 147502
2012-01-03 23:51:01 +00:00
Chris Lattner e22e613128 generalize LLVMContext::emitError to take a twine instead of a StringRef.
llvm-svn: 147501
2012-01-03 23:47:05 +00:00
Ted Kremenek 134a83a799 Enhance UnixAPIChecker to also warn about zero-sized allocations to calloc() and realloc(). Patch by Cyril Roelandt!
llvm-svn: 147500
2012-01-03 23:43:13 +00:00