Commit Graph

99324 Commits

Author SHA1 Message Date
NAKAMURA Takumi f7c3022369 lib/Basic/Targets.cpp: Set user_label_prefix on Win64 both mingw and msvc.
llvm-svn: 123689
2011-01-17 22:56:08 +00:00
NAKAMURA Takumi 8a07451a6e Windows/PathV2.inc: For CryptAcquireContext(), CRYPT_VERIFYCONTEXT may be specified for easy use.
llvm-svn: 123687
2011-01-17 22:41:34 +00:00
NAKAMURA Takumi 53f893af54 Windows/PathV2.inc: MoveFileEx() can behave like Posix's mv(1) to specify MOVEFILE_COPY_ALLOWED | MOVEFILE_REPLACE_EXISTING.
llvm-svn: 123686
2011-01-17 22:41:25 +00:00
NAKAMURA Takumi bb4ea1fef9 lib/Support/Windows/Signals.inc: "Showstopper" dialogs may be suppressed with SetErrorMode() on Windows 7.
llvm-svn: 123685
2011-01-17 22:41:15 +00:00
Owen Anderson 459e079912 Remove dead code, that I apparently wrote a while back. We seem to be doing well enough
without whatever this was trying to do.  When/if someone has the time to do some empirical
evaluations, it might be worth it to figure out what this code was trying to do and see if
it's worth resurrecting/fixing.

llvm-svn: 123684
2011-01-17 22:39:54 +00:00
Johnny Chen 07b289221f Terminate the current process being debugged.
The test framework was relying on detecting either "run" or
"process launch" command to automatically kill the inferior.

llvm-svn: 123683
2011-01-17 22:35:39 +00:00
Devang Patel 283e89dd22 Simplify.
llvm-svn: 123682
2011-01-17 22:23:07 +00:00
Rafael Espindola 2e217d6555 More unnamed_addr.
llvm-svn: 123681
2011-01-17 22:22:52 +00:00
Rafael Espindola de089d462c merge strings created by
const NSConstantString *appKey =  @"MyApp";

llvm-svn: 123680
2011-01-17 22:11:21 +00:00
Caroline Tice 6760a51739 Replace Mutex guarding python interpreter access with Predicate,
allowing timeouts & informing the user when the lock is unavailable.


Fixed problem where Debugger::Terminate was clearing the debugger list
even when the global ref count was greater than zero.

llvm-svn: 123674
2011-01-17 21:55:19 +00:00
Greg Clayton fc75303acb Avoid infinite loops in stack backtraces and renamed:
bool RegisterContextLLDB::GetPC (addr_t& pc);

to:
    bool RegisterContextLLDB::ReadPC (addr_t& pc);
    
To avoid confusion with the GetPC() function that is part of the 
lldb_private::RegisterContext:

    uint64_t RegisterContext::GetPC (uint64_t fail_value);
    
Bad things could happen if the two got intermixed and the wrong one got
called.

Fixed inifinite loop detection by watching for two frames where the
RegisterContextLLDB::CursorSP contains the same start_pc and cfa.

    

llvm-svn: 123673
2011-01-17 21:03:33 +00:00
Greg Clayton b2a844bfe1 Removed commented out code since it was incorrect code to begin with and we don't want anyone thinking they should put it back in.
llvm-svn: 123672
2011-01-17 20:59:07 +00:00
Sean Callanan 865267f9d4 Fixed a bug which would trigger an assert() in LLDB;
we were setting a forward-declared Objective-C class
type as being completed using an ExternalSemaSource,
but this is neither legal nor necessary.

llvm-svn: 123671
2011-01-17 20:50:38 +00:00
Douglas Gregor 69e6206b19 Add a missing <cctype> include, from Joerg Sonnenberger!
llvm-svn: 123670
2011-01-17 19:17:01 +00:00
Douglas Gregor 45e84b0053 NetBSD, OpenBSD, and Dragonfly BSD also have arc4random. Patch from
Joerg Sonnenberger!

llvm-svn: 123669
2011-01-17 19:16:24 +00:00
Douglas Gregor a09c6cca72 Add missing <cctype> include, from Joerg Sonnenberger
llvm-svn: 123668
2011-01-17 19:15:43 +00:00
Anders Carlsson 48d7285fc6 Handle base and member destructors in CheckFallThrough.
llvm-svn: 123667
2011-01-17 19:06:31 +00:00
Argyrios Kyrtzidis ee56962cc1 Convert "#pragma unused(...)" into tokens for the parser.
This allows us to cache a "#pragma unused" that occurs inside an inline C++ member function.
Fixes rdar://8829590&8770988.

llvm-svn: 123666
2011-01-17 18:58:44 +00:00
Jim Grosbach 834c373e3f Trailing whitespace.
llvm-svn: 123665
2011-01-17 18:34:03 +00:00
Benjamin Kramer 45d183ccf0 Fix an off-by-one error in ctpop combining.
llvm-svn: 123664
2011-01-17 18:00:28 +00:00
Devang Patel 3ec1f198e5 Update tests to accomodate unnamed_addr introduction.
llvm-svn: 123663
2011-01-17 17:54:17 +00:00
Cameron Zwarich b410858a5f Roll r123609 back in with two changes that fix test failures with expensive
checks enabled:

1) Use '<' to compare integers in a comparison function rather than '<='.

2) Use the uniqued set DefBlocks rather than Info.DefiningBlocks to initialize
the priority queue.

The speedup of scalarrepl on test-suite + SPEC2000 + SPEC2006 is a bit less, at
just under 16% rather than 17%.

llvm-svn: 123662
2011-01-17 17:38:41 +00:00
Devang Patel ea49cb04a5 Revert rr123550. It causes clang build failure on darwin9.
llvm-svn: 123661
2011-01-17 17:34:43 +00:00
Michael J. Spencer 992efd12a7 Archive: Fix temp path names.
llvm-svn: 123660
2011-01-17 16:43:30 +00:00
Oscar Fuentes e65ed1c794 Add some platform checks. Also fix a typo on a Makefile.
Patch by arrowdodger!

llvm-svn: 123659
2011-01-17 16:35:14 +00:00
Rafael Espindola e79d43da3b Add unnamed_addr to the special strings created by
__builtin___CFStringMakeConstantString
This fixes PR8993. A darwin expert might want to check that this is safe.

llvm-svn: 123658
2011-01-17 16:31:00 +00:00
Michael J. Spencer b74799090a Support/raw_ostream: Fix uninitalized variable in raw_fd_ostream constructor.
llvm-svn: 123643
2011-01-17 15:53:12 +00:00
Jay Foad fe87364215 Remove useless Tag enumeration.
llvm-svn: 123623
2011-01-17 15:18:06 +00:00
Kalle Raiskila 06c6d5cdb6 Split up RotateShift itinerary in SPU.
'rotq*' and 'shlq*' instructions go to the odd pipeline,
wheras the inter-vector equivalents 'rot*', 'shl*' go 
to the even.

llvm-svn: 123622
2011-01-17 13:33:19 +00:00
Benjamin Kramer 24c5184dca Add a DAGCombine to turn (ctpop x) u< 2 into (x & x-1) == 0.
This shaves off 4 popcounts from the hacked 186.crafty source.

This is enabled even when a native popcount instruction is available. The
combined code is one operation longer but it should be faster nevertheless.

llvm-svn: 123621
2011-01-17 12:04:57 +00:00
Kalle Raiskila 7e7b4ac751 Don't crash SPU BE with memory accesses with big alignmnet.
llvm-svn: 123620
2011-01-17 11:59:20 +00:00
Evan Cheng dfce83c8f5 Materialize GA addresses with movw + movt pairs for Darwin in PIC mode. e.g.
movw    r0, :lower16:(L_foo$non_lazy_ptr-(LPC0_0+4))
        movt    r0, :upper16:(L_foo$non_lazy_ptr-(LPC0_0+4))
LPC0_0:
        add     r0, pc, r0

It's not yet enabled by default as some tests are failing. I suspect bugs in
down stream tools.

llvm-svn: 123619
2011-01-17 08:03:18 +00:00
Cameron Zwarich 67431d7943 Roll out r123609 due to failures on the llvm-x86_64-linux-checks bot.
llvm-svn: 123618
2011-01-17 07:26:51 +00:00
Greg Clayton 388b33b5cd Another fix for the objective C runtime object checker to not use NULL when it isn't defined.
llvm-svn: 123617
2011-01-17 06:17:42 +00:00
Greg Clayton 23af0d896d Fixed the C string summary formatter to not get into an infinite loop for
long strings in "char *" (with any combo if qualifiers).

llvm-svn: 123616
2011-01-17 05:51:02 +00:00
Greg Clayton 7d87b92d2e Fix the objective C object validator that I broke. When we have ObjC runtime
V2 and we only have gdb_class_getClass, then make sure the isa isn't NULL 
before trying to call gdb_class_getClass otherwise we end up deadlocking the
objective C runtime.

llvm-svn: 123615
2011-01-17 04:34:26 +00:00
Greg Clayton 47a15b7c0b Added missing source files.
llvm-svn: 123614
2011-01-17 04:19:51 +00:00
Greg Clayton 6beaaa680a A few of the issue I have been trying to track down and fix have been due to
the way LLDB lazily gets complete definitions for types within the debug info.
When we run across a class/struct/union definition in the DWARF, we will only
parse the full definition if we need to. This works fine for top level types
that are assigned directly to variables and arguments, but when we have a 
variable with a class, lets say "A" for this example, that has a member:
"B *m_b". Initially we don't need to hunt down a definition for this class
unless we are ever asked to do something with it ("expr m_b->getDecl()" for
example). With my previous approach to lazy type completion, we would be able
to take a "A *a" and get a complete type for it, but we wouldn't be able to
then do an "a->m_b->getDecl()" unless we always expanded all types within a
class prior to handing out the type. Expanding everything is very costly and
it would be great if there were a better way.

A few months ago I worked with the llvm/clang folks to have the 
ExternalASTSource class be able to complete classes if there weren't completed
yet:

class ExternalASTSource {
....

    virtual void
    CompleteType (clang::TagDecl *Tag);
    
    virtual void 
    CompleteType (clang::ObjCInterfaceDecl *Class);
};

This was great, because we can now have the class that is producing the AST
(SymbolFileDWARF and SymbolFileDWARFDebugMap) sign up as external AST sources
and the object that creates the forward declaration types can now also
complete them anywhere within the clang type system.

This patch makes a few major changes:
- lldb_private::Module classes now own the AST context. Previously the TypeList
  objects did.
- The DWARF parsers now sign up as an external AST sources so they can complete
  types.
- All of the pure clang type system wrapper code we have in LLDB (ClangASTContext,
  ClangASTType, and more) can now be iterating through children of any type,
  and if a class/union/struct type (clang::RecordType or ObjC interface) 
  is found that is incomplete, we can ask the AST to get the definition. 
- The SymbolFileDWARFDebugMap class now will create and use a single AST that
  all child SymbolFileDWARF classes will share (much like what happens when
  we have a complete linked DWARF for an executable).
  
We will need to modify some of the ClangUserExpression code to take more 
advantage of this completion ability in the near future. Meanwhile we should
be better off now that we can be accessing any children of variables through
pointers and always be able to resolve the clang type if needed.

llvm-svn: 123613
2011-01-17 03:46:26 +00:00
Anders Carlsson 0acd4cfc33 Remove dead code.
llvm-svn: 123612
2011-01-17 03:13:24 +00:00
Anders Carlsson 5610490cdf Change ParseOptionalCXX0XVirtSpecifierSeq to take a VirtSpecifiers struct.
Enforce C++[class.mem]p8:
A virt-specifier-seq shall contain at most one of each virt-specifier.

llvm-svn: 123611
2011-01-17 03:05:47 +00:00
Francois Pichet 7cade2cd2f Suppress warning "switch statement contains 'default' but no 'case' labels" on MSVC.
llvm-svn: 123610
2011-01-17 02:07:17 +00:00
Cameron Zwarich 814cd9233e Eliminate the use of dominance frontiers in PromoteMemToReg. In addition to
eliminating a potentially quadratic data structure, this also gives a 17%
speedup when running -scalarrepl on test-suite + SPEC2000 + SPEC2006. My initial
experiment gave a greater speedup around 25%, but I moved the dominator tree
level computation from dominator tree construction to PromoteMemToReg.

Since this approach to computing IDFs has a much lower overhead than the old
code using precomputed DFs, it is worth looking at using this new code for the
second scalarrepl pass as well.

llvm-svn: 123609
2011-01-17 01:08:59 +00:00
Francois Pichet 7d92ee3852 Remove a c++ file test I inadvertently added in Sema last week.
llvm-svn: 123608
2011-01-17 01:08:01 +00:00
Francois Pichet 834bfbf147 Revert r123600.
llvm-svn: 123607
2011-01-17 00:56:42 +00:00
Anders Carlsson 11fdbbc1ad Begin work on supporting "N3206: Override control: Eliminating Attributes", from
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3206.htm

This lands support for parsing virt-specifier-seq after member functions, including the
contextual keywords 'final', and 'override'. The keywords are not yet used for anything.

llvm-svn: 123606
2011-01-16 23:56:42 +00:00
Michael J. Spencer 5ce56081c7 UnRevert "Revert "Archive: Replace all internal uses of PathV1 with PathV2. The external API still uses PathV1.""
llvm-svn: 123605
2011-01-16 23:39:59 +00:00
Michael J. Spencer ec202ee69a Fix rename.
llvm-svn: 123604
2011-01-16 22:18:41 +00:00
Anders Carlsson 128ddbf412 Fix a bug where the -Wmissing-noreturn would always treat constructors with base or member initializers as noreturn.
llvm-svn: 123603
2011-01-16 22:12:43 +00:00
Anders Carlsson 36ecb1f208 Add AnalysisContext::dumpCFG.
llvm-svn: 123602
2011-01-16 22:05:23 +00:00
Nick Lewycky 872a453ada Test for lazy value info's ability to prove the absense of NULLs in pointers.
llvm-svn: 123601
2011-01-16 21:57:20 +00:00