platform/upstream/llvm.git
11 years ago[ELF][Reader] Improve performance by removing calls to malloc.
Michael J. Spencer [Sun, 3 Feb 2013 10:49:47 +0000 (10:49 +0000)]
[ELF][Reader] Improve performance by removing calls to malloc.

llvm-svn: 174275

11 years ago[ELF] Fix uninitialized variable.
Michael J. Spencer [Sun, 3 Feb 2013 10:49:37 +0000 (10:49 +0000)]
[ELF] Fix uninitialized variable.

llvm-svn: 174274

11 years ago[Archive] Update to LLVM change.
Michael J. Spencer [Sun, 3 Feb 2013 10:49:26 +0000 (10:49 +0000)]
[Archive] Update to LLVM change.

llvm-svn: 174273

11 years ago[Object][Archive] Improve performance.
Michael J. Spencer [Sun, 3 Feb 2013 10:48:50 +0000 (10:48 +0000)]
[Object][Archive] Improve performance.

Improve performance of iterating over children and accessing the member file
buffer by caching the file size and moving code out to the header.

This also makes getBuffer return a StringRef instead of a MemoryBuffer. Both
fixing a memory leak and removing a malloc.

This takes getBuffer from ~10% of the time in lld to unmeasurable.

llvm-svn: 174272

11 years ago[Support] Add LLVM_IS_UNALIGNED_ACCESS_FAST.
Michael J. Spencer [Sun, 3 Feb 2013 10:48:31 +0000 (10:48 +0000)]
[Support] Add LLVM_IS_UNALIGNED_ACCESS_FAST.

llvm-svn: 174271

11 years agoAdded new Global Variable marker ``externally_initialized'' to LangRef.
Michael Gottesman [Sun, 3 Feb 2013 09:57:18 +0000 (09:57 +0000)]
Added new Global Variable marker ``externally_initialized'' to LangRef.

llvm-svn: 174270

11 years agoAdded clarification paragraph to LangRef's documentation of
Michael Gottesman [Sun, 3 Feb 2013 09:57:15 +0000 (09:57 +0000)]
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

11 years agoSpelling and grammar corrections.
Alex Rosenberg [Sun, 3 Feb 2013 07:05:26 +0000 (07:05 +0000)]
Spelling and grammar corrections.

llvm-svn: 174268

11 years agoChange CommandObjectTargetSymbolsAdd to require that a target exists;
Jason Molenda [Sat, 2 Feb 2013 06:00:36 +0000 (06:00 +0000)]
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

11 years agoRemove the (apparently) unnecessary debug info metadata indirection.
David Blaikie [Sat, 2 Feb 2013 05:56:24 +0000 (05:56 +0000)]
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

11 years agoRevert "[analyzer] Model trivial copy/move ctors with an aggregate bind."
Jordan Rose [Sat, 2 Feb 2013 05:15:53 +0000 (05:15 +0000)]
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

11 years agoStart static relocation implementation for mips16.
Reed Kotler [Sat, 2 Feb 2013 04:07:35 +0000 (04:07 +0000)]
Start static relocation implementation for mips16.
This checkin makes hello world work.

llvm-svn: 174264

11 years agolibclang: introduce cxstring::{createRef,createDup} for StringRefs
Dmitri Gribenko [Sat, 2 Feb 2013 02:19:29 +0000 (02:19 +0000)]
libclang: introduce cxstring::{createRef,createDup} for StringRefs

Also migrate all clients from the old API.

llvm-svn: 174263

11 years agoPR15132: Replace "address expression must be an lvalue or a function
Richard Smith [Sat, 2 Feb 2013 02:14:45 +0000 (02:14 +0000)]
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

11 years agoCorrectly classify T{} as an array temporary if T is an array of class type with...
Richard Smith [Sat, 2 Feb 2013 02:11:36 +0000 (02:11 +0000)]
Correctly classify T{} as an array temporary if T is an array of class type with nontrivial destructor.

llvm-svn: 174261

11 years agoAdd some horrible Perl code to teach scan-build to recursively walk a directory for...
Ted Kremenek [Sat, 2 Feb 2013 01:52:41 +0000 (01:52 +0000)]
Add some horrible Perl code to teach scan-build to recursively walk a directory for HTML files.

llvm-svn: 174260

11 years agoRemoving ssp and uwtable from the testcase
Manman Ren [Sat, 2 Feb 2013 01:34:38 +0000 (01:34 +0000)]
Removing ssp and uwtable from the testcase

llvm-svn: 174259

11 years agoAdded support for the qCmd monitor packet command. Currently it can only do:
Greg Clayton [Sat, 2 Feb 2013 01:13:48 +0000 (01:13 +0000)]
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

11 years agoDon't forget to run destructors when we create an array temporary of class type.
Richard Smith [Sat, 2 Feb 2013 01:13:06 +0000 (01:13 +0000)]
Don't forget to run destructors when we create an array temporary of class type.

llvm-svn: 174257

11 years agoRevert "Update checker build to checker-271."
Ted Kremenek [Sat, 2 Feb 2013 01:06:22 +0000 (01:06 +0000)]
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

11 years agoFixed another whitespace issue... *sigh*.
Michael Gottesman [Sat, 2 Feb 2013 01:05:06 +0000 (01:05 +0000)]
Fixed another whitespace issue... *sigh*.

llvm-svn: 174255

11 years agoFixed whitespace.
Michael Gottesman [Sat, 2 Feb 2013 01:03:01 +0000 (01:03 +0000)]
Fixed whitespace.

llvm-svn: 174254

11 years agoOn platforms which do not support ARC natively, do not mark objc_retain/objc_release...
Michael Gottesman [Sat, 2 Feb 2013 00:57:44 +0000 (00:57 +0000)]
On platforms which do not support ARC natively, do not mark objc_retain/objc_release as "nonlazybind".

rdar://13108298.
rdar://13129783.

llvm-svn: 174253

11 years agoUpdate checker build to checker-271.
Ted Kremenek [Sat, 2 Feb 2013 00:57:28 +0000 (00:57 +0000)]
Update checker build to checker-271.

llvm-svn: 174252

11 years agoRemove AttrBuilder::Raw().
Bill Wendling [Sat, 2 Feb 2013 00:52:44 +0000 (00:52 +0000)]
Remove AttrBuilder::Raw().

llvm-svn: 174251

11 years agoUse the AttributeSet's iterators.
Bill Wendling [Sat, 2 Feb 2013 00:42:06 +0000 (00:42 +0000)]
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

11 years agoRevert r174246, accidentally committed.
David Blaikie [Sat, 2 Feb 2013 00:39:32 +0000 (00:39 +0000)]
Revert r174246, accidentally committed.

This reverts commit 1513eb9284c23acfd19cf742b95996fbb11ca741.

llvm-svn: 174249

11 years agoSentenc-ify comment added in r174206.
David Blaikie [Sat, 2 Feb 2013 00:36:58 +0000 (00:36 +0000)]
Sentenc-ify comment added in r174206.

Based on post-commit review by Paul Robinson.

llvm-svn: 174248

11 years agoGeneralize DebugInfo tests by avoiding explicit metadata numbers
David Blaikie [Sat, 2 Feb 2013 00:34:26 +0000 (00:34 +0000)]
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

11 years agoBasics
David Blaikie [Sat, 2 Feb 2013 00:34:16 +0000 (00:34 +0000)]
Basics

llvm-svn: 174246

11 years ago[analyzer] Always inline functions with bodies generated by BodyFarm.
Anna Zaks [Sat, 2 Feb 2013 00:30:04 +0000 (00:30 +0000)]
[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

11 years ago[analyzer] Print Inline mode with -analyzer-display-progress.
Anna Zaks [Sat, 2 Feb 2013 00:30:02 +0000 (00:30 +0000)]
[analyzer] Print Inline mode with -analyzer-display-progress.

llvm-svn: 174244

11 years ago[analyzer] Fix typo.
Anna Zaks [Sat, 2 Feb 2013 00:29:59 +0000 (00:29 +0000)]
[analyzer] Fix typo.

llvm-svn: 174243

11 years agoThis patch makes "&Cls::purevfn" not an odr use. This isn't what the standard
Nick Lewycky [Sat, 2 Feb 2013 00:25:55 +0000 (00:25 +0000)]
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

11 years agoRevert accidental commit (ran svn commit from wrong directory).
Nick Lewycky [Sat, 2 Feb 2013 00:25:26 +0000 (00:25 +0000)]
Revert accidental commit (ran svn commit from wrong directory).

llvm-svn: 174241

11 years agoThis patch makes "&Cls::purevfn" not an odr use. This isn't what the standard
Nick Lewycky [Sat, 2 Feb 2013 00:22:37 +0000 (00:22 +0000)]
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

11 years agordar://13126763
Shuxin Yang [Sat, 2 Feb 2013 00:22:03 +0000 (00:22 +0000)]
rdar://13126763

Fix a bug in DAGCombine. The symptom is mistakenly optimizing expression
"x + x*x" into "x * 3.0".

llvm-svn: 174239

11 years agolibclang: introduce cxstring::{createRef,createDup} for C strings
Dmitri Gribenko [Sat, 2 Feb 2013 00:02:12 +0000 (00:02 +0000)]
libclang: introduce cxstring::{createRef,createDup} for C strings

Also migrate all clients from the old API.

llvm-svn: 174238

11 years agoCorrect indentation for dumping LexicalScope.
Manman Ren [Sat, 2 Feb 2013 00:02:03 +0000 (00:02 +0000)]
Correct indentation for dumping LexicalScope.

llvm-svn: 174237

11 years agoMoving from std::auto_ptr<char> to std::string for simple string memory management.
Enrico Granata [Fri, 1 Feb 2013 23:59:44 +0000 (23:59 +0000)]
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

11 years ago[Dwarf] avoid emitting multiple AT_const_value for static memebers.
Manman Ren [Fri, 1 Feb 2013 23:54:37 +0000 (23:54 +0000)]
[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

11 years agoMerge "special" types from different modules in the AST reader.
Douglas Gregor [Fri, 1 Feb 2013 23:45:03 +0000 (23:45 +0000)]
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

11 years ago<rdar://problem/13050227>
Greg Clayton [Fri, 1 Feb 2013 23:33:03 +0000 (23:33 +0000)]
<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

11 years agoAdd notes about future PowerPC features
Bill Schmidt [Fri, 1 Feb 2013 23:10:09 +0000 (23:10 +0000)]
Add notes about future PowerPC features

llvm-svn: 174232

11 years ago<rdar://problem/12693921>
Greg Clayton [Fri, 1 Feb 2013 23:03:47 +0000 (23:03 +0000)]
<rdar://problem/12693921>

Added the ability to send monitor command to the remote GDB server with "process plugin packet monitor".

llvm-svn: 174231

11 years agoLLVM enablement for some older PowerPC CPUs
Bill Schmidt [Fri, 1 Feb 2013 22:59:51 +0000 (22:59 +0000)]
LLVM enablement for some older PowerPC CPUs

llvm-svn: 174230

11 years agoclang/test/CodeGenCXX/debug-info-class.cpp: Fixup for -Asserts.
NAKAMURA Takumi [Fri, 1 Feb 2013 22:53:19 +0000 (22:53 +0000)]
clang/test/CodeGenCXX/debug-info-class.cpp: Fixup for -Asserts.

llvm-svn: 174229

11 years agoChange the AttributeImpl to hold a single Constant* for the values.
Bill Wendling [Fri, 1 Feb 2013 22:32:30 +0000 (22:32 +0000)]
Change the AttributeImpl to hold a single Constant* for the values.

This Constant could be an aggregate to represent multiple values.

llvm-svn: 174228

11 years ago<rdar://problem/13130975>
Greg Clayton [Fri, 1 Feb 2013 22:08:49 +0000 (22:08 +0000)]
<rdar://problem/13130975>

Class global variables were not being linked correctly when debugging with DWARF in .o files.

llvm-svn: 174227

11 years ago<rdar://problem/13092722>
Greg Clayton [Fri, 1 Feb 2013 21:38:35 +0000 (21:38 +0000)]
<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

11 years agoThis patch aims to improve compile time performance by increasing
Preston Gurd [Fri, 1 Feb 2013 20:41:27 +0000 (20:41 +0000)]
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

11 years agoConst'ify Preprocessor::getPredefinesFileID.
Argyrios Kyrtzidis [Fri, 1 Feb 2013 20:35:47 +0000 (20:35 +0000)]
Const'ify Preprocessor::getPredefinesFileID.

llvm-svn: 174218

11 years agoUnbreak Makefile build after r174216
Dmitri Gribenko [Fri, 1 Feb 2013 20:30:26 +0000 (20:30 +0000)]
Unbreak Makefile build after r174216

llvm-svn: 174217

11 years agoComment parsing: improve the fidelity of XML output for many block commands
Dmitri Gribenko [Fri, 1 Feb 2013 20:23:57 +0000 (20:23 +0000)]
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

11 years agoAdd some missing PPC cpus
Bill Schmidt [Fri, 1 Feb 2013 20:23:10 +0000 (20:23 +0000)]
Add some missing PPC cpus

llvm-svn: 174215

11 years agoobjc: Provide correct fixit instruction when two mismatched
Fariborz Jahanian [Fri, 1 Feb 2013 20:04:49 +0000 (20:04 +0000)]
objc: Provide correct fixit instruction when two mismatched
nsstringis are compared without. // rdar://12716301

llvm-svn: 174214

11 years ago[analyzer] Explain why we have system-header-simulator*.h files.
Jordan Rose [Fri, 1 Feb 2013 19:50:01 +0000 (19:50 +0000)]
[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

11 years agoRe-apply "[analyzer] Model trivial copy/move ctors with an aggregate bind."
Jordan Rose [Fri, 1 Feb 2013 19:49:59 +0000 (19:49 +0000)]
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

11 years ago[analyzer] Reuse a LazyCompoundVal if its type matches the new region.
Jordan Rose [Fri, 1 Feb 2013 19:49:57 +0000 (19:49 +0000)]
[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

11 years agoAdd a testcase for some past-the-end address subtleties.
Dan Gohman [Fri, 1 Feb 2013 19:37:52 +0000 (19:37 +0000)]
Add a testcase for some past-the-end address subtleties.

llvm-svn: 174210

11 years agoCorrect the definition of ObjC's BOOL in our pre-canned set of defines. It's supposed to
Jim Ingham [Fri, 1 Feb 2013 19:33:52 +0000 (19:33 +0000)]
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

11 years agoTwo changes relevant to LEA and x32:
David Sehr [Fri, 1 Feb 2013 19:28:09 +0000 (19:28 +0000)]
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

11 years agoFix errant fallthrough in the generation of the lifetime markers.
Nadav Rotem [Fri, 1 Feb 2013 19:25:23 +0000 (19:25 +0000)]
Fix errant fallthrough in the generation of the lifetime markers.
Found by Alexander Kornienko.

llvm-svn: 174207

11 years agoFix exception handling line table problems introduced by r173593
David Blaikie [Fri, 1 Feb 2013 19:09:49 +0000 (19:09 +0000)]
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

11 years agoFix misplaced 'break'.
Jim Grosbach [Fri, 1 Feb 2013 18:57:06 +0000 (18:57 +0000)]
Fix misplaced 'break'.

llvm-svn: 174205

11 years agoAdd -mqpx and -mno-qpx feature flags to toggle use of the PPC QPX vector instruction set
Hal Finkel [Fri, 1 Feb 2013 18:44:19 +0000 (18:44 +0000)]
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

11 years ago[driver] Don't try to generate diagnostic information for dsymutil crashes.
Chad Rosier [Fri, 1 Feb 2013 18:30:26 +0000 (18:30 +0000)]
[driver] Don't try to generate diagnostic information for dsymutil crashes.
Part of rdar://13134273

llvm-svn: 174203

11 years agoMicro change: moved '{' for better readability (+don't confuse -Wimplicit-fallthrough)
Alexander Kornienko [Fri, 1 Feb 2013 18:28:04 +0000 (18:28 +0000)]
Micro change: moved '{' for better readability (+don't confuse -Wimplicit-fallthrough)

llvm-svn: 174202

11 years agoFix indent
Dmitri Gribenko [Fri, 1 Feb 2013 18:18:00 +0000 (18:18 +0000)]
Fix indent

llvm-svn: 174201

11 years agoremove duplicate strings from the string table
Shankar Easwaran [Fri, 1 Feb 2013 18:06:15 +0000 (18:06 +0000)]
remove duplicate strings from the string table

llvm-svn: 174200

11 years agoadd alignment to .got/.got.plt/.plt sections & fix tests
Shankar Easwaran [Fri, 1 Feb 2013 18:03:32 +0000 (18:03 +0000)]
add alignment to .got/.got.plt/.plt sections & fix tests

llvm-svn: 174199

11 years agoUse a continue to simplify loop and reduce indentation. No functional change.
Chad Rosier [Fri, 1 Feb 2013 17:49:07 +0000 (17:49 +0000)]
Use a continue to simplify loop and reduce indentation. No functional change.

llvm-svn: 174198

11 years agoFix comments: these are not trailing comments
Dmitri Gribenko [Fri, 1 Feb 2013 17:25:11 +0000 (17:25 +0000)]
Fix comments: these are not trailing comments

llvm-svn: 174197

11 years agoHexagon: Test case to confirm generation of indexed loads with zero offset.
Jyotsna Verma [Fri, 1 Feb 2013 16:40:06 +0000 (16:40 +0000)]
Hexagon: Test case to confirm generation of indexed loads with zero offset.

llvm-svn: 174196

11 years agolibclang: document the purpose of createNull()
Dmitri Gribenko [Fri, 1 Feb 2013 16:38:41 +0000 (16:38 +0000)]
libclang: document the purpose of createNull()

llvm-svn: 174195

11 years agolibclang: add comments for CXStringFlag
Dmitri Gribenko [Fri, 1 Feb 2013 16:36:31 +0000 (16:36 +0000)]
libclang: add comments for CXStringFlag

llvm-svn: 174194

11 years agoReplace LDriu*[bhdw]_indexed_V4 instructions with "def Pats".
Jyotsna Verma [Fri, 1 Feb 2013 16:36:16 +0000 (16:36 +0000)]
Replace LDriu*[bhdw]_indexed_V4 instructions with "def Pats".

llvm-svn: 174193

11 years ago[modules] Introduce ModuleFile::DirectImportLoc which is the source location
Argyrios Kyrtzidis [Fri, 1 Feb 2013 16:36:14 +0000 (16:36 +0000)]
[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

11 years agoFor ModuleLoader::makeModuleVisible() also pass the source location where the
Argyrios Kyrtzidis [Fri, 1 Feb 2013 16:36:12 +0000 (16:36 +0000)]
For ModuleLoader::makeModuleVisible() also pass the source location where the
module import occurred.

llvm-svn: 174191

11 years agoIntroduce SourceManager::PredefinesFileID, to allow each checking of whether
Argyrios Kyrtzidis [Fri, 1 Feb 2013 16:36:07 +0000 (16:36 +0000)]
Introduce SourceManager::PredefinesFileID, to allow each checking of whether
a source location came from the predefines buffer.

llvm-svn: 174190

11 years ago[Sanitizer] use u32 instead of mode_t, which is defined in Darwin headers
Alexey Samsonov [Fri, 1 Feb 2013 16:32:18 +0000 (16:32 +0000)]
[Sanitizer] use u32 instead of mode_t, which is defined in Darwin headers

llvm-svn: 174189

11 years ago[ASan] remove debug output from the test
Alexey Samsonov [Fri, 1 Feb 2013 16:06:25 +0000 (16:06 +0000)]
[ASan] remove debug output from the test

llvm-svn: 174188

11 years ago[Sanitizer] make internal_open have the same interface as libc version
Alexey Samsonov [Fri, 1 Feb 2013 15:58:46 +0000 (15:58 +0000)]
[Sanitizer] make internal_open have the same interface as libc version

llvm-svn: 174187

11 years agoAdd appropriate TSFlags to the instructions that must be always extended.
Jyotsna Verma [Fri, 1 Feb 2013 15:54:43 +0000 (15:54 +0000)]
Add appropriate TSFlags to the instructions that must be always extended.

llvm-svn: 174186

11 years agoAdd check for @foo
Bill Schmidt [Fri, 1 Feb 2013 15:52:51 +0000 (15:52 +0000)]
Add check for @foo

llvm-svn: 174185

11 years agotsan: catch races on fd in more cases
Dmitry Vyukov [Fri, 1 Feb 2013 15:52:35 +0000 (15:52 +0000)]
tsan: catch races on fd in more cases

llvm-svn: 174184

11 years agoFix a string not seen without asserts
Bill Schmidt [Fri, 1 Feb 2013 15:41:02 +0000 (15:41 +0000)]
Fix a string not seen without asserts

llvm-svn: 174183

11 years agoFixed segmentation fault when a CFGBlock has NULL successor.
Alexander Kornienko [Fri, 1 Feb 2013 15:39:20 +0000 (15:39 +0000)]
Fixed segmentation fault when a CFGBlock has NULL successor.

llvm-svn: 174182

11 years agoFix PR14881 by implementing conversion rules between int and complex int.
Bill Schmidt [Fri, 1 Feb 2013 15:34:29 +0000 (15:34 +0000)]
Fix PR14881 by implementing conversion rules between int and complex int.

Prior to the patch, Clang does not properly promote types when a complex
integer operand is combined with an integer via a binary operator, or when
one is assigned to the other in either order.  This patch detects when
promotion is needed (and permissible) and generates the necessary code.

The test assmes no target has the same size operands for "char" and
"long long," and that no target performs arithmetic on char operands without
extending them to a larger format first.  If there are any targets for
which this is not the case, they should be XFAILed.

llvm-svn: 174181

11 years ago[TSan] remove artifacts from gotsan build in 'make clean' command
Alexey Samsonov [Fri, 1 Feb 2013 15:30:36 +0000 (15:30 +0000)]
[TSan] remove artifacts from gotsan build in 'make clean' command

llvm-svn: 174180

11 years agoInstSimplify: stripAndComputeConstantOffsets can be called with vectors of pointers...
Benjamin Kramer [Fri, 1 Feb 2013 15:21:10 +0000 (15:21 +0000)]
InstSimplify: stripAndComputeConstantOffsets can be called with vectors of pointers too.

Prepare it for vectors of pointers and handle simple cases. We don't handle
complicated cases because accumulateConstantOffset bails on pointer vectors.
Fixes selfhost on i386.

llvm-svn: 174179

11 years agoadd proper copyright header
Shankar Easwaran [Fri, 1 Feb 2013 15:05:11 +0000 (15:05 +0000)]
add proper copyright header

llvm-svn: 174178

11 years agoRemove currently unused register decoder from AArch64.
Tim Northover [Fri, 1 Feb 2013 14:55:05 +0000 (14:55 +0000)]
Remove currently unused register decoder from AArch64.

This should fix a warning when building this backend.

llvm-svn: 174177

11 years agoRevise unit testing for -fno-altivec, -mno-altivec.
Bill Schmidt [Fri, 1 Feb 2013 14:45:29 +0000 (14:45 +0000)]
Revise unit testing for -fno-altivec, -mno-altivec.

As suggested, reverted the end-to-end test and added variations to an
existing Driver test.

llvm-svn: 174176

11 years agotsan: even if races between atomic and plain memory accesses are turned off (report_a...
Dmitry Vyukov [Fri, 1 Feb 2013 14:41:58 +0000 (14:41 +0000)]
tsan: even if races between atomic and plain memory accesses are turned off (report_atomic_races=0),
still report races between atomic accesses and free().

llvm-svn: 174175

11 years agolibclang: itroduce cxstring::createEmpty()
Dmitri Gribenko [Fri, 1 Feb 2013 14:21:22 +0000 (14:21 +0000)]
libclang: itroduce cxstring::createEmpty()

llvm-svn: 174174

11 years agolibclang: introduce cxstring::createNull()
Dmitri Gribenko [Fri, 1 Feb 2013 14:13:32 +0000 (14:13 +0000)]
libclang: introduce cxstring::createNull()

llvm-svn: 174173

11 years agoRe-design the convenience interfaces on MatchFinder.
Manuel Klimek [Fri, 1 Feb 2013 13:41:35 +0000 (13:41 +0000)]
Re-design the convenience interfaces on MatchFinder.

First, this implements a match() method on MatchFinder; this allows us
to get rid of the findAll implementation, as findAll is really a special
case of recursive matchers on match.

Instead of findAll, provide a convenience function match() that lets
users iterate easily over the results instead of needing to implement
callbacks.

llvm-svn: 174172

11 years agoUse const visitors in ASTDumper.
Alexander Kornienko [Fri, 1 Feb 2013 12:35:51 +0000 (12:35 +0000)]
Use const visitors in ASTDumper.
http://llvm-reviews.chandlerc.com/D355
Patch by Philip Craig!

llvm-svn: 174171

11 years agoAdd explicit triples to AArch64 tests
Tim Northover [Fri, 1 Feb 2013 11:40:47 +0000 (11:40 +0000)]
Add explicit triples to AArch64 tests

Only Linux is supported at the moment, and other platforms quickly fault. As a
result these tests would fail on non-Linux hosts. It may be worth making the
tests more generic again as more platforms are supported.

llvm-svn: 174170