platform/upstream/llvm.git
11 years ago[objdump] Print the PT_INTERP and PT_DYNAMIC correcctly.
Michael J. Spencer [Wed, 20 Feb 2013 20:18:10 +0000 (20:18 +0000)]
[objdump] Print the PT_INTERP and PT_DYNAMIC correcctly.

llvm-svn: 175659

11 years agoUpdate a comment that looks to have been accidentally deleted many moons ago.
Chad Rosier [Wed, 20 Feb 2013 20:15:55 +0000 (20:15 +0000)]
Update a comment that looks to have been accidentally deleted many moons ago.

llvm-svn: 175658

11 years ago[ELF][Writer] Add .interp section.
Michael J. Spencer [Wed, 20 Feb 2013 20:13:47 +0000 (20:13 +0000)]
[ELF][Writer] Add .interp section.

llvm-svn: 175657

11 years agoFix a bug that causes dotest.py to exit with a passing exit-code, even if some tests...
Daniel Malea [Wed, 20 Feb 2013 20:12:11 +0000 (20:12 +0000)]
Fix a bug that causes dotest.py to exit with a passing exit-code, even if some tests fail
- occurs when multiple compilers/architectures are tested (via -C or -A flags)

llvm-svn: 175656

11 years ago[ASan] revert part of r175631 that looks like accidental commit
Alexey Samsonov [Wed, 20 Feb 2013 19:55:47 +0000 (19:55 +0000)]
[ASan] revert part of r175631 that looks like accidental commit

llvm-svn: 175655

11 years ago[ELF][Writer] Add dynamic table.
Michael J. Spencer [Wed, 20 Feb 2013 19:46:12 +0000 (19:46 +0000)]
[ELF][Writer] Add dynamic table.

llvm-svn: 175654

11 years agoFix a problem with the const_variables test case (another lldb bug remains)
Daniel Malea [Wed, 20 Feb 2013 19:41:49 +0000 (19:41 +0000)]
Fix a problem with the const_variables test case (another lldb bug remains)
- make the test case step past the location where 'index' is initialized, otherwise its value cannot be printed (verified gcc 4.6/4.7 and recent clang)
- "Couldn't materialize struct" error from LLDB still prevents this test case from passing

llvm-svn: 175653

11 years agoAttempt to clean up tests for non-X86 platforms.
Bill Wendling [Wed, 20 Feb 2013 19:30:01 +0000 (19:30 +0000)]
Attempt to clean up tests for non-X86 platforms.

llvm-svn: 175652

11 years agoRewrite comments.
Dan Gohman [Wed, 20 Feb 2013 19:28:46 +0000 (19:28 +0000)]
Rewrite comments.

llvm-svn: 175651

11 years agoAdd comment in Memory.inc explaining r175646.
Krzysztof Parzyszek [Wed, 20 Feb 2013 19:25:09 +0000 (19:25 +0000)]
Add comment in Memory.inc explaining r175646.

llvm-svn: 175650

11 years agoProcess and handle attributes on conditions and for loop variables. Process and
Richard Smith [Wed, 20 Feb 2013 19:22:51 +0000 (19:22 +0000)]
Process and handle attributes on conditions and for loop variables. Process and
diagnose attributes on alias declarations, using directives, and attribute
declarations.

llvm-svn: 175649

11 years agoSIGQUIT is a "kill" signal, rather than an "int" signal, in this context.
Dan Gohman [Wed, 20 Feb 2013 19:15:01 +0000 (19:15 +0000)]
SIGQUIT is a "kill" signal, rather than an "int" signal, in this context.

llvm-svn: 175648

11 years agoFormatting, grammar
Andrew Kaylor [Wed, 20 Feb 2013 18:24:34 +0000 (18:24 +0000)]
Formatting, grammar

llvm-svn: 175647

11 years agoOn PowerPC, the cache-flush instructions dcbf and icbi are treated as
Krzysztof Parzyszek [Wed, 20 Feb 2013 18:24:30 +0000 (18:24 +0000)]
On PowerPC, the cache-flush instructions dcbf and icbi are treated as
loads. On FreeBSD, add PROT_READ page protection flag before flushing
cache.

llvm-svn: 175646

11 years agoUse LiveRangeUpdater instead of mergeIntervalRanges.
Jakob Stoklund Olesen [Wed, 20 Feb 2013 18:18:15 +0000 (18:18 +0000)]
Use LiveRangeUpdater instead of mergeIntervalRanges.

Performance is the same, but LiveRangeUpdater has a more flexible
interface.

llvm-svn: 175645

11 years agoAdd a LiveRangeUpdater class.
Jakob Stoklund Olesen [Wed, 20 Feb 2013 18:18:12 +0000 (18:18 +0000)]
Add a LiveRangeUpdater class.

Adding new segments to large LiveIntervals can be expensive because the
LiveRange objects after the insertion point may need to be moved left or
right. This can cause quadratic behavior when adding a large number of
segments to a live range.

The LiveRangeUpdater class allows the LIveInterval to be in a temporary
invalid state while segments are being added. It maintains an internal
gap in the LiveInterval when it is shrinking, and it has a spill area
for new segments when the LiveInterval is growing.

The behavior is similar to the existing mergeIntervalRanges() function,
except it allocates less memory for the spill area, and the algorithm is
turned inside out so the loop is driven by the clients.

llvm-svn: 175644

11 years agoAdding support for absolute relocations. This occurs in ELF files when a relocation...
Andrew Kaylor [Wed, 20 Feb 2013 18:09:21 +0000 (18:09 +0000)]
Adding support for absolute relocations.  This occurs in ELF files when a relocation is given with no name and an undefined section.  The relocation is applied with an address of zero.

llvm-svn: 175643

11 years agoFix PR15267
Michael Liao [Wed, 20 Feb 2013 18:04:21 +0000 (18:04 +0000)]
Fix PR15267

- When extloading from a vector with non-byte-addressable element, e.g.
  <4 x i1>, the current logic breaks. Extend the current logic to
  fix the case where the element type is not byte-addressable by loading
  all bytes, bit-extracting/packing each element.

llvm-svn: 175642

11 years ago[ms-inline asm] Make the comment a bit more verbose.
Chad Rosier [Wed, 20 Feb 2013 18:03:44 +0000 (18:03 +0000)]
[ms-inline asm] Make the comment a bit more verbose.

llvm-svn: 175641

11 years agoAdd a default constructor for LiveRange.
Jakob Stoklund Olesen [Wed, 20 Feb 2013 17:46:51 +0000 (17:46 +0000)]
Add a default constructor for LiveRange.

It is useful to be able to create temporary LiveRange object whose
members are filled in later.

llvm-svn: 175639

11 years agorename fixupAddend to relocAddend
Shankar Easwaran [Wed, 20 Feb 2013 17:42:00 +0000 (17:42 +0000)]
rename fixupAddend to relocAddend

llvm-svn: 175638

11 years ago[ms-inline asm] Remove this test while I investigate why eax isn't being clobbered.
Chad Rosier [Wed, 20 Feb 2013 17:39:31 +0000 (17:39 +0000)]
[ms-inline asm] Remove this test while I investigate why eax isn't being clobbered.

llvm-svn: 175637

11 years agofunctionality to handle global atoms in Merge sections
Shankar Easwaran [Wed, 20 Feb 2013 17:38:37 +0000 (17:38 +0000)]
functionality to handle global atoms in Merge sections

llvm-svn: 175636

11 years agoFix bug 14779 for passing anonymous aggregates [patch by Kai Nacke].
Bill Schmidt [Wed, 20 Feb 2013 17:31:41 +0000 (17:31 +0000)]
Fix bug 14779 for passing anonymous aggregates [patch by Kai Nacke].

The PPC backend doesn't handle these correctly.  This patch uses logic
similar to that in the X86 and ARM backends to track these arguments
properly.

llvm-svn: 175635

11 years agoHexagon: Move HexagonMCInst.h to MCTargetDesc/HexagonMCInst.h.
Jyotsna Verma [Wed, 20 Feb 2013 16:13:27 +0000 (16:13 +0000)]
Hexagon: Move HexagonMCInst.h to MCTargetDesc/HexagonMCInst.h.
Add HexagonMCInst class which adds various Hexagon VLIW annotations.
In addition, this class also includes some APIs related to the
constant extenders.

llvm-svn: 175634

11 years agoRevert r175626, "ADT/Optional.h: Appease msvc."
NAKAMURA Takumi [Wed, 20 Feb 2013 15:52:44 +0000 (15:52 +0000)]
Revert r175626, "ADT/Optional.h: Appease msvc."

Sorry, I didn't cover +Asserts, by accident. :(

llvm-svn: 175633

11 years agoFix PR15155: lost vadd/vsplat optimization.
Bill Schmidt [Wed, 20 Feb 2013 15:50:31 +0000 (15:50 +0000)]
Fix PR15155: lost vadd/vsplat optimization.

During lowering of a BUILD_VECTOR, we look for opportunities to use a
vector splat.  When the splatted value fits in 5 signed bits, a single
splat does the job.  When it doesn't fit in 5 bits but does fit in 6,
and is an even value, we can splat on half the value and add the result
to itself.

This last optimization hasn't been working recently because of improved
constant folding.  To circumvent this, create a pseudo VADD_SPLAT that
can be expanded during instruction selection.

llvm-svn: 175632

11 years ago[ASan] Delete asan/dynamic dir and temporarily move the interposers declarations...
Alexander Potapenko [Wed, 20 Feb 2013 15:46:02 +0000 (15:46 +0000)]
[ASan] Delete asan/dynamic dir and temporarily move the interposers declarations to asan_intercepted_functions.h
Now that we have only one dependency on asan_intercepted_functions.h, we can unite that code with the interceptors declarations in asan_interceptors.cc and get rid of asan_intercepted_functions.h

llvm-svn: 175631

11 years agoFix regression in string literal alignment.
Manuel Klimek [Wed, 20 Feb 2013 15:32:58 +0000 (15:32 +0000)]
Fix regression in string literal alignment.

Now correctly indents (again):
a = a + "a"
        "a"
        "a";

llvm-svn: 175630

11 years ago[ASan] Make isoc99_*scanf intercepted on Linux only. Those are unavailable on Darwin.
Alexander Potapenko [Wed, 20 Feb 2013 15:27:58 +0000 (15:27 +0000)]
[ASan] Make isoc99_*scanf intercepted on Linux only. Those are unavailable on Darwin.

llvm-svn: 175629

11 years agoFixes bug in string literal alignment.
Manuel Klimek [Wed, 20 Feb 2013 15:25:48 +0000 (15:25 +0000)]
Fixes bug in string literal alignment.

We now indent the following correctly:
1. some + "literal" /* comment */
          "literal";
2. breaking string literals after which we have another string literal.

llvm-svn: 175628

11 years agoWhitespace.
NAKAMURA Takumi [Wed, 20 Feb 2013 15:12:32 +0000 (15:12 +0000)]
Whitespace.

llvm-svn: 175627

11 years agoADT/Optional.h: Appease msvc.
NAKAMURA Takumi [Wed, 20 Feb 2013 15:12:24 +0000 (15:12 +0000)]
ADT/Optional.h: Appease msvc.

llvm-svn: 175626

11 years ago[asan] move preinit_test to Linux since on Mac __asan_init is called from ld-preload...
Kostya Serebryany [Wed, 20 Feb 2013 15:10:22 +0000 (15:10 +0000)]
[asan] move preinit_test to Linux since on Mac __asan_init is called from ld-preload-ed runtime

llvm-svn: 175625

11 years agoTweaks and fixes to cpp11-migrate generated tests
Edwin Vane [Wed, 20 Feb 2013 14:35:53 +0000 (14:35 +0000)]
Tweaks and fixes to cpp11-migrate generated tests

* Fixed a comment typo
* Changed 'autogen' to 'generated-tests'
* Made the clean target not fail if the 'generated-tests' directory
  doesn't already exist.

llvm-svn: 175624

11 years ago[asan] on linux, run __asan_init from .preinit_array (even earlier than before)
Kostya Serebryany [Wed, 20 Feb 2013 14:28:08 +0000 (14:28 +0000)]
[asan] on linux, run __asan_init from .preinit_array (even earlier than before)

llvm-svn: 175623

11 years ago[Sanitizer] use raw syscall instead of _exit() function on Linux
Alexey Samsonov [Wed, 20 Feb 2013 13:54:32 +0000 (13:54 +0000)]
[Sanitizer] use raw syscall instead of _exit() function on Linux

llvm-svn: 175622

11 years agoMove the SplatByte helper to APInt and generalize it a bit.
Benjamin Kramer [Wed, 20 Feb 2013 13:00:06 +0000 (13:00 +0000)]
Move the SplatByte helper to APInt and generalize it a bit.

llvm-svn: 175621

11 years agoDon't remove blank lines within unwrapped lines.
Daniel Jasper [Wed, 20 Feb 2013 12:56:39 +0000 (12:56 +0000)]
Don't remove blank lines within unwrapped lines.

If the code author decides to put empty lines anywhere into the code we
should treat them equally, i.e. reduce them to the configured
MaxEmptyLinesToKeep.

With this change, we e.g. keep the newline in:
SomeType ST = {
  // First value
  a,

  // Second value
  b
};

llvm-svn: 175620

11 years agoI optimized the following patterns:
Elena Demikhovsky [Wed, 20 Feb 2013 12:42:54 +0000 (12:42 +0000)]
I optimized the following patterns:
 sext <4 x i1> to <4 x i64>
 sext <4 x i8> to <4 x i64>
 sext <4 x i16> to <4 x i64>

I'm running Combine on SIGN_EXTEND_IN_REG and revert SEXT patterns:
 (sext_in_reg (v4i64 anyext (v4i32 x )), ExtraVT) -> (v4i64 sext (v4i32 sext_in_reg (v4i32 x , ExtraVT)))

 The sext_in_reg (v4i32 x) may be lowered to shl+sar operations.
 The "sar" does not exist on 64-bit operation, so lowering sext_in_reg (v4i64 x) has no vector solution.

I also added a cost of this operations to the AVX costs table.

llvm-svn: 175619

11 years ago[asan] add a lit test for invoke-with-no-return instrumentation
Kostya Serebryany [Wed, 20 Feb 2013 12:37:22 +0000 (12:37 +0000)]
[asan] add a lit test for invoke-with-no-return instrumentation

llvm-svn: 175618

11 years ago[asan] instrument invoke insns with noreturn attribute (as well as call insns)
Kostya Serebryany [Wed, 20 Feb 2013 12:35:15 +0000 (12:35 +0000)]
[asan] instrument invoke insns with noreturn attribute (as well as call insns)

llvm-svn: 175617

11 years agoFix thumbv5e frame lowering assertion failure.
Logan Chien [Wed, 20 Feb 2013 12:21:33 +0000 (12:21 +0000)]
Fix thumbv5e frame lowering assertion failure.

It is possible that frame pointer is not found in the
callee saved info, thus FramePtrSpillFI may be incorrect
if we don't check the result of hasFP(MF).

Besides, if we enable the stack coloring algorithm, there
will be an assertion to ensure the slot is live.  But in
the test case, %var1 is not live in the prologue of the
function, and we will get the assertion failure.

Note: There is similar code in ARMFrameLowering.cpp.
llvm-svn: 175616

11 years ago[sanitizer] Fix lint.
Evgeniy Stepanov [Wed, 20 Feb 2013 11:06:07 +0000 (11:06 +0000)]
[sanitizer] Fix lint.

llvm-svn: 175615

11 years ago[asan] add test throw_call_test (broken with -static-libstdc++)
Kostya Serebryany [Wed, 20 Feb 2013 10:43:05 +0000 (10:43 +0000)]
[asan] add test throw_call_test (broken with -static-libstdc++)

llvm-svn: 175614

11 years agoImplements breaking of string literals if they stick out.
Manuel Klimek [Wed, 20 Feb 2013 10:15:13 +0000 (10:15 +0000)]
Implements breaking of string literals if they stick out.

An alternative strategy to calculating the break on demand when hitting
a token that would need to be broken would be to put all possible breaks
inside the token into the optimizer.

Currently only supports breaking at spaces; more break points to come.

llvm-svn: 175613

11 years agoRemove target-specific features.
Bill Wendling [Wed, 20 Feb 2013 08:01:34 +0000 (08:01 +0000)]
Remove target-specific features.

llvm-svn: 175610

11 years agoUse the attribute group reference instead of the attribute directly.
Bill Wendling [Wed, 20 Feb 2013 07:48:23 +0000 (07:48 +0000)]
Use the attribute group reference instead of the attribute directly.

llvm-svn: 175609

11 years agoFully qualify llvm::next to avoid ambiguity when building as C++11.
David Blaikie [Wed, 20 Feb 2013 07:39:20 +0000 (07:39 +0000)]
Fully qualify llvm::next to avoid ambiguity when building as C++11.

llvm-svn: 175608

11 years agoFix the (clang -Werror) build by removing an unused member variable.
David Blaikie [Wed, 20 Feb 2013 07:39:18 +0000 (07:39 +0000)]
Fix the (clang -Werror) build by removing an unused member variable.

llvm-svn: 175607

11 years agoModify the tests to use attribute group references instead of listing the
Bill Wendling [Wed, 20 Feb 2013 07:22:19 +0000 (07:22 +0000)]
Modify the tests to use attribute group references instead of listing the
function attributes.

llvm-svn: 175606

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