Commit Graph

148442 Commits

Author SHA1 Message Date
Eric Christopher 04d4e9312c Move C++ code out of the C headers and into either C++ headers
or the C++ files themselves. This enables people to use
just a C compiler to interoperate with LLVM.

llvm-svn: 180063
2013-04-22 22:47:22 +00:00
Ted Kremenek ebeabab9a9 Add a warning for Objective-C pointer introspection, which is solely the job of the Objective-C runtime.
llvm-svn: 180062
2013-04-22 22:46:52 +00:00
Daniel Malea a53cd7e6ce Update CMakeLists.txt as per new file RegisterContextDummy.cpp
llvm-svn: 180061
2013-04-22 22:42:27 +00:00
Chad Rosier 65dd0399c6 [ms-inline asm] Removed this unnecessary check. In the current implementation,
Disp will always be one of MCSymbolRefExpr or MCConstantExpr, and never NULL.

llvm-svn: 180059
2013-04-22 22:38:35 +00:00
Chad Rosier 53e5768351 Add test case for PR15779, which has previously been fixed.
llvm-svn: 180058
2013-04-22 22:30:01 +00:00
Chad Rosier dba3fe557c [ms-inline asm] Get the OpDecl and remove a redundant lookup.
Part of rdar://13663589

llvm-svn: 180057
2013-04-22 22:12:12 +00:00
Ted Kremenek 760b5e360d Rename this test to make it more general for including more tests.
llvm-svn: 180056
2013-04-22 22:09:21 +00:00
Chad Rosier 7359d4793e [ms-inline asm] Set the OpDecl to the InlineAsmIdentifierInfo struct.
Part of rdar://13663589

llvm-svn: 180055
2013-04-22 22:05:00 +00:00
Chad Rosier 732b837a41 [ms-inline asm] Add the OpDecl to the InlineAsmIdentifierInfo struct and in turn
the MCParsedAsmOperand.
Part of rdar://13663589

llvm-svn: 180054
2013-04-22 22:04:25 +00:00
Enrico Granata 1399419d35 Proper English not optional
llvm-svn: 180053
2013-04-22 21:58:48 +00:00
Jordan Rose b957113b3f [analyzer] Treat reinterpret_cast like a base cast in certain cases.
The analyzer represents all pointer-to-pointer bitcasts the same way, but
this can be problematic if an implicit base cast gets layered on top of a
manual base cast (performed with reinterpret_cast instead of static_cast).
Fix this (and avoid a valid assertion) by looking through cast regions.

Using reinterpret_cast this way is only valid if the base class is at the
same offset as the derived class; this is checked by -Wreinterpret-base-class.
In the interest of performance, the analyzer doesn't repeat this check
anywhere; it will just silently do the wrong thing (use the wrong offsets
for fields of the base class) if the user code is wrong.

PR15394

llvm-svn: 180052
2013-04-22 21:36:49 +00:00
Jordan Rose 3437669ca9 [analyzer] Type information from C++ new expressions is perfect.
This improves our handling of dynamic_cast and devirtualization for
objects allocated by 'new'.

llvm-svn: 180051
2013-04-22 21:36:44 +00:00
Daniel Malea 7f3aa1081c Fix lock hierarchy violation in Listener/Broadcaster
- avoid deadlocks if Broadcaster::SignUpListenersForBroadcaster and
  Listener::StartListeningForEventSpec are both called concurrently

llvm-svn: 180050
2013-04-22 21:22:41 +00:00
Eli Bendersky 58b04b7e2e Optimize MachineBasicBlock::getSymbol by caching the symbol. Since the symbol
name computation is expensive, this helps save about 25% of the time spent in
this function.

llvm-svn: 180049
2013-04-22 21:21:08 +00:00
Matt Kopec 365e3359ab When parsing dwarf, add C functions to the fullname index.
This fixes function type resolution for C functions when requesting full function names.

llvm-svn: 180048
2013-04-22 21:13:22 +00:00
Daniel Malea 4818460269 Fix data race in Address class by wrapping m_offset in std::atomic
llvm-svn: 180047
2013-04-22 20:59:13 +00:00
Reid Kleckner 7ff21d934e Add a missing reference on a std::vector<> out param
Pointed out by Eli.  The test passes for me either way, so I missed
this.

llvm-svn: 180046
2013-04-22 20:58:09 +00:00
Anat Shemer 10260a75e3 Changed back (relative to commit 179786) the operations executed when extract(cast) is transformed to cast(extract). It uses the Builder class as before. In addition the result node is added to the Worklist, so all the previous extract users will become the new scalar cast users.
llvm-svn: 180045
2013-04-22 20:51:10 +00:00
Chad Rosier eeb0034918 Fix unused variable warning.
llvm-svn: 180044
2013-04-22 20:42:32 +00:00
Eli Bendersky 622455e87c Fix comment that didn't match the method it was above
llvm-svn: 180043
2013-04-22 20:30:50 +00:00
Simon Atanasyan af9ebc742d [Mips] Remove "REQUIRES: mips-registered-target" from some MIPS-related
driver tests. These tests check the driver only and do not require mips
target.

llvm-svn: 180042
2013-04-22 20:26:27 +00:00
Reid Kleckner 21a8c2f361 [Support] Propagate the environment into the test child process
Should fix the dragonegg bootstrap builder, which reasonably needs
LD_LIBRARY_PATH to be set.

llvm-svn: 180041
2013-04-22 20:23:41 +00:00
Akira Hatanaka d8fb032cff 80 columns.
llvm-svn: 180040
2013-04-22 20:13:37 +00:00
Akira Hatanaka 0d6964cf4a [mips] In performDSPShiftCombine, check that all elements in the vector are
shifted by the same amount and the shift amount is smaller than the element
size.

llvm-svn: 180039
2013-04-22 19:58:23 +00:00
Manman Ren 09a3912b5c TBAA: make sure zero-length bitfield works for tbaa.struct and path-aware tbaa
For ms structs, zero-length bitfields following non-bitfield members are
completely ignored, we should not increase the field index.
Before the fix, we will have an assertion failure.

llvm-svn: 180038
2013-04-22 19:50:07 +00:00
Chad Rosier cb78f0d05e [ms-inline asm] Remove the identifier parsing logic from the AsmParser. This is
now taken care of by the frontend, which allows us to parse arbitrary C/C++
variables.
Part of rdar://13663589

llvm-svn: 180037
2013-04-22 19:42:15 +00:00
Howard Hinnant 20428e94e0 Somehow aligned_union got dropped through the cracks. This adds it. Did a drive-by fix of alignment_of while I was in the neighborhood.
llvm-svn: 180036
2013-04-22 19:37:49 +00:00
Reid Kleckner 74679a93b2 [Support] Fix argv string escape bug on Windows
Summary:
This is http://llvm.org/PR15802.  Backslashes preceding double quotes in
arguments must be escaped.  The interesting bit is that all other
backslashes should *not* be escaped, because the un-escaping logic is
only triggered by the presence of a double quote character.

Reviewers: Bigcheese

CC: llvm-commits

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

llvm-svn: 180035
2013-04-22 19:03:55 +00:00
Peter Collingbourne 8988687d6b COFF: Fix weak external aliases.
Differential Revision: http://llvm-reviews.chandlerc.com/D700

llvm-svn: 180034
2013-04-22 18:48:56 +00:00
Enrico Granata cbd79b6c84 <rdar://problem/13590152>
Providing a dummy RegisterContext to secure against faulty Python OS plugins that do not return a valid RegisterContext
The RegisterContextDummy exports a PC with a constant 0xFFFFFFFFFFFFFFFF value

llvm-svn: 180033
2013-04-22 18:26:52 +00:00
Stephen Lin 2ec1b100a4 Extra paranoid test for r179925 (verify that tail calls are not generated to 'this'-returning constructors of objects with different 'this' pointers than the caller)
llvm-svn: 180032
2013-04-22 17:23:49 +00:00
Eli Bendersky 0577df4aec Document the -filetype option of llc (PR #12902)
llvm-svn: 180031
2013-04-22 17:16:35 +00:00
Eli Bendersky d9806687bc Fix for PR 14965: Better error message for GEP with partially defined contents
llvm-svn: 180030
2013-04-22 17:03:42 +00:00
Matt Kopec 5e6a5d6ce5 Fix for expression/breakpoint setting of gnu indirect functions.
Do this until we are able to resolve these symbols to their actual implementations without needing runtime support.

llvm-svn: 180029
2013-04-22 17:02:04 +00:00
Chad Rosier f6675c3d3e [ms-inline asm] Refactor/clean up the SemaLookup interface. No functional
change indended.
Part of rdar://13663589

llvm-svn: 180028
2013-04-22 17:01:46 +00:00
Chad Rosier b18a285525 [ms-inline asm] Refactor/clean up the SemaLookup interface. No functional
change indended.
Part of rdar://13663589

llvm-svn: 180027
2013-04-22 17:01:37 +00:00
Adrian Prantl 8cb1896b6e Move debug info tests for scoped enums into a separate file.
llvm-svn: 180026
2013-04-22 16:47:50 +00:00
Jia Liu 43eb48ebe4 Add AArch64 into $llvm_cv_target_arch in configure, reviewed by Tim Northover & Eric Christopher
llvm-svn: 180025
2013-04-22 16:26:15 +00:00
Benjamin Kramer c272794899 Use the ugly PRIx64 macro to make format string portable.
This is debugging code so functionality isn't a concern, but mingw32 warns
because it doesn't understand the %llx format specifier.

llvm-svn: 180024
2013-04-22 16:10:38 +00:00
Jia Liu 8932a882c8 typo
llvm-svn: 180023
2013-04-22 15:40:16 +00:00
Richard Smith d9f663b510 C++1y constexpr extensions, round 1: Allow most forms of declaration and
statement in constexpr functions. Everything which doesn't require variable
mutation is also allowed as an extension in C++11. 'void' becomes a literal
type to support constexpr functions which return 'void'.

llvm-svn: 180022
2013-04-22 15:31:51 +00:00
Benjamin Kramer 7dcc5583b4 Make doxygen comment match declaration.
Found by -Wdocumentation.

llvm-svn: 180021
2013-04-22 15:21:03 +00:00
Rafael Espindola 8bd2c228f8 Also verify llvm.compiler_used.
llvm-svn: 180020
2013-04-22 15:16:51 +00:00
Rafael Espindola 74f2e46eef Clarify that llvm.used can contain aliases.
Also add a check for llvm.used in the verifier and simplify clients now that
they can assume they have a ConstantArray.

llvm-svn: 180019
2013-04-22 14:58:02 +00:00
Richard Smith da466db02a cmake: Only add -pedantic if LLVM didn't add it. Don't unconditionally add
-Wall -W, since it's already provided by LLVM's cmake config, and that
overrides fixes (such as -Wno-uninitialized) which LLVM's cmake setup may have
provided.

llvm-svn: 180018
2013-04-22 14:51:21 +00:00
Richard Smith 9543c5e371 Fix array constant expression evaluation bug: we can have different values for
different array elements, even if they're all constructed using the same
default constructor.

llvm-svn: 180017
2013-04-22 14:44:29 +00:00
Eric Christopher 6cddedca72 The option is spelled -use-auto, not -loop-convert.
llvm-svn: 180016
2013-04-22 14:39:46 +00:00
Eric Christopher cc2cfe426d No really, don't store anything to this since it's unconditionally
set below.

llvm-svn: 180015
2013-04-22 14:11:25 +00:00
Eric Christopher 6647fb2c60 Remove variable store that is never read.
llvm-svn: 180014
2013-04-22 13:51:44 +00:00
Eric Christopher 845c2ca78c Remove variable store that is never read.
llvm-svn: 180013
2013-04-22 13:46:33 +00:00