Commit Graph

142713 Commits

Author SHA1 Message Date
Michael Gottesman ef2bc77330 Added clarification paragraph to LangRef's documentation of
GlobalVariable about LLVM's assumptions vis-a-vis Global Variable
initial values and Global Variable initializers.

This is in preparation for adding the new keyword
externally_initialized.

Specifically, the patch explains how LLVM optimizes global initializers
by assumign that global variables defined within the module are not
modified from their initial values before the start of the global
initializer.

llvm-svn: 174269
2013-02-03 09:57:15 +00:00
Alex Rosenberg b65e88863e Spelling and grammar corrections.
llvm-svn: 174268
2013-02-03 07:05:26 +00:00
Jason Molenda b9c9f9b200 Change CommandObjectTargetSymbolsAdd to require that a target exists;
fixes crash of the form

% lldb
(lldb) target symbols add /tmp/symbols.dSYM
(lldb) Killed: 9

<rdar://problem/13139481> 

llvm-svn: 174267
2013-02-02 06:00:36 +00:00
David Blaikie 33111dfea0 Remove the (apparently) unnecessary debug info metadata indirection.
The main lists of debug info metadata attached to the compile_unit had an extra
layer of metadata nodes they went through for no apparent reason. This patch
removes that (& still passes just as much of the GDB 7.5 test suite). If anyone
can show evidence as to why these extra metadata nodes are there I'm open to
reverting this patch & documenting why they're there.

llvm-svn: 174266
2013-02-02 05:56:24 +00:00
Jordan Rose e0c260f137 Revert "[analyzer] Model trivial copy/move ctors with an aggregate bind."
...again. The problem has not been fixed and our internal buildbot is still
getting hangs.

This reverts r174212, originally applied in r173951, then reverted in r174069.
Will not re-apply until the entire project analyzes successfully on my
local machine.

llvm-svn: 174265
2013-02-02 05:15:53 +00:00
Reed Kotler f8933f83f0 Start static relocation implementation for mips16.
This checkin makes hello world work. 

llvm-svn: 174264
2013-02-02 04:07:35 +00:00
Dmitri Gribenko 2f23e9c520 libclang: introduce cxstring::{createRef,createDup} for StringRefs
Also migrate all clients from the old API.

llvm-svn: 174263
2013-02-02 02:19:29 +00:00
Richard Smith c084bd2888 PR15132: Replace "address expression must be an lvalue or a function
designator" diagnostic with more correct and more human-friendly "cannot take
address of rvalue of type 'T'".

For the case of & &T::f, provide a custom diagnostic, rather than unhelpfully
saying "cannot take address of rvalue of type '<overloaded function type>'".

For the case of &array_temporary, treat it just like a class temporary
(including allowing it as an extension); the existing diagnostic wording
for the class temporary case works fine.

llvm-svn: 174262
2013-02-02 02:14:45 +00:00
Richard Smith 4be2c36921 Correctly classify T{} as an array temporary if T is an array of class type with nontrivial destructor.
llvm-svn: 174261
2013-02-02 02:11:36 +00:00
Ted Kremenek 26c777c409 Add some horrible Perl code to teach scan-build to recursively walk a directory for HTML files.
llvm-svn: 174260
2013-02-02 01:52:41 +00:00
Manman Ren 053e4ff008 Removing ssp and uwtable from the testcase
llvm-svn: 174259
2013-02-02 01:34:38 +00:00
Greg Clayton 4edb7ab8b2 Added support for the qCmd monitor packet command. Currently it can only do:
set logfile=<path>
set logmask=<num>

But this opens the door for us to do much more.

llvm-svn: 174258
2013-02-02 01:13:48 +00:00
Richard Smith d712d0dbdd Don't forget to run destructors when we create an array temporary of class type.
llvm-svn: 174257
2013-02-02 01:13:06 +00:00
Ted Kremenek f5209c4b45 Revert "Update checker build to checker-271."
Turns out we didn't update scan-build to work with HTML files in nested directories.

llvm-svn: 174256
2013-02-02 01:06:22 +00:00
Michael Gottesman be9614c755 Fixed another whitespace issue... *sigh*.
llvm-svn: 174255
2013-02-02 01:05:06 +00:00
Michael Gottesman b46072d7ac Fixed whitespace.
llvm-svn: 174254
2013-02-02 01:03:01 +00:00
Michael Gottesman cf50e6d6ce On platforms which do not support ARC natively, do not mark objc_retain/objc_release as "nonlazybind".
rdar://13108298.
rdar://13129783.

llvm-svn: 174253
2013-02-02 00:57:44 +00:00
Ted Kremenek 93482a523c Update checker build to checker-271.
llvm-svn: 174252
2013-02-02 00:57:28 +00:00
Bill Wendling 9122618307 Remove AttrBuilder::Raw().
llvm-svn: 174251
2013-02-02 00:52:44 +00:00
Bill Wendling 9ca01da53d Use the AttributeSet's iterators.
Use the AttributeSet's iterators in AttrBuilder::hasAttributes() when
determining of the intersection of the AttrBuilder and AttributeSet is non-null.

llvm-svn: 174250
2013-02-02 00:42:06 +00:00
David Blaikie b7d1e1ff57 Revert r174246, accidentally committed.
This reverts commit 1513eb9284c23acfd19cf742b95996fbb11ca741.

llvm-svn: 174249
2013-02-02 00:39:32 +00:00
David Blaikie cbf40d22bf Sentenc-ify comment added in r174206.
Based on post-commit review by Paul Robinson.

llvm-svn: 174248
2013-02-02 00:36:58 +00:00
David Blaikie f85744235b Generalize DebugInfo tests by avoiding explicit metadata numbers
This addresses several (not all) debug info tests that use explicit metadata
numbers. Wherever the same number appeared more than once in a test I used
a named match to ensure the same number appeared in all those cases (this may
still be overly constraining test cases as they may not have actually cared
about that relationship). For one-off numbers I just replaced them with an
unnamed regex.

This may underconstrain poorly written test cases that were interested in
checking that certain metadata nodes were related but didn't actually match
on all the related nodes numbers.

llvm-svn: 174247
2013-02-02 00:34:26 +00:00
David Blaikie ef50169a03 Basics
llvm-svn: 174246
2013-02-02 00:34:16 +00:00
Anna Zaks 00c69a597c [analyzer] Always inline functions with bodies generated by BodyFarm.
Inlining these functions is essential for correctness. We often have
cases where we do not inline calls. For example, the shallow mode and
when reanalyzing previously inlined ObjC methods as top level.

llvm-svn: 174245
2013-02-02 00:30:04 +00:00
Anna Zaks e9eb13aba3 [analyzer] Print Inline mode with -analyzer-display-progress.
llvm-svn: 174244
2013-02-02 00:30:02 +00:00
Anna Zaks 10641e66b0 [analyzer] Fix typo.
llvm-svn: 174243
2013-02-02 00:29:59 +00:00
Nick Lewycky 45b5052834 This patch makes "&Cls::purevfn" not an odr use. This isn't what the standard
says, but that's a defect (to be filed). "Cls::purevfn()" is still an odr use.

Also fixes a bug that caused us to not mark the function referenced just
because we didn't want to mark it odr used.

llvm-svn: 174242
2013-02-02 00:25:55 +00:00
Nick Lewycky 535d97cc86 Revert accidental commit (ran svn commit from wrong directory).
llvm-svn: 174241
2013-02-02 00:25:26 +00:00
Nick Lewycky a8c77e4266 This patch makes "&Cls::purevfn" not an odr use. This isn't what the standard
says, but that's a defect (to be filed). "Cls::purevfn()" is still an odr use.

Also fixes a bug in the previous patch that caused us to not mark the function
referenced just because we didn't want to mark it odr used.

llvm-svn: 174240
2013-02-02 00:22:37 +00:00
Shuxin Yang cadd8a068e rdar://13126763
Fix a bug in DAGCombine. The symptom is mistakenly optimizing expression
"x + x*x" into "x * 3.0".

llvm-svn: 174239
2013-02-02 00:22:03 +00:00
Dmitri Gribenko 3c66b0be90 libclang: introduce cxstring::{createRef,createDup} for C strings
Also migrate all clients from the old API.

llvm-svn: 174238
2013-02-02 00:02:12 +00:00
Manman Ren e498b25bc5 Correct indentation for dumping LexicalScope.
llvm-svn: 174237
2013-02-02 00:02:03 +00:00
Enrico Granata 599171addf Moving from std::auto_ptr<char> to std::string for simple string memory management.
It is better practice and, also, it is not clear whether std::auto_ptr<> is smart enough to know about delete[] vs. delete

llvm-svn: 174236
2013-02-01 23:59:44 +00:00
Manman Ren e697d3cd2e [Dwarf] avoid emitting multiple AT_const_value for static memebers.
Testing case is reduced from MultiSource/BenchMarks/Prolangs-C++/deriv1.

rdar://problem/13071590

llvm-svn: 174235
2013-02-01 23:54:37 +00:00
Douglas Gregor 44180f8f6d Merge "special" types from different modules in the AST reader.
Different modules may have different views of the various "special"
types in the AST, such as the redefinition type for "id". Merge those
types rather than only considering the redefinition types for the
first AST file loaded.

llvm-svn: 174234
2013-02-01 23:45:03 +00:00
Greg Clayton 6bade327dc <rdar://problem/13050227>
Added a regular expression command called "_regexp-list" which mimics the GDB "line" command in the following forms:

LINENUM, to list around that line in current file,
FILE:LINENUM, to list around that line in that file,
FUNCTION, to list around beginning of that function,
*ADDRESS, to list around the line containing that address.
ADDRESS, same as above, but don't require a '*' as long as ADDRESS is hex

llvm-svn: 174233
2013-02-01 23:33:03 +00:00
Bill Schmidt cc99a2f61d Add notes about future PowerPC features
llvm-svn: 174232
2013-02-01 23:10:09 +00:00
Greg Clayton ba4a0a5db5 <rdar://problem/12693921>
Added the ability to send monitor command to the remote GDB server with "process plugin packet monitor".

llvm-svn: 174231
2013-02-01 23:03:47 +00:00
Bill Schmidt 52742c25ae LLVM enablement for some older PowerPC CPUs
llvm-svn: 174230
2013-02-01 22:59:51 +00:00
NAKAMURA Takumi a7c84e6050 clang/test/CodeGenCXX/debug-info-class.cpp: Fixup for -Asserts.
llvm-svn: 174229
2013-02-01 22:53:19 +00:00
Bill Wendling 7a33f779b9 Change the AttributeImpl to hold a single Constant* for the values.
This Constant could be an aggregate to represent multiple values.

llvm-svn: 174228
2013-02-01 22:32:30 +00:00
Greg Clayton f5fc08445f <rdar://problem/13130975>
Class global variables were not being linked correctly when debugging with DWARF in .o files.

llvm-svn: 174227
2013-02-01 22:08:49 +00:00
Greg Clayton 39f7ee86c8 <rdar://problem/13092722>
Fix in loading mach files from memory when using DynamicLoaderMacOSXDYLD.

Removed the uuid mismatch warning that could be spit out and any time during debugging and removed the test case that was looking for that. Currently the "add-dsym" or "target symbols add" command will report an error when the UUID's don't match.

Be more careful when checking and resolving section + offset addresses to make sure none of the base addresses are invalid.

llvm-svn: 174222
2013-02-01 21:38:35 +00:00
Preston Gurd 25c3b6acc0 This patch aims to improve compile time performance by increasing
the SCEV vector size in LoopStrengthReduce. It is observed that
the BaseRegs vector size is 4 in most cases,
and elements are frequently copied when it is initialized as
SmallVector<const SCEV *, 2> BaseRegs.
Our benchmark results show that the compilation time performance
improved by ~0.5%.

Patch by Wan Xiaofei.

llvm-svn: 174219
2013-02-01 20:41:27 +00:00
Argyrios Kyrtzidis a364782a15 Const'ify Preprocessor::getPredefinesFileID.
llvm-svn: 174218
2013-02-01 20:35:47 +00:00
Dmitri Gribenko 8db86f6501 Unbreak Makefile build after r174216
llvm-svn: 174217
2013-02-01 20:30:26 +00:00
Dmitri Gribenko 2e72dd4a43 Comment parsing: improve the fidelity of XML output for many block commands
This change introduces a 'kind' attribute for the <Para> tag, that captures the
kind of the parent block command.

For example:

\todo Meow.

used to be just <Para>Meow.</Para>, but now it is
<Para kind="todo">Meow.</Para>

llvm-svn: 174216
2013-02-01 20:23:57 +00:00
Bill Schmidt 38378a06dd Add some missing PPC cpus
llvm-svn: 174215
2013-02-01 20:23:10 +00:00
Fariborz Jahanian 4dca1d3d81 objc: Provide correct fixit instruction when two mismatched
nsstringis are compared without. // rdar://12716301

llvm-svn: 174214
2013-02-01 20:04:49 +00:00