Commit Graph

120838 Commits

Author SHA1 Message Date
Chris Lattner cf12970bd0 eliminate the Constant::getVectorElements method. There are better (and
more robust) ways to do what it was doing now.  Also, add static methods
for decoding a ShuffleVector mask.

llvm-svn: 149028
2012-01-26 02:51:13 +00:00
Argyrios Kyrtzidis 24e9afff43 Introduce 3 new fixit options:
-fixit-recompile
	applies fixits and recompiles the result
-fixit-to-temporary
	applies fixits to temporary files
-fix-only-warnings">,
    applies fixits for warnings only, not errors

Combining "-fixit-recompile -fixit-to-temporary" allows testing the result of fixits
without touching the original sources.

llvm-svn: 149027
2012-01-26 02:40:48 +00:00
Eric Christopher 7b878febf1 Reverse the order that these are expected for clang change. Should
be no functional change (the offsets in AT_data_member_location are still
correct). If the gdb testsuite itself needs changing then I'll revert this
and the clang patch.

llvm-svn: 149026
2012-01-26 02:33:53 +00:00
Chris Lattner e8c94f7d98 fix to go along with an llvm change: VMCore now returns an UndefValue
when asking for a ConstantStruct with all undef elements.

llvm-svn: 149025
2012-01-26 02:33:22 +00:00
Chris Lattner fa77500d96 Continue improving support for ConstantDataAggregate, and use the
new methods recently added to (sometimes greatly!) simplify code.

llvm-svn: 149024
2012-01-26 02:32:04 +00:00
Chris Lattner f14a67f5d3 Add a ConstantDataVector::getSplatValue() method, for parity with
ConstantVector.  Fix some outright bugs in the implementation of
ConstantArray and Constant struct, which would cause us to not make
one big UndefValue when asking for an array/struct with all undef
elements.  Enhance Constant::isAllOnesValue to work with
ConstantDataVector.

llvm-svn: 149021
2012-01-26 02:31:22 +00:00
Ted Kremenek 37e965221c Enable several checkers under --analyze for general testing.
llvm-svn: 149016
2012-01-26 02:27:38 +00:00
Eric Christopher 9f94fa368a Tidy and remove some unused variables.
llvm-svn: 149015
2012-01-26 02:05:28 +00:00
Rafael Espindola 273fd772ab Fix our handling of #pragma GCC visibility.
Now the lexer just produces a token and the parser is the one responsible for
activating it.
This fixes problem like the one pr11797 where the lexer and the parser were not
in sync. This also let us be more strict on where in the file we accept
these pragmas.

llvm-svn: 149014
2012-01-26 02:02:57 +00:00
Eric Christopher 5bfde1aa42 Collect this information together. No reason to have it split.
llvm-svn: 149013
2012-01-26 01:57:29 +00:00
Eric Christopher a15e6352fe Refactor into its own function.
llvm-svn: 149012
2012-01-26 01:57:13 +00:00
Chandler Carruth 0b1756b880 Reintroduce r148981 with significantly improved regression test. Now it
both actually tests what it wants to, doesn't have bogus and broken
assertions in it, and is also formatted much more cleanly and
consistently. Probably still some more that can be improved here, but
its much better.

Original commit message:
----
Try to unbreak the FreeBSD toolchain's detection of 32-bit targets
inside a 64-bit freebsd machine with the 32-bit compatibility layer
installed. The FreeBSD image always has the /usr/lib32 directory, so
test for the more concrete existence of crt1.o. Also enhance the tests
for freebsd to clarify what these trees look like and exercise the new
code.

Thanks to all the FreeBSD folks for helping me understand what caused
the failure and how we might fix it. =] That helps a lot. Also, yay
build bots.

llvm-svn: 149011
2012-01-26 01:35:15 +00:00
Peter Collingbourne 76e1c8c9ae llvm-config: Add support for CMake build trees in which the build
mode does not form part of the path.

llvm-svn: 149010
2012-01-26 01:31:38 +00:00
NAKAMURA Takumi e3593114a1 StaticAnalyzer/Checkers: Fix CMake build.
llvm-svn: 149009
2012-01-26 01:14:39 +00:00
Anna Zaks 06f10bf05a [analyzer] Add an AST checker that checks for a common pitfall when
using CFArrayCreate & family.

Specifically, CFArrayCreate's input should be:
'A C array of the pointer-sized values to be in the new array.'

(radar://10717339)

llvm-svn: 149008
2012-01-26 01:05:43 +00:00
Fariborz Jahanian 26d8371b07 objc: allow block pointer matching 'id' type when
they show up as argument types of two block pointers.
// rdar://10734265

llvm-svn: 149007
2012-01-26 00:45:38 +00:00
Chris Lattner 8326bd8e10 some general cleanup, using new methods and tidying up old code.
llvm-svn: 149006
2012-01-26 00:42:34 +00:00
Chris Lattner 3dbad40341 fix pasto in the new (and still unused) ShuffleVectorInst::getShuffleMask method.
llvm-svn: 149005
2012-01-26 00:41:50 +00:00
Greg Clayton 690b034161 Fix page title.
llvm-svn: 149004
2012-01-26 00:32:22 +00:00
Eli Friedman 1da70394f6 Slight refactoring; catch yet another case where we were missing an lvalue-to-rvalue conversion.
llvm-svn: 149003
2012-01-26 00:26:18 +00:00
Johnny Chen 9ec3c4f5a7 For Dump(Stream *s), use GetOptionsNoCreate()->GetIgnoreCount() and fix the indentation.
llvm-svn: 149002
2012-01-26 00:08:14 +00:00
Fariborz Jahanian 0c859d67ef arc migrator: Added an option to the migrator
unused yet.

llvm-svn: 149001
2012-01-26 00:08:04 +00:00
Chris Lattner 154aabc0c4 add StructType helpers too.
llvm-svn: 149000
2012-01-26 00:06:44 +00:00
Chris Lattner 40a279e1c5 Ok, break down and add some cast<>'ing helper methods to the Type class
to reduce the number of cast<>'s we have.  This allows someone to use
things like Ty->getVectorNumElements() instead of 
cast<VectorType>(Ty)->getNumElements() when you know that a type is a
vector.

It would be a great general cleanup to move the codebase to use these,
I will do so in the code I'm touching.

llvm-svn: 148999
2012-01-26 00:01:10 +00:00
Chris Lattner 1dcb654311 add some helper methods to ShuffleVectorInst and enhance its
"isValidOperands" and "getMaskValue" methods to allow 
ConstantDataSequential.

llvm-svn: 148998
2012-01-25 23:49:49 +00:00
Ted Kremenek 8e4c4266de Rework flushing of diagnostics to PathDiagnosticConsumer. Now all the reports are batched up before being flushed
to the underlying consumer implementation.  This allows us to unique reports across analyses to multiple functions (which
shows up with inlining).

llvm-svn: 148997
2012-01-25 23:47:14 +00:00
Jakob Stoklund Olesen 4864a81aa3 Improve sub-register def handling in ProcessImplicitDefs.
This boils down to using MachineOperand::readsReg() more.

This fixes PR11829 where a use ended up after the first def when
lowering REG_SEQUENCE instructions involving IMPLICIT_DEFs.

llvm-svn: 148996
2012-01-25 23:36:27 +00:00
Eli Friedman 9562f39e2f Don't stack-allocate an IntegerLiteral which can be referred to after the current method returns. PR11744, part 2.
llvm-svn: 148995
2012-01-25 23:20:27 +00:00
Johnny Chen 29f7dff581 Typo.
llvm-svn: 148994
2012-01-25 23:08:23 +00:00
Argyrios Kyrtzidis e8be6652ce Revert r148981 because it fails test/Driver/freebsd.c
Original log:

Author: chandlerc <chandlerc@91177308-0d34-0410-b5e6-96231b3b80d8>
Date:   Wed Jan 25 21:32:31 2012 +0000

    Try to unbreak the FreeBSD toolchain's detection of 32-bit targets
    inside a 64-bit freebsd machine with the 32-bit compatibility layer
    installed. The FreeBSD image always has the /usr/lib32 directory, so
    test for the more concrete existence of crt1.o. Also enhance the tests
    for freebsd to clarify what these trees look like and exercise the new
    code.

    Thanks to all the FreeBSD folks for helping me understand what caused
    the failure and how we might fix it. =] That helps a lot. Also, yay
    build bots.

llvm-svn: 148993
2012-01-25 22:55:16 +00:00
Eli Friedman a98d1f8ca6 Add some ABI tweaks for i386-pc-win32 triple so that we return structs in an MSVC-compatible way. Patch by Joe Groff.
llvm-svn: 148992
2012-01-25 22:46:34 +00:00
Eli Friedman 04342eee52 Improve the error message slightly for files that aren't using the expected UTF-8 encoding. Patch by Seth Cantrell.
llvm-svn: 148991
2012-01-25 22:34:12 +00:00
Anton Korobeynikov 7722a2d4e3 Properly emit ctors / dtors with priorities into desired sections
and let linker handle the rest.

This finally fixes PR5329

llvm-svn: 148990
2012-01-25 22:24:19 +00:00
Eli Friedman f7f102f81a Fix a crash involving a multi-dimensional dependent VLA. PR11744.
llvm-svn: 148989
2012-01-25 22:19:07 +00:00
Ted Kremenek 807f7e38a9 Post open source analyzer build checker-259.
llvm-svn: 148988
2012-01-25 22:18:04 +00:00
Richard Smith 1b78b3d1b1 constexpr: add support for anonymous struct and union members in literal types.
llvm-svn: 148987
2012-01-25 22:15:11 +00:00
Lang Hames f1508b78f9 Don't add live ranges for aliases of physregs that are live in to the
function. They don't appear to be used, and are inconsistent with handling of
other physreg intervals (i.e. intervals that are not live-in) where ranges are
not inserted for aliases.

llvm-svn: 148986
2012-01-25 22:11:06 +00:00
Jim Grosbach 65e2465550 Tidy up. s/Low Level Virtual Machine/LLVM/.
LLVM isn't an acronym anymore.

llvm-svn: 148985
2012-01-25 22:00:23 +00:00
Lang Hames 19feb5f241 Always break upon finding a vreg operand (in Release as well as +Asserts). Remove assertion which can no longer trigger.
llvm-svn: 148984
2012-01-25 21:53:23 +00:00
Greg Clayton 5c3de1560a If timestamps are enabled when logging GDB remote packets ("log enable -T -f /tmp/packets.log gdb-remote logs") then get the amount of time spent executing each packet and summarize at the end of a dump. Sample timing output looks like:
----------------------------------------------------------------------
Packet timing summary:
----------------------------------------------------------------------
Packet                 Time       %
---------------------- -------- ------
       qThreadStopInfo 0.363844  35.35
                     m 0.281967  27.39
                     s 0.147160  14.30
          qfThreadInfo 0.070865   6.88
          qsThreadInfo 0.061608   5.99
                     z 0.036796   3.57
                     Z 0.036271   3.52
                     c 0.018410   1.79
                     H 0.012418   1.21
---------------------- -------- ------
                 Total 1.029339 100.00

llvm-svn: 148983
2012-01-25 21:52:15 +00:00
Eric Christopher bfecca3331 Clean up comment.
llvm-svn: 148982
2012-01-25 21:47:09 +00:00
Chandler Carruth 143f2f6e37 Try to unbreak the FreeBSD toolchain's detection of 32-bit targets
inside a 64-bit freebsd machine with the 32-bit compatibility layer
installed. The FreeBSD image always has the /usr/lib32 directory, so
test for the more concrete existence of crt1.o. Also enhance the tests
for freebsd to clarify what these trees look like and exercise the new
code.

Thanks to all the FreeBSD folks for helping me understand what caused
the failure and how we might fix it. =] That helps a lot. Also, yay
build bots.

llvm-svn: 148981
2012-01-25 21:32:31 +00:00
Kaelyn Uhrain 9afaf793b3 Allow typo correction to be disabled in BuildOverloadedCallExpr variant.
This suppresses typo correction for auto-generated call expressions such
as to 'begin' or 'end' within a C++0x for-range statement.

llvm-svn: 148979
2012-01-25 21:11:35 +00:00
Chandler Carruth cf705b21e2 Restore a tiny bit of functionality that I completely overlooked in the
Linux toolchain selection -- sorry folks. =] This should fix the Hexagon
toolchain.

However, I would point out that I see why my testing didn't catch this
-- we have no tests for Hexagon. ;]

llvm-svn: 148977
2012-01-25 21:03:58 +00:00
Johnny Chen 11c00fc7b2 Move argument checking/manipulation into the front of the function.
llvm-svn: 148974
2012-01-25 20:50:21 +00:00
Kaelyn Uhrain 77e21fca3c Avoid correcting unknown identifiers to types where types aren't allowed.
Pass a typo correction callback object from ParseCastExpr to
Sema::ActOnIdExpression to be a bit more selective about what kinds of
corrections will be allowed for unknown identifiers.

llvm-svn: 148973
2012-01-25 20:49:08 +00:00
Johnny Chen 8d24390cad Clearify some comment.
llvm-svn: 148972
2012-01-25 20:29:26 +00:00
Johnny Chen 78e49e7fee Cleanup docstring and remove dead code.
llvm-svn: 148971
2012-01-25 20:25:38 +00:00
Argyrios Kyrtzidis be6d89d255 [driver] Do emit the diagnostics when CompilerInvocation::CreateFromArgs() fails.
llvm-svn: 148970
2012-01-25 20:00:43 +00:00
Jim Grosbach 82f76d1275 ARM assemly parsing and validation of IT instruction.
"Although a Thumb2 instruction, the IT mnemonic shall be permitted in
ARM mode, and the condition verified to match the condition code(s)
on the following instruction(s)."

PR11853

llvm-svn: 148969
2012-01-25 19:52:01 +00:00