Commit Graph

134970 Commits

Author SHA1 Message Date
Bill Wendling c3b3463fcf Sphinxify the ExtendingLLVM documentation.
llvm-svn: 165371
2012-10-07 04:56:08 +00:00
Rafael Espindola 35ca7d9ddf Use getArch instead of getArchName + string compare.
llvm-svn: 165370
2012-10-07 04:44:33 +00:00
Bill Wendling 668043f0db Sphinxify the compiler writer info documentation.
llvm-svn: 165369
2012-10-07 04:34:10 +00:00
Rafael Espindola e8bd4e50e4 Use getArch instead of getArchName.
The darwin change should be a nop since Triple::getArchTypeForDarwinArchName
doesn't know about amd64.

If things like amd64-mingw32 are to be rejected, we should print a error
earlier on instead of silently using the wrong abi.

Remove old comment that looks out of place, this is "in clang".

llvm-svn: 165368
2012-10-07 03:23:40 +00:00
Bob Wilson e0b1dea267 Make sure always-inline functions get inlined. <rdar://problem/12423986>
Without this change, when the estimated cost for inlining a function with
an "alwaysinline" attribute was lower than the inlining threshold, the
getInlineCost function was returning that estimated cost rather than the
special InlineCost::AlwaysInlineCost value. That is fine in the normal
inlining case, but it can fail when the inliner considers the opportunity
cost of inlining into an internal or linkonce-odr function. It may decide
not to inline the always-inline function in that case. The fix here is just
to make getInlineCost always return the special value for always-inline
functions. I ran into this building clang with libc++. Tablegen failed to
link because of an always-inline function that was not inlined. I have been
unable to reduce the testcase down to a reasonable size.

llvm-svn: 165367
2012-10-07 01:11:19 +00:00
Rafael Espindola ec2a51c154 Document MapVector.
llvm-svn: 165366
2012-10-07 00:56:09 +00:00
Dmitri Gribenko 67df63f69d List of potential checkers: smart pointer checker: actually, unique_ptr<T[]>
will do the right thing for new[] allocated memory.  Thanks David!

llvm-svn: 165365
2012-10-06 17:23:59 +00:00
Dmitri Gribenko 760cbe65fd Clang static analyzer docs: fix a couple of HTML markup issues and non-UTF-8
characters.

llvm-svn: 165364
2012-10-06 17:14:39 +00:00
Dmitri Gribenko a124d76ed1 List of potential checkers: more C++11 details for the smart pointer checker.
llvm-svn: 165363
2012-10-06 16:59:15 +00:00
Benjamin Kramer a801f4a81d Expose __builtin_bswap16.
GCC has always supported this on PowerPC and 4.8 supports it on all platforms,
so it's a good idea to expose it in clang too. LLVM supports this on all targets.

llvm-svn: 165362
2012-10-06 14:42:22 +00:00
Ted Kremenek 68e2c7bee3 Place warn_impcast_different_enum_types in a new warning group, -Wenum-conversion, that is a subgroup of -Wconversion.
llvm-svn: 165361
2012-10-06 05:25:43 +00:00
Ted Kremenek 76b8ac466e Add link to potential future checkers.
llvm-svn: 165360
2012-10-06 05:11:15 +00:00
Ted Kremenek 4bb7eb1c20 Add list of potential checkers. Provided by Anton Yartsev!
llvm-svn: 165359
2012-10-06 05:09:43 +00:00
Jordan Rose 69583bfefd [analyzer] Tweak test to run the retain-count checker even on non-Darwin.
This should fix the bots.

llvm-svn: 165358
2012-10-06 02:06:17 +00:00
Jason Molenda 53667f5da1 In DynamicLoaderDarwinKernel::OSKextLoadedKextSummary::LoadImageUsingMemoryModule(),
if we have a kernel binary, set the target's architecture to match.

Include the target's architecture in the ModuleSpec when we're searching for the 
kext binaries on the local system -- otherwise we won't get a specific slice of
a fat file picked out for us and we won't use the returned Module correctly.

Remove the redundant attempt to find a file on the local filesystem from this method.


In ProcessGDBRemote::CheckForKernel(), if we have a kernel binary in memory, mark
the canJIT as false.  There is no jitting code in kernel debug sessions.

llvm-svn: 165357
2012-10-06 02:02:26 +00:00
Jason Molenda cc62f28735 Revert Vishal's patch that Enrico commited, at least for the weekend. With it applied,
starting lldb I get

% ./lldb -x
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/private/tmp/build/Debug/LLDB.framework/Versions/A/Resources/Python/lldb/__init__.py", line 9008
    raise TypeError("No array item of type %s" % str(type(key)))
        ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
(lldb)


I did a clean build and still got the problem so I'm backing this out until Enrico can
look at it.

llvm-svn: 165356
2012-10-06 01:46:12 +00:00
Jordan Rose adb5354c2c ParentMap: Restore the ability to update an existing map.
The Clang ASTs are a DAG, not a pure tree. However, ParentMap has to
choose a single parent for each object. In the main (only?) cases in
which the AST forms a DAG, it protects from multiple traversal by using
OpaqueValueExprs. Previously, ParentMap would just unconditionally look
through all OpaqueValueExprs when building its map.

In order to make this behavior better for the analyzer's diagnostics,
ParentMap was changed to not set a statement's parent if there already
was one in the map. However, ParentMap is supposed to allow updating
existing mappings by calling addStmt once again. This change makes the
"transparency" of OpaqueValueExprs explicit, and disables it when it
is not desired, rather than checking the current contents of the map.

This new code seems like a big change, but it should actually have
essentially the same performance as before. Only OpaqueValueExprs and
their users (PseudoObjectExpr and BinaryConditionalOperator) will
have any different behavior.

There should be no user-visible functionality change, though a test
has been added for the current behavior of BinaryConditionalOperator
source locations and accompanying Xcode arrows (which are not so great...).

llvm-svn: 165355
2012-10-06 01:19:36 +00:00
Jordan Rose c8a78a37bb [analyzer] Handle implicit statements used for end-of-path nodes' source locs.
Some implicit statements, such as the implicit 'self' inserted for "free"
Objective-C ivar access, have invalid source locations. If one of these
statements is the location where an issue is reported, we'll now look at
the enclosing statements for a valid source location.

<rdar://problem/12446776>

llvm-svn: 165354
2012-10-06 01:19:30 +00:00
Argyrios Kyrtzidis ba30d92504 [libclang] Fix the comments, as suggested by Dmitri.
llvm-svn: 165353
2012-10-06 01:18:38 +00:00
Argyrios Kyrtzidis 6a80e7564f [libclang] Don't disable the preprocessing record while indexing so as
to not mess up with module building.

It was not worth trying to combine indexing without preprocessing record
and building modules with one because:

-just importing a module/PCH that was built with a pp record, enables it anyway
-the performance gain of indexing without the preprocessing record is insignificant.

llvm-svn: 165352
2012-10-06 01:18:35 +00:00
Jack Carter e948ec52d1 Adding support for instructions mfc0, mfc2, mtc0, mtc2
move from and to coprocessors 0 and 2.

Contributer: Vladimir Medic
llvm-svn: 165351
2012-10-06 01:17:37 +00:00
Jack Carter 92995f156e Minor changes based on post commit review:
Contributer: Vladimir Medic
llvm-svn: 165350
2012-10-06 00:53:28 +00:00
Jim Ingham 215341c25b Make the error message from regex commands use the command's syntax string if it exists rather than a generic but
not at all helpful message about not matching some unknown regex...

llvm-svn: 165349
2012-10-06 00:27:04 +00:00
Enrico Granata ffe2d52a06 patch from Vishal Patel to improve our lldb.value wrapper
llvm-svn: 165348
2012-10-06 00:06:18 +00:00
Alex Rosenberg 6a41c3c005 Fix another spot where this test varied for a Release build.
llvm-svn: 165347
2012-10-05 23:56:20 +00:00
Jack Carter 99d2afe11f Minor changes based on post commit review:
Contributer: Vladimir Medic
llvm-svn: 165346
2012-10-05 23:55:28 +00:00
Alex Rosenberg 17710a3b9a Make test resilient to Release build temp names.
llvm-svn: 165345
2012-10-05 23:33:39 +00:00
Enrico Granata cd29fefbff <rdar://problem/12442990> Fix the implementation of lldb.value.__eq__
llvm-svn: 165344
2012-10-05 23:20:58 +00:00
Alex Rosenberg ba036126cf Propagate calling convention for aliases and weakrefs.
llvm-svn: 165343
2012-10-05 23:12:53 +00:00
Alex Rosenberg eba9c5c259 FileCheckize test
llvm-svn: 165342
2012-10-05 23:12:48 +00:00
Enrico Granata e3fcd2bb53 <rdar://problem/12426557> Fixing the NSIndexSet data formatter
llvm-svn: 165341
2012-10-05 22:58:46 +00:00
Jason Molenda 675e45c770 Remove "k" as an alias for "kill". It doesn't ask for confirmation and
it's too easy to type by mistake when typing "l" (read: I did this once).

llvm-svn: 165340
2012-10-05 22:56:23 +00:00
DeLesley Hutchins 1fe885614d Thread-safety analysis: allow attributes on constructors to refer to 'this'.
llvm-svn: 165339
2012-10-05 22:38:19 +00:00
Ted Kremenek 450f9f29b2 Add color output to 'diagtool tree' to show what warnings are enabled by default.
llvm-svn: 165338
2012-10-05 22:07:14 +00:00
Bill Schmidt d1fa36f903 This patch splits apart PPCISelLowering::LowerFormalArguments_Darwin_Or_64SVR4
into separate versions for the Darwin and 64-bit SVR4 ABIs.  This will
facilitate doing more major surgery on the 64-bit SVR4 ABI in the near future.

llvm-svn: 165336
2012-10-05 21:27:08 +00:00
Dmitri Gribenko 8b76113f05 HowToSetUpLLVMStyleRTTI.rst: remove unneeded semicolons in code examples.
llvm-svn: 165335
2012-10-05 20:52:13 +00:00
Dmitri Gribenko 9dd4687fcc GoldPlugin.rst: minor typesetting fixes.
llvm-svn: 165334
2012-10-05 20:50:05 +00:00
Jason Molenda 48d88919d7 Remove two more cases of "-w write" being specified
to watch var set/exp -- that's now the default in the
shipped lldb.

llvm-svn: 165333
2012-10-05 20:28:11 +00:00
Jason Molenda 80f1663a9c Improve shortened examples of the watchpoint commands.
Document "f <n>" selects frame n.  
"t <n>" selects thread n but this was just added to TOT
so most people won't have access to an lldb that accepts it.

llvm-svn: 165332
2012-10-05 20:25:53 +00:00
Benjamin Kramer db5fb3bfe8 Remove unused but set variable flagged by GCC.
llvm-svn: 165331
2012-10-05 20:08:45 +00:00
Jim Ingham 067df8090a Remove the bt alias I inadvertently added back in in my last checkin.
llvm-svn: 165330
2012-10-05 19:48:19 +00:00
Aaron Ballman 57f590e674 Changing line endings from Windows to Unix. No functional changes.
llvm-svn: 165329
2012-10-05 19:46:32 +00:00
Jim Ingham ca36cd16e4 Add one-shot breakpoints (-o option to "break set") and a tbreak alias for our gdb friends.
llvm-svn: 165328
2012-10-05 19:16:31 +00:00
Jim Ingham 874f43cadc Fix a test failure caused by checkin 165274.
llvm-svn: 165327
2012-10-05 19:14:57 +00:00
Chad Rosier 3fa4e8cade [ms-inline asm] Add a comment describing the MapAndConstraints.
llvm-svn: 165326
2012-10-05 19:00:51 +00:00
Michael Liao 4a7f8c23e0 Add intrinsic of MULX in BMI2 header
llvm-svn: 165325
2012-10-05 18:50:09 +00:00
Chad Rosier 8f06e7dea4 [ms-inline asm] Add a few typedefs to simplify future changes.
llvm-svn: 165324
2012-10-05 18:41:14 +00:00
Reed Kotler 240322140e Patch for integer multiply, signed/unsigned, long/long long.
llvm-svn: 165322
2012-10-05 18:27:54 +00:00
Benjamin Kramer 62f7fb977c Simplify code, don't or a bool with an uint64_t.
No functionality change.

llvm-svn: 165321
2012-10-05 18:19:44 +00:00
Benjamin Kramer 28326d8e1d Remove empty file.
llvm-svn: 165320
2012-10-05 17:41:49 +00:00