platform/upstream/llvm.git
11 years agoModify the LLVM assembly output so that it uses references to represent function...
Bill Wendling [Wed, 20 Feb 2013 07:21:42 +0000 (07:21 +0000)]
Modify the LLVM assembly output so that it uses references to represent function attributes.

This makes the LLVM assembly look better. E.g.:

     define void @foo() #0 { ret void }
     attributes #0 = { nounwind noinline ssp }

llvm-svn: 175605

11 years agoAdd support to the two-address pass for updating LiveIntervals in many of the
Cameron Zwarich [Wed, 20 Feb 2013 06:46:48 +0000 (06:46 +0000)]
Add support to the two-address pass for updating LiveIntervals in many of the
common transformations. This includes updating repairIntervalsInRange() to
handle more cases.

llvm-svn: 175604

11 years agoMove the computation of the IsEarlyClobber flag into its own loop, since the
Cameron Zwarich [Wed, 20 Feb 2013 06:46:46 +0000 (06:46 +0000)]
Move the computation of the IsEarlyClobber flag into its own loop, since the
correct value is needed in every iteration of the loop for updating
LiveIntervals.

llvm-svn: 175603

11 years agoModify LiveInterval::addRange() to match the comment about what it returns.
Cameron Zwarich [Wed, 20 Feb 2013 06:46:44 +0000 (06:46 +0000)]
Modify LiveInterval::addRange() to match the comment about what it returns.

llvm-svn: 175602

11 years agoAdd SlotIndexes::repairIndexesInRange(), which repairs SlotIndexes after adding
Cameron Zwarich [Wed, 20 Feb 2013 06:46:41 +0000 (06:46 +0000)]
Add SlotIndexes::repairIndexesInRange(), which repairs SlotIndexes after adding
and removing instructions. The implementation seems more complicated than it
needs to be, but I couldn't find something simpler that dealt with all of the
corner cases.

Also add a call to repairIndexesInRange() from repairIntervalsInRange().

llvm-svn: 175601

11 years agoMake SlotIndex::getEntry() return unsigned to match IndexListEntry.
Cameron Zwarich [Wed, 20 Feb 2013 06:46:39 +0000 (06:46 +0000)]
Make SlotIndex::getEntry() return unsigned to match IndexListEntry.

llvm-svn: 175600

11 years agoFix a misunderstanding about how RegMaskBlocks works. This was caught by
Cameron Zwarich [Wed, 20 Feb 2013 06:46:36 +0000 (06:46 +0000)]
Fix a misunderstanding about how RegMaskBlocks works. This was caught by
assertions in the register allocator when running 'make check' without
LiveVariables.

llvm-svn: 175599

11 years agoRemove verification after PHIElimination when using LiveIntervals, and move it
Cameron Zwarich [Wed, 20 Feb 2013 06:46:34 +0000 (06:46 +0000)]
Remove verification after PHIElimination when using LiveIntervals, and move it
after the two-address pass. The remaining problems in 'make check' are occurring
later.

llvm-svn: 175598

11 years agoAvoid recomputing an inserted instruction's SlotIndex.
Cameron Zwarich [Wed, 20 Feb 2013 06:46:32 +0000 (06:46 +0000)]
Avoid recomputing an inserted instruction's SlotIndex.

llvm-svn: 175597

11 years agoAdd preservation of SlotIndexes to PHIElimination.
Cameron Zwarich [Wed, 20 Feb 2013 06:46:28 +0000 (06:46 +0000)]
Add preservation of SlotIndexes to PHIElimination.

llvm-svn: 175596

11 years agoRename llvm::Optional<T>::Reset to 'reset' as per LLVM naming conventions.
David Blaikie [Wed, 20 Feb 2013 06:25:36 +0000 (06:25 +0000)]
Rename llvm::Optional<T>::Reset to 'reset' as per LLVM naming conventions.

Code review feedback on r175580 from Jordan Rose.

llvm-svn: 175595

11 years agoReplace SVal llvm::cast support to be well-defined.
David Blaikie [Wed, 20 Feb 2013 05:52:05 +0000 (05:52 +0000)]
Replace SVal llvm::cast support to be well-defined.

See r175462 for another example/more details.

llvm-svn: 175594

11 years agoExpand pseudos/macros:
Reed Kotler [Wed, 20 Feb 2013 05:45:15 +0000 (05:45 +0000)]
Expand pseudos/macros:
  SltCCRxRy16, SltiCCRxImmX16, SltiuCCRxImmX16, SltuCCRxRy16
$T8 shows up as register $24 when emitted from C++ code so we had
to change some tests that were already there for this functionality.

llvm-svn: 175593

11 years ago[llvm-readobj] Add ELF .dynamic table dumping.
Michael J. Spencer [Wed, 20 Feb 2013 02:37:12 +0000 (02:37 +0000)]
[llvm-readobj] Add ELF .dynamic table dumping.

llvm-svn: 175592

11 years agoLastly, a few synthetic children classes for Cocoa are available
Enrico Granata [Wed, 20 Feb 2013 02:27:07 +0000 (02:27 +0000)]
Lastly, a few synthetic children classes for Cocoa are available

llvm-svn: 175591

11 years agoAnd the NSString formatter is not Python anymore
Enrico Granata [Wed, 20 Feb 2013 02:24:20 +0000 (02:24 +0000)]
And the NSString formatter is not Python anymore

llvm-svn: 175590

11 years agoData formatters are not a *recent* addition...
Enrico Granata [Wed, 20 Feb 2013 02:22:00 +0000 (02:22 +0000)]
Data formatters are not a *recent* addition...

llvm-svn: 175589

11 years agointmax_t is long long on Darwin, not long.
Jordan Rose [Wed, 20 Feb 2013 01:56:21 +0000 (01:56 +0000)]
intmax_t is long long on Darwin, not long.

<rdar://problem/11540697>

llvm-svn: 175588

11 years agoAdd a new 'type_visibility' attribute to allow users to
John McCall [Wed, 20 Feb 2013 01:54:26 +0000 (01:54 +0000)]
Add a new 'type_visibility' attribute to allow users to
control the visibility of a type for the purposes of RTTI
and template argument restrictions independently of how
visibility propagates to its non-type member declarations.

Also fix r175326 to not ignore template argument visibility
on a template explicit instantiation when a member has
an explicit attribute but the instantiation does not.

The type_visibility work is rdar://11880378

llvm-svn: 175587

11 years agoDon't repeat the function name in the comment.
Richard Smith [Wed, 20 Feb 2013 01:17:14 +0000 (01:17 +0000)]
Don't repeat the function name in the comment.

llvm-svn: 175586

11 years ago[preprocessor] Split the MacroInfo class into two separate concepts, MacroInfo class
Argyrios Kyrtzidis [Wed, 20 Feb 2013 00:54:57 +0000 (00:54 +0000)]
[preprocessor] Split the MacroInfo class into two separate concepts, MacroInfo class
for the data specific to a macro definition (e.g. what the tokens are), and
MacroDirective class which encapsulates the changes to the "macro namespace"
(e.g. the location where the macro name became active, the location where it was undefined, etc.)

(A MacroDirective always points to a MacroInfo object.)

Usually a macro definition (MacroInfo) is where a macro name becomes active (MacroDirective) but
splitting the concepts allows us to better model the effect of modules to the macro namespace
(also as a bonus it allows better modeling of push_macro/pop_macro #pragmas).
Modules can have their own macro history, separate from the local (current translation unit)
macro history; MacroDirectives will be used to model the macro history (changes to macro namespace).

For example, if "@import A;" imports macro FOO, there will be a new local MacroDirective created
to indicate that "FOO" became active at the import location. Module "A" itself will contain another
MacroDirective in its macro history (at the point of the definition of FOO) and both MacroDirectives
will point to the same MacroInfo object.

Introducing the separation of macro concepts is the first part towards better modeling of module macros.

llvm-svn: 175585

11 years agoRemove unneeded #include.
Jakub Staszak [Wed, 20 Feb 2013 00:32:19 +0000 (00:32 +0000)]
Remove unneeded #include.

llvm-svn: 175584

11 years agoAdd missing #include.
Jakub Staszak [Wed, 20 Feb 2013 00:31:54 +0000 (00:31 +0000)]
Add missing #include.

llvm-svn: 175583

11 years ago[analyzer] Account for the "interesting values" hash table resizing.
Jordan Rose [Wed, 20 Feb 2013 00:27:26 +0000 (00:27 +0000)]
[analyzer] Account for the "interesting values" hash table resizing.

RegionStoreManager::getInterestingValues() returns a pointer to a
std::vector that lives inside a DenseMap, which is constructed on demand.
However, constructing one such value can lead to constructing another
value, which will invalidate the reference created earlier.

Fixed by delaying the new entry creation until the function returns.

llvm-svn: 175582

11 years agoFix #includes, so we include only what we really need.
Jakub Staszak [Wed, 20 Feb 2013 00:26:25 +0000 (00:26 +0000)]
Fix #includes, so we include only what we really need.

llvm-svn: 175581

11 years agoAllow llvm::Optional to work with types without default constructors.
David Blaikie [Wed, 20 Feb 2013 00:26:04 +0000 (00:26 +0000)]
Allow llvm::Optional to work with types without default constructors.

This generalizes Optional to require less from the T type by using aligned
storage for backing & placement new/deleting the T into it when necessary.

Also includes unit tests.

llvm-svn: 175580

11 years agoMove part of APInt implementation from header to cpp file. These methods
Jakub Staszak [Wed, 20 Feb 2013 00:17:42 +0000 (00:17 +0000)]
Move part of APInt implementation from header to cpp file. These methods
require call cpp file anyway, so we wouldn't gain anything by keeping them
inline.

llvm-svn: 175579

11 years agoclear new map and initialize new variable
Pedro Artigas [Wed, 20 Feb 2013 00:10:29 +0000 (00:10 +0000)]
clear new map and initialize new variable

llvm-svn: 175578

11 years agoAdd the function attributes from an inline asm call. These don't have declarations...
Bill Wendling [Wed, 20 Feb 2013 00:04:41 +0000 (00:04 +0000)]
Add the function attributes from an inline asm call. These don't have declarations that set the attribute groups, so we must do it on our own.

llvm-svn: 175577

11 years ago[ms-inline asm] Force the use of a base pointer if the MachineFunction includes
Chad Rosier [Tue, 19 Feb 2013 23:50:45 +0000 (23:50 +0000)]
[ms-inline asm] Force the use of a base pointer if the MachineFunction includes
MS-style inline assembly.

This is a follow-on to r175334.  Forcing a FP to be emitted doesn't ensure it
will be used.  Therefore, force the base pointer as well.  We now treat MS
inline assembly in the same way we treat functions with dynamic stack
realignment and VLAs.  This guarantees the BP will be used to reference
parameters and locals.
rdar://13218191

llvm-svn: 175576

11 years agoPR15300: Support C++11 attributes on base-specifiers. We don't support any such
Richard Smith [Tue, 19 Feb 2013 23:47:15 +0000 (23:47 +0000)]
PR15300: Support C++11 attributes on base-specifiers. We don't support any such
attributes yet, so just issue the appropriate diagnostics. Also generalize the
fixit for attributes-in-the-wrong-place code and reuse it here, if attributes
are placed after the access-specifier or 'virtual' in a base specifier.

llvm-svn: 175575

11 years agoFixing a potential crasher where a synthetic value could return itself as its static...
Enrico Granata [Tue, 19 Feb 2013 23:23:41 +0000 (23:23 +0000)]
Fixing a potential crasher where a synthetic value could return itself as its static value

llvm-svn: 175574

11 years agoIf RunThreadPlan is called on a thread that doesn't have a selected frame, select...
Jim Ingham [Tue, 19 Feb 2013 23:22:45 +0000 (23:22 +0000)]
If RunThreadPlan is called on a thread that doesn't have a selected frame, select frame 0.

<rdar://problem/13093321>

llvm-svn: 175573

11 years ago[Driver][GNULD] Lookup .so files and default to dynamic output.
Michael J. Spencer [Tue, 19 Feb 2013 23:05:36 +0000 (23:05 +0000)]
[Driver][GNULD] Lookup .so files and default to dynamic output.

llvm-svn: 175572

11 years agoUpdate a portability kludge to keep it in sync with changes in the code
Dan Gohman [Tue, 19 Feb 2013 22:38:58 +0000 (22:38 +0000)]
Update a portability kludge to keep it in sync with changes in the code
which uses it. This is not ideal, but it ought to at least restore the
behavior to what it was before.

llvm-svn: 175571

11 years ago<rdar://problem/13147878>
Enrico Granata [Tue, 19 Feb 2013 22:34:01 +0000 (22:34 +0000)]
<rdar://problem/13147878>
Be more user-friendly about not having scripting enabled:
a) if Python was built-out then tell people about it explicitly
b) if we are told to use none as a scripting language, then tell people about that too

This should limit the cases where the semi-cryptic error message "there is no embedded script interpreter in this mode." actually shows

llvm-svn: 175570

11 years agoELF symbol table field st_other support,
Jack Carter [Tue, 19 Feb 2013 22:29:00 +0000 (22:29 +0000)]
ELF symbol table field st_other support,
excluding visibility bits.

Mips (o32 abi) specific e_header setting.

EF_MIPS_ABI_O32 needs to be set in the
ELF header flags for o32 abi output.

Contributer: Reed Kotler
llvm-svn: 175569

11 years agoRemove unused variable.
Jakub Staszak [Tue, 19 Feb 2013 22:17:58 +0000 (22:17 +0000)]
Remove unused variable.

llvm-svn: 175568

11 years agoMinor cleanups. No functionality change.
Jakub Staszak [Tue, 19 Feb 2013 22:14:45 +0000 (22:14 +0000)]
Minor cleanups. No functionality change.

llvm-svn: 175567

11 years agoELF symbol table field st_other support,
Jack Carter [Tue, 19 Feb 2013 22:14:34 +0000 (22:14 +0000)]
ELF symbol table field st_other support,
excluding visibility bits.

Mips (Mips16) specific e_header setting.

EF_MIPS_ARCH_ASE_M16 needs to be set in the
ELF header flags for Mips16.

Contributer: Reed Kotler
llvm-svn: 175566

11 years agoRemove unneeded #includes.
Jakub Staszak [Tue, 19 Feb 2013 22:06:38 +0000 (22:06 +0000)]
Remove unneeded #includes.

llvm-svn: 175565

11 years agoELF symbol table field st_other support,
Jack Carter [Tue, 19 Feb 2013 22:04:37 +0000 (22:04 +0000)]
ELF symbol table field st_other support,
excluding visibility bits.

Mips (MicroMips) specific STO handling .

The st_other field settig for STO_MIPS_MICROMIPS

Contributer: Zoran Jovanovic
llvm-svn: 175564

11 years agoValueObjectSynthetic could be wrapping a ValueObjectDynamic. In that case, we want...
Enrico Granata [Tue, 19 Feb 2013 22:03:00 +0000 (22:03 +0000)]
ValueObjectSynthetic could be wrapping a ValueObjectDynamic. In that case, we want to report that the ValueObject is dynamic since synthetic values are supposed to be just their parent with different children

llvm-svn: 175563

11 years agoFix typos.
Jakub Staszak [Tue, 19 Feb 2013 22:02:21 +0000 (22:02 +0000)]
Fix typos.

llvm-svn: 175562

11 years agoELF symbol table field st_other support,
Jack Carter [Tue, 19 Feb 2013 21:57:35 +0000 (21:57 +0000)]
ELF symbol table field st_other support,
excluding visibility bits.

Generic STO handling at the Target level.

The st_other field of the ELF symbol table is one
byte in size. The first 2 bytes are used for generic
visibility and are currently handled by llvm.

The other six bits are processor specific and need
to be set at the target level.

A couple of notes:

The new static methods for accessing and setting the "other"
flags in include/llvm/MC/MCELF.h match the style guide
and not the other methods in the file. I don't like the
inconsistency, but feel I should follow the prescribed
lowerUpper() convention.

STO_ value definitions are not specified in gnu land as
consistently as the STT_ and STB_ fields. Probably because
the latter were defined in a standards doc and the former
defined partially in code. I have stuck with the full byte
definition of the flags.

Contributer: Zoran Jovanovic
llvm-svn: 175561

11 years agoAdd obvious constantness.
Jakub Staszak [Tue, 19 Feb 2013 21:54:59 +0000 (21:54 +0000)]
Add obvious constantness.

llvm-svn: 175560

11 years agoSimplify code. No functionality change.
Jakub Staszak [Tue, 19 Feb 2013 21:49:54 +0000 (21:49 +0000)]
Simplify code. No functionality change.

llvm-svn: 175559

11 years ago[ELF] Fix memory leak by deleting BumpPtr allocated objects.
Michael J. Spencer [Tue, 19 Feb 2013 21:04:30 +0000 (21:04 +0000)]
[ELF] Fix memory leak by deleting BumpPtr allocated objects.

llvm-svn: 175558

11 years agoMake the progress bar opt in (using the -P option.)
Jim Ingham [Tue, 19 Feb 2013 20:39:27 +0000 (20:39 +0000)]
Make the progress bar opt in (using the -P option.)

llvm-svn: 175557

11 years ago[analyzer] Don't accidentally strip off base object regions for lazy bindings.
Jordan Rose [Tue, 19 Feb 2013 20:28:33 +0000 (20:28 +0000)]
[analyzer] Don't accidentally strip off base object regions for lazy bindings.

If a base object is at a 0 offset, RegionStoreManager may find a lazy
binding for the entire object, then try to attach a FieldRegion or
grandparent CXXBaseObjectRegion on top of that (skipping the intermediate
region). We now preserve as many layers of base object regions necessary
to make the types match.

<rdar://problem/13239840>

llvm-svn: 175556

11 years agoARM NEON: Don't need COPY_TO_REGCLASS in pattern
Arnold Schwaighofer [Tue, 19 Feb 2013 20:16:45 +0000 (20:16 +0000)]
ARM NEON: Don't need COPY_TO_REGCLASS in pattern

In my previous commit:
"Merge a f32 bitcast of a v2i32 extractelt

A vectorized sitfp on doubles will get scalarized to a sequence of an
extract_element of <2 x i32>, a bitcast to f32 and a sitofp.
Due to the the extract_element, and the bitcast we will uneccessarily generate
moves between scalar and vector registers."

I added a pattern containing a copy_to_regclass. The copy_to_regclass is
actually not needed.

radar://13191881

llvm-svn: 175555

11 years agoAdd missing clang-format null pointer check..
Daniel Jasper [Tue, 19 Feb 2013 20:05:41 +0000 (20:05 +0000)]
Add missing clang-format null pointer check..

.. and a test that triggers it in valid albeit questionable code.

llvm-svn: 175554

11 years agoFix a bug in mayHaveSideEffects. Functions that do not return are now considered...
Nadav Rotem [Tue, 19 Feb 2013 20:02:09 +0000 (20:02 +0000)]
Fix a bug in mayHaveSideEffects. Functions that do not return are now considered as instructions with side effects.

rdar://13227456

llvm-svn: 175553

11 years ago[modules] Const'ify some functions of ModuleMap.
Argyrios Kyrtzidis [Tue, 19 Feb 2013 19:58:45 +0000 (19:58 +0000)]
[modules] Const'ify some functions of ModuleMap.

llvm-svn: 175552

11 years agoA few more GCC specific test fixes as per logged PRs:
Daniel Malea [Tue, 19 Feb 2013 19:54:16 +0000 (19:54 +0000)]
A few more GCC specific test fixes as per logged PRs:
- TestNamespace expected to fail due to PR-15302
- TestCPPBool and TestUnsignedTypes updated to handle GCC style debug information
- TestRvalueReferences expected fail due to GCC (4.7) not outputting rvalue-reference debug information
- TestDataFormatterStdVBool expected to fail due to PR-15301

llvm-svn: 175551

11 years agoFix a bug that was found by the clang static analyzer. The var "AT" is null so we...
Nadav Rotem [Tue, 19 Feb 2013 19:36:59 +0000 (19:36 +0000)]
Fix a bug that was found by the clang static analyzer. The var "AT" is null so we cant deref it.

llvm-svn: 175550

11 years agoWhitelist files and block devices instead of blacklisting fifos and
Dan Gohman [Tue, 19 Feb 2013 19:36:55 +0000 (19:36 +0000)]
Whitelist files and block devices instead of blacklisting fifos and
character devices.

llvm-svn: 175549

11 years ago[modules] Refactor code from ASTReader::makeModuleVisible() into a new function,
Argyrios Kyrtzidis [Tue, 19 Feb 2013 19:34:40 +0000 (19:34 +0000)]
[modules] Refactor code from ASTReader::makeModuleVisible() into a new function,
Module::getExportedModules() so it can be reused.

llvm-svn: 175548

11 years agoFix Makefile bug preventing tests from running when building lldb with ccache
Daniel Malea [Tue, 19 Feb 2013 19:31:05 +0000 (19:31 +0000)]
Fix Makefile bug preventing tests from running when building lldb with ccache

llvm-svn: 175547

11 years agoUpdated to support latest Clang option naming.
Sean Callanan [Tue, 19 Feb 2013 19:16:37 +0000 (19:16 +0000)]
Updated to support latest Clang option naming.

llvm-svn: 175546

11 years agoAdding files left out of commit r175544.
Edwin Vane [Tue, 19 Feb 2013 19:14:45 +0000 (19:14 +0000)]
Adding files left out of commit r175544.

llvm-svn: 175545

11 years agoAdd support for auto-generating LIT tests by the build
Edwin Vane [Tue, 19 Feb 2013 19:08:10 +0000 (19:08 +0000)]
Add support for auto-generating LIT tests by the build

autoconf and CMake flavours both updated to auto-generate files for use
in cpp11-migrate's LIT tests.

Auto-generated files are placed in the build directory under
test/cpp11-migrate/autogen. The directory structure past this point
mirrors the structure in the source directory under test/cpp11-migrate.
A lit.site.cfg is generated in test/cpp11-migrate/autogen to describe
the new test suite. When LIT runs, it runs the standard testsuite and
now also the auto-generated testsuite.

llvm-svn: 175544

11 years agoAdd i386 register support for the x86_64 RegisterContext plugin. This allows debuggin...
Matt Kopec [Tue, 19 Feb 2013 19:06:16 +0000 (19:06 +0000)]
Add i386 register support for the x86_64 RegisterContext plugin. This allows debugging a 32-bit inferior on 64-bit lldb/host.

llvm-svn: 175543

11 years agoDon't trust st_size of a character device. This fixes using
Dan Gohman [Tue, 19 Feb 2013 18:57:53 +0000 (18:57 +0000)]
Don't trust st_size of a character device. This fixes using
/dev/stdin as an input when stdin is connected to a tty, for example.

No test, because it's difficult to write a reasonably portable test
for this. /dev/stdin isn't a character device when stdin is redirected
from a file or connected to a pipe.

llvm-svn: 175542

11 years agoARM: Allocation hints must make sure to be in the alloc order.
Jim Grosbach [Tue, 19 Feb 2013 18:55:36 +0000 (18:55 +0000)]
ARM: Allocation hints must make sure to be in the alloc order.

When creating an allocation hint for a register pair, make sure the hint
for the physical register reference is still in the allocation order.

rdar://13240556

llvm-svn: 175541

11 years agoAssert that the target provided hints are in the allocation order.
Jakob Stoklund Olesen [Tue, 19 Feb 2013 18:41:01 +0000 (18:41 +0000)]
Assert that the target provided hints are in the allocation order.

Target implementations of getRegAllocationHints() should use the
provided allocation order, and they can never return hints outside the
order. This is already documented in TargetRegisterInfo.h.

<rdar://problem/13240556>

llvm-svn: 175540

11 years agoUse MapVector::pop_back() per LLVM r175538.
Douglas Gregor [Tue, 19 Feb 2013 18:26:28 +0000 (18:26 +0000)]
Use MapVector::pop_back() per LLVM r175538.

llvm-svn: 175539

11 years agoRemove my bogus MapVector::erase() with a narrower ::pop_back(), and add a unit test.
Douglas Gregor [Tue, 19 Feb 2013 18:26:07 +0000 (18:26 +0000)]
Remove my bogus MapVector::erase() with a narrower ::pop_back(), and add a unit test.

llvm-svn: 175538

11 years agoHexagon: Sync TSFlags in MCTargetDesc/HexagonBaseInfo.h with
Jyotsna Verma [Tue, 19 Feb 2013 18:18:36 +0000 (18:18 +0000)]
Hexagon: Sync TSFlags in MCTargetDesc/HexagonBaseInfo.h with
HexagonInstrFormats.td.

llvm-svn: 175537

11 years agoClean up HiPE prologue emission a bit and avoid signed arithmetic tricks.
Benjamin Kramer [Tue, 19 Feb 2013 17:32:57 +0000 (17:32 +0000)]
Clean up HiPE prologue emission a bit and avoid signed arithmetic tricks.

No intended functionality change.

llvm-svn: 175536

11 years ago[docs] Rename to permit wider variety of content.
Sean Silva [Tue, 19 Feb 2013 17:29:01 +0000 (17:29 +0000)]
[docs] Rename to permit wider variety of  content.

I don't want to rule out the possibility of linking to e.g. interesting
blog posts about uses of Clang, so avoid restricting the content to
"projects".

This breaks URL compatibility, but this document was committed less than
an hour ago so hopefully nobody has linked to it yet.

llvm-svn: 175535

11 years ago[docs] Revise content on ExternalProjectsUsingClang page.
Sean Silva [Tue, 19 Feb 2013 17:21:23 +0000 (17:21 +0000)]
[docs] Revise content on ExternalProjectsUsingClang page.

llvm-svn: 175534

11 years agoCorrectly format macro with unfinished template declaration.
Daniel Jasper [Tue, 19 Feb 2013 17:14:38 +0000 (17:14 +0000)]
Correctly format macro with unfinished template declaration.

We can now format:
  #define A template <typename T>

Before this created a segfault :-/.

llvm-svn: 175533

11 years agoSupport in hasDeclaration for types with getDecl()
Edwin Vane [Tue, 19 Feb 2013 17:14:34 +0000 (17:14 +0000)]
Support in hasDeclaration for types with getDecl()

Using a new metafunction for detecting the presence of the member
'getDecl' in a type T, added support to hasDeclaration for any such type
T. This allows hasDecl() to be replaced and enables several other
subclasses of clang::Type to use hasDeclaration.

Updated unittests and LibASTMatchersReference.html.

Reviewers: klimek
llvm-svn: 175532

11 years agoMove LLVM_LIBRARY_VISIBILITY for consistency with what was done to
Rafael Espindola [Tue, 19 Feb 2013 17:14:33 +0000 (17:14 +0000)]
Move LLVM_LIBRARY_VISIBILITY for consistency with what was done to
PPCJITInfo.cpp in r175394.

llvm-svn: 175531

11 years agoFix typo
Eli Bendersky [Tue, 19 Feb 2013 17:11:48 +0000 (17:11 +0000)]
Fix typo

llvm-svn: 175530

11 years ago[docs] Introduce ExternalProjectsUsingClang.rst
Sean Silva [Tue, 19 Feb 2013 16:58:15 +0000 (16:58 +0000)]
[docs] Introduce ExternalProjectsUsingClang.rst

A couple concrete examples are sure to be a win. If you know of any
other external projects using Clang, please let me know!

Patch by Laszlo Nagy! (with a title tweak by me)

llvm-svn: 175529

11 years agoFix GCMetadaPrinter::finishAssembly not executed, patch by Yiannis Tsiouris.
Benjamin Kramer [Tue, 19 Feb 2013 16:51:44 +0000 (16:51 +0000)]
Fix GCMetadaPrinter::finishAssembly not executed, patch by Yiannis Tsiouris.

Due to the execution order of doFinalization functions, the GC information were
deleted before AsmPrinter::doFinalization was executed. Thus, the
GCMetadataPrinter::finishAssembly was never called.

The patch fixes that by moving the code of the GCInfoDeleter::doFinalization to
Printer::doFinalization.

llvm-svn: 175528

11 years agoMake ARMAsmPrinter pass name more precise and fix comment.
Eli Bendersky [Tue, 19 Feb 2013 16:47:59 +0000 (16:47 +0000)]
Make ARMAsmPrinter pass name more precise and fix comment.

llvm-svn: 175527

11 years agoMake pass name more precise and fix comment.
Eli Bendersky [Tue, 19 Feb 2013 16:38:32 +0000 (16:38 +0000)]
Make pass name more precise and fix comment.

llvm-svn: 175525

11 years agoMinor test runner improvemenst
Daniel Malea [Tue, 19 Feb 2013 16:08:57 +0000 (16:08 +0000)]
Minor test runner improvemenst
- rework the way SBDebugger.SetAsync() is used to avoid side effects (reset original value at TearDownHook)
- refactor expectedFailureClang (and add expectedFailureGcc decorator)
- mark TestChangeValueAPI.py as expectedFailureGcc due to PR-15039

llvm-svn: 175523

11 years agoUpdate TestVBool Makefile to allow building test program with gcc
Daniel Malea [Tue, 19 Feb 2013 15:53:47 +0000 (15:53 +0000)]
Update TestVBool Makefile to allow building test program with gcc
- do not pass (incompatible option) -stdlib=libstdc++ option if using GCC as test compiler

llvm-svn: 175522

11 years agoUpdate Makefile to use build-compiler (CC) for LLDB testing
Daniel Malea [Tue, 19 Feb 2013 15:48:37 +0000 (15:48 +0000)]
Update Makefile to use build-compiler (CC) for LLDB testing
- Should allow tests to run without 'clang' installed

llvm-svn: 175521

11 years agoARM NEON: Merge a f32 bitcast of a v2i32 extractelt
Arnold Schwaighofer [Tue, 19 Feb 2013 15:27:05 +0000 (15:27 +0000)]
ARM NEON: Merge a f32 bitcast of a v2i32 extractelt

A vectorized sitfp on doubles will get scalarized to a sequence of an
extract_element of <2 x i32>, a bitcast to f32 and a sitofp.
Due to the the extract_element, and the bitcast we will uneccessarily generate
moves between scalar and vector registers.

The patch fixes this by using a COPY_TO_REGCLASS and a EXTRACT_SUBREG to extract
the element from the vector instead.

radar://13191881

llvm-svn: 175520

11 years agoR600: Add AR_X to the R600_TReg_X register class.
Tom Stellard [Tue, 19 Feb 2013 15:22:47 +0000 (15:22 +0000)]
R600: Add AR_X to the R600_TReg_X register class.

NOTE: This is a candidate for the Mesa stable branch.
llvm-svn: 175519

11 years agoR600: Mark all members of the TRegMem register class as reserved
Tom Stellard [Tue, 19 Feb 2013 15:22:45 +0000 (15:22 +0000)]
R600: Mark all members of the TRegMem register class as reserved

This stops the Machine Verifier from complaining about uses of undefined
physical registers.

NOTE: This is a candidate for the Mesa stable branch.
llvm-svn: 175518

11 years agoR600: Fix scheduler crash caused by invalid MachinePointerInfo
Tom Stellard [Tue, 19 Feb 2013 15:22:44 +0000 (15:22 +0000)]
R600: Fix scheduler crash caused by invalid MachinePointerInfo

Kernel function arguments are lowered to loads from the PARAM_I address
space.  When creating these load instructions, we were initializing
their MachinePointerInfo with an Arguement object that was not attached
to any function.  This was causing the MachineScheduler to crash when
it tried to access the parent of the Arguement.

This has been fixed by initializing the MachinePointerInfo with a
UndefValue instead.

NOTE: This is a candidate for the Mesa stable branch.
llvm-svn: 175517

11 years agoR600: Fix tracking of implicit defs in the IndirectAddressing pass
Tom Stellard [Tue, 19 Feb 2013 15:22:42 +0000 (15:22 +0000)]
R600: Fix tracking of implicit defs in the IndirectAddressing pass

In some cases, we were losing track of live implicit registers which
was creating dead defs and causing the scheduler to produce invalid
code.

NOTE: This is a candidate for the Mesa stable branch.
llvm-svn: 175516

11 years ago[sanitizer] Fix FileOps test on Android.
Evgeniy Stepanov [Tue, 19 Feb 2013 15:01:05 +0000 (15:01 +0000)]
[sanitizer] Fix FileOps test on Android.

llvm-svn: 175515

11 years ago[asan] don't run the long double test if long double is the same as double
Kostya Serebryany [Tue, 19 Feb 2013 13:43:44 +0000 (13:43 +0000)]
[asan] don't run the long double test if long double is the same as double

llvm-svn: 175514

11 years ago[sanitizer] Slightly lower allocator test memory consumption.
Evgeniy Stepanov [Tue, 19 Feb 2013 13:38:27 +0000 (13:38 +0000)]
[sanitizer] Slightly lower allocator test memory consumption.

This way it fits on a random 1G device.

llvm-svn: 175513

11 years ago[ASan] Allow ASan default runtime options be overriden at compile time by providing...
Alexey Samsonov [Tue, 19 Feb 2013 13:14:48 +0000 (13:14 +0000)]
[ASan] Allow ASan default runtime options be overriden at compile time by providing ASAN_DEFAULT_OPTIONS macro

llvm-svn: 175512

11 years ago[Sanitizer] Allow runtime flags be separated by colon as well as space
Alexey Samsonov [Tue, 19 Feb 2013 13:03:37 +0000 (13:03 +0000)]
[Sanitizer] Allow runtime flags be separated by colon as well as space

llvm-svn: 175511

11 years ago[msan] Use slow stack unwinder in UMR reports.
Evgeniy Stepanov [Tue, 19 Feb 2013 12:43:18 +0000 (12:43 +0000)]
[msan] Use slow stack unwinder in UMR reports.

llvm-svn: 175510

11 years agoFix initialization-order bug in llvm::Support::TimeValue. TimeValue::now() is explici...
Alexey Samsonov [Tue, 19 Feb 2013 11:35:39 +0000 (11:35 +0000)]
Fix initialization-order bug in llvm::Support::TimeValue. TimeValue::now() is explicitly called during module initialization of lib/Support/Process.cpp. It reads the field of global object PosixZeroTime, which is not guaranteed to be initialized at this point. Found by AddressSanitizer with -fsanitize=init-order option.

llvm-svn: 175509

11 years ago[asan] instrument memory accesses with unusual sizes
Kostya Serebryany [Tue, 19 Feb 2013 11:30:25 +0000 (11:30 +0000)]
[asan] instrument memory accesses with unusual sizes
This patch makes asan instrument memory accesses with unusual sizes (e.g. 5 bytes or 10 bytes), e.g. long double or
packed structures.
Instrumentation is done with two 1-byte checks
(first and last bytes) and if the error is found
__asan_report_load_n(addr, real_size) or
__asan_report_store_n(addr, real_size)
is called.

asan-rt part

Also fix lint.

llvm-svn: 175508

11 years ago[asan] instrument memory accesses with unusual sizes
Kostya Serebryany [Tue, 19 Feb 2013 11:29:21 +0000 (11:29 +0000)]
[asan] instrument memory accesses with unusual sizes

This patch makes asan instrument memory accesses with unusual sizes (e.g. 5 bytes or 10 bytes), e.g. long double or
packed structures.
Instrumentation is done with two 1-byte checks
(first and last bytes) and if the error is found
__asan_report_load_n(addr, real_size) or
__asan_report_store_n(addr, real_size)
is called.

Also, call these two new functions in memset/memcpy
instrumentation.

asan-rt part will follow.

llvm-svn: 175507

11 years agoFix a bug in mutex_try_to_lock. This was previously trying to unlock a mutex that...
David Chisnall [Tue, 19 Feb 2013 11:28:45 +0000 (11:28 +0000)]
Fix a bug in mutex_try_to_lock.  This was previously trying to unlock a mutex that it didn't own, causing an assertion failure in mutex.cpp.  The issue was that the unique_lock went out of scope, releasing the lock on m, then m.unlock() was called on an already-unlocked mutex.

This change removes the spurious m.unlock() call.

If this test was previously passing for anyone with assertions enabled, then they should investigate bugs in their pthread implementation, as pthread_unlock() should not return 0 if the mutex is currently unlocked.

llvm-svn: 175506

11 years ago[Sanitizer] If -fsanitize-blacklist= option is not explicitly specified, make Clang...
Alexey Samsonov [Tue, 19 Feb 2013 11:25:29 +0000 (11:25 +0000)]
[Sanitizer] If -fsanitize-blacklist= option is not explicitly specified, make Clang look for the default sanitizer-specific blacklist in the resource directory.

llvm-svn: 175505

11 years ago[msan] Fix ReExec on linux.
Evgeniy Stepanov [Tue, 19 Feb 2013 11:09:29 +0000 (11:09 +0000)]
[msan] Fix ReExec on linux.

execle(argv[0], ...) is wrong, because argv[0] may contain a PATH-resolvable
program name. Execute /proc/self/exe instead.

llvm-svn: 175504