Commit Graph

142834 Commits

Author SHA1 Message Date
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
Jordan Rose b54cfa310a [analyzer] Explain why we have system-header-simulator*.h files.
Suggested by Csaba. Text based on an e-mail of mine on cfe-dev.

llvm-svn: 174213
2013-02-01 19:50:01 +00:00
Jordan Rose b6717cc6d0 Re-apply "[analyzer] Model trivial copy/move ctors with an aggregate bind."
With the optimization in the previous commit, this should be safe again.

Originally applied in r173951, then reverted in r174069.

llvm-svn: 174212
2013-02-01 19:49:59 +00:00
Jordan Rose 49d5f8825d [analyzer] Reuse a LazyCompoundVal if its type matches the new region.
This allows us to keep from chaining LazyCompoundVals in cases like this:
  CGRect r = CGRectMake(0, 0, 640, 480);
  CGRect r2 = r;
  CGRect r3 = r2;

Previously we only made this optimization if the struct did not begin with
an aggregate member, to make sure that we weren't picking up an LCV for
the first field of the struct. But since LazyCompoundVals are typed, we can
make that inference directly by comparing types.

This is a pure optimization; the test changes are to guard against possible
future regressions.

llvm-svn: 174211
2013-02-01 19:49:57 +00:00
Dan Gohman 9ee4bc1abc Add a testcase for some past-the-end address subtleties.
llvm-svn: 174210
2013-02-01 19:37:52 +00:00
Jim Ingham 95a777e915 Correct the definition of ObjC's BOOL in our pre-canned set of defines. It's supposed to
be "signed char" not "int".

<rdar://problem/13131126>

llvm-svn: 174209
2013-02-01 19:33:52 +00:00
David Sehr 8114a7a651 Two changes relevant to LEA and x32:
1) allows the use of RIP-relative addressing in 32-bit LEA instructions under
   x86-64 (ILP32 and LP64)
2) separates the size of address registers in 64-bit LEA instructions from
   control by ILP32/LP64.

llvm-svn: 174208
2013-02-01 19:28:09 +00:00
Nadav Rotem f04cbeb357 Fix errant fallthrough in the generation of the lifetime markers.
Found by Alexander Kornienko.

llvm-svn: 174207
2013-02-01 19:25:23 +00:00
David Blaikie 357aafb566 Fix exception handling line table problems introduced by r173593
r173593 made us a little too eager to associate all code at the end of a
function with the user-written 'return' line. This caused problems with
breakpoints as they'd be set in exception handling code preceeding the
actual non-exception return handling code, leading to the breakpoint never
being hit in non-exceptional execution.

This change restores the pre-r173593 exception handling line information where
the cleanup code is associated with the '}' not the return line.

llvm-svn: 174206
2013-02-01 19:09:49 +00:00
Jim Grosbach d0ef72808c Fix misplaced 'break'.
llvm-svn: 174205
2013-02-01 18:57:06 +00:00
Hal Finkel b58ce85ecc Add -mqpx and -mno-qpx feature flags to toggle use of the PPC QPX vector instruction set
I've renamed the altivec test to ppc-features (because now there is more than one feature to test).

llvm-svn: 174204
2013-02-01 18:44:19 +00:00
Chad Rosier dbf46a16c7 [driver] Don't try to generate diagnostic information for dsymutil crashes.
Part of rdar://13134273

llvm-svn: 174203
2013-02-01 18:30:26 +00:00
Alexander Kornienko b98f6e5bd0 Micro change: moved '{' for better readability (+don't confuse -Wimplicit-fallthrough)
llvm-svn: 174202
2013-02-01 18:28:04 +00:00
Dmitri Gribenko d2f96ef091 Fix indent
llvm-svn: 174201
2013-02-01 18:18:00 +00:00
Shankar Easwaran a47495898c remove duplicate strings from the string table
llvm-svn: 174200
2013-02-01 18:06:15 +00:00
Shankar Easwaran d476528e3d add alignment to .got/.got.plt/.plt sections & fix tests
llvm-svn: 174199
2013-02-01 18:03:32 +00:00
Chad Rosier 12d7800a9b Use a continue to simplify loop and reduce indentation. No functional change.
llvm-svn: 174198
2013-02-01 17:49:07 +00:00
Dmitri Gribenko f7d563c160 Fix comments: these are not trailing comments
llvm-svn: 174197
2013-02-01 17:25:11 +00:00
Jyotsna Verma 10f5c2db4e Hexagon: Test case to confirm generation of indexed loads with zero offset.
llvm-svn: 174196
2013-02-01 16:40:06 +00:00
Dmitri Gribenko 946aca8524 libclang: document the purpose of createNull()
llvm-svn: 174195
2013-02-01 16:38:41 +00:00
Dmitri Gribenko 74f3e1e028 libclang: add comments for CXStringFlag
llvm-svn: 174194
2013-02-01 16:36:31 +00:00
Jyotsna Verma 2ceafa6684 Replace LDriu*[bhdw]_indexed_V4 instructions with "def Pats".
llvm-svn: 174193
2013-02-01 16:36:16 +00:00
Argyrios Kyrtzidis 71c1af8760 [modules] Introduce ModuleFile::DirectImportLoc which is the source location
where the module was explicitly or implicitly imported in the local translation unit.

llvm-svn: 174192
2013-02-01 16:36:14 +00:00
Argyrios Kyrtzidis 125df0589b For ModuleLoader::makeModuleVisible() also pass the source location where the
module import occurred.

llvm-svn: 174191
2013-02-01 16:36:12 +00:00
Argyrios Kyrtzidis 22c22f5f9a Introduce SourceManager::PredefinesFileID, to allow each checking of whether
a source location came from the predefines buffer.

llvm-svn: 174190
2013-02-01 16:36:07 +00:00
Alexey Samsonov 4985b8766e [Sanitizer] use u32 instead of mode_t, which is defined in Darwin headers
llvm-svn: 174189
2013-02-01 16:32:18 +00:00
Alexey Samsonov 2e50809961 [ASan] remove debug output from the test
llvm-svn: 174188
2013-02-01 16:06:25 +00:00
Alexey Samsonov 39313b780d [Sanitizer] make internal_open have the same interface as libc version
llvm-svn: 174187
2013-02-01 15:58:46 +00:00
Jyotsna Verma d6eda1c227 Add appropriate TSFlags to the instructions that must be always extended.
llvm-svn: 174186
2013-02-01 15:54:43 +00:00
Bill Schmidt b02158d474 Add check for @foo
llvm-svn: 174185
2013-02-01 15:52:51 +00:00