Commit Graph

141431 Commits

Author SHA1 Message Date
Chandler Carruth b5f3bd956c Replace the 'final' keyword with 'LLVM_FINAL' as GCC 4.6 doesn't support
the keyword.

If anyone cares deeply about the final optimizations with GCC, we might
want to add a version test to the LLVM definition, but I'm perfectly
happy with this just only firing under Clang and modern MSVC builds.

llvm-svn: 172898
2013-01-19 09:57:51 +00:00
Chandler Carruth 8b95c03fca Allow the LLD CMake build to work with -std=gnu++0x and -std=gnu++11 as
well as c++0x and c++11. This can be especially useful when building
with GCC in C++11 mode.

llvm-svn: 172897
2013-01-19 09:41:42 +00:00
Chandler Carruth 058761266d Fix the build with libstdc++ v4.6 on Linux by supplying an explicit move
assignment operator. There is an issue where classes with deleted copy
constructors and user defined move constructors end up with an
implicitly deleted copy constructor that is selected instead of the
implicit move constructor. This is a bit of a hack, but it allows me to
build LLD in a bootstrap with libstdc++ which is my primary goal.

llvm-svn: 172896
2013-01-19 09:38:14 +00:00
Chandler Carruth 06e24e34a9 Re-sort the #include lines which have gotten out of order.
llvm-svn: 172895
2013-01-19 09:10:38 +00:00
Nadav Rotem 7b3120b9ae On Sandybridge split unaligned 256bit stores into two xmm-sized stores.
llvm-svn: 172894
2013-01-19 08:38:41 +00:00
Craig Topper 84b01120bc Use MVT instead of EVT when computing shuffle immediates since they can only be for legal types. Keeps compiler from generating unneeded checks and handling for extended types.
llvm-svn: 172893
2013-01-19 08:27:45 +00:00
Chandler Carruth 4b41745e05 Re-sort all the headers. Lots of regressions have crept in here.
Manually fix the order of UnwrappedLineParser.cpp as that one didn't
have its associated header as the first header.

This also uncovered a subtle inclusion order dependency as CLog.h didn't
include LLVM.h to pick up using declarations it relied upon.

llvm-svn: 172892
2013-01-19 08:09:44 +00:00
Chandler Carruth 1fe21fc0b5 Sort all of the includes. Several files got checked in with mis-sorted
includes.

llvm-svn: 172891
2013-01-19 08:03:47 +00:00
Chandler Carruth a2bb7f9d30 Move an input header file under an Inputs directory to be consistent
with other auxilliary test inputs and simplify the identification of
inputs to tests.

llvm-svn: 172890
2013-01-19 06:31:24 +00:00
Ted Kremenek a83b407c51 Reapply r172878 with test case.
llvm-svn: 172888
2013-01-19 04:33:14 +00:00
Jason Molenda 4c781fd78a <rdar://problem/12350715>
Modify UnwindLLDB::SearchForSavedLocationForRegister so if the register
save locations for a register mid-stack is in another register (or in the
same register, indicating the reg wasn't modified in this frame), don't
return that as a found location.  Keep iterating down the array of frames
until a concrete location/value for the register is found, or until we
get to frame 0 where the reg value can be used as-is.

If lldb was trying to backtrace a program that blew out its stack via
recursion and the unwind instructions had some kind of 
this-reg-is-saved-in-that-reg instruction, lldb would revert to doing 
a recursive search for a concrete value and blow out its own stack.

llvm-svn: 172887
2013-01-19 03:53:42 +00:00
Richard Smith 1ac67d1530 Fix five more cases of tokens which can legally follow a type specifier.
llvm-svn: 172886
2013-01-19 03:48:05 +00:00
Argyrios Kyrtzidis 719736c581 [PCH/Modules] Revert r172843, it caused a module to fail building.
llvm-svn: 172884
2013-01-19 03:14:56 +00:00
Anna Zaks 7d9ce53124 [analyzer] Suppress warnings coming out of macros defined in sys/queue.h
Suppress the warning by just not emitting the report. The sink node
would get generated, which is fine since we did reach a bad state.

Motivation

Due to the way code is structured in some of these macros, we do not
reason correctly about it and report false positives. Specifically, the
following loop reports a use-after-free. Because of the way the code is
structured inside of the macro, the analyzer assumes that the list can
have cycles, so you end up with use-after-free in the loop, that is
safely deleting elements of the list. (The user does not have a way to
teach the analyzer about shape of data structures.)

SLIST_FOREACH_SAFE(item, &ctx->example_list, example_le, tmpitem) {
			if (item->index == 3) { // if you remove each time, no complaints
				assert((&ctx->example_list)->slh_first == item);
				SLIST_REMOVE(&ctx->example_list, item, example_s, example_le);
				free(item);
			}
		}

llvm-svn: 172883
2013-01-19 02:18:15 +00:00
Jack Carter 7ab15fafe3 This is a resubmittal. For some reason it broke the bots yesterday
but I cannot reproduce the problem and have scrubed my sources and
even tested with llvm-lit -v --vg.
Formatting fixes. Mostly long lines and 
blank spaces at end of lines.

Contributer: Jack Carter
 
llvm-svn: 172882
2013-01-19 02:00:40 +00:00
NAKAMURA Takumi 3fef3ef91d Whitespace.
llvm-svn: 172881
2013-01-19 01:54:35 +00:00
Sean Callanan a2868d4c2e Extended LLDB to handle blocks capturing 'self'
in an Objective-C class method.  Before, errors
of the form

error: cannot find interface declaration for '$__lldb_objc_class'

would appear when running any expression when
the current frame is a block that captures 'self'
from an Objective-C class method.

<rdar://problem/12905561>

llvm-svn: 172880
2013-01-19 01:49:02 +00:00
NAKAMURA Takumi 97e77abf83 Revert r172878, "Reword warning about using a *static* variable within its own initialization."
It broke, at least, linux, msvc and mingw bots.

llvm-svn: 172879
2013-01-19 01:47:46 +00:00
Ted Kremenek e07d167a50 Reword warning about using a *static* variable within its own initialization.
The warning is still under -Wuninitialized (although technically this
is defined behavior), but under a subgroup -Wstatic-self-init.

This addresses PR 10265.

llvm-svn: 172878
2013-01-19 00:49:00 +00:00
Renato Golin cc99c42130 Fix 80-col and early exit in cost model
llvm-svn: 172877
2013-01-19 00:42:16 +00:00
Greg Clayton 746a28bb55 <rdar://problem/13011717>
Fixed a compilation error that occurs when "lldb.macosx.heap" is imported and "ptr_refs" is used.

llvm-svn: 172876
2013-01-19 00:35:24 +00:00
Ted Kremenek 7ba78c679c -Wuninitialized: warn about uninitialized values resulting from ?: that evaluate to lvalues (in C++).
llvm-svn: 172875
2013-01-19 00:25:06 +00:00
Jakob Stoklund Olesen ac6cfa41d6 Remove some register allocation order dependencies.
llvm-svn: 172874
2013-01-19 00:03:32 +00:00
Greg Clayton a4d8747d0f <rdar://problem/13010007>
Added the ability for OS plug-ins to lazily populate the thread this. The python OS plug-in classes can now implement the following method:

class OperatingSystemPlugin:
  def create_thread(self, tid, context):
    # Return a dictionary for a new thread to create it on demand

This will add a new thread to the thread list if it doesn't already exist. The example code in lldb/examples/python/operating_system.py has been updated to show how this call us used.

Cleaned up the code in PythonDataObjects.cpp/h:
- renamed all classes that started with PythonData* to be Python*. 
- renamed PythonArray to PythonList. Cleaned up the code to use inheritance where
- Centralized the code that does ref counting in the PythonObject class to a single function.
- Made the "bool PythonObject::Reset(PyObject *)" function be virtual so each subclass can correctly check to ensure a PyObject is of the right type before adopting the object.
- Cleaned up all APIs and added new constructors for the Python* classes to they can all construct form:
	- PyObject *
	- const PythonObject &
	- const lldb::ScriptInterpreterObjectSP &

Cleaned up code in ScriptInterpreterPython:
- Made calling python functions safer by templatizing the production of value formats. Python specifies the value formats based on built in C types (long, long long, etc), and code often uses typedefs for uint32_t, uint64_t, etc when passing arguments down to python. We will now always produce correct value formats as the templatized code will "do the right thing" all the time.
- Fixed issues with the ScriptInterpreterPython::Locker where entering the session and leaving the session had a bunch of issues that could cause the "lldb" module globals lldb.debugger, lldb.target, lldb.process, lldb.thread, and lldb.frame to not be initialized.

llvm-svn: 172873
2013-01-18 23:41:08 +00:00
Andrew Kaylor 162b22c155 Fixing behavior of ELFObjectFile::getSymbolFileOffset().
llvm-svn: 172872
2013-01-18 23:40:42 +00:00
Greg Clayton e0d5323734 Disassemble the vAttach packet.
llvm-svn: 172871
2013-01-18 23:30:12 +00:00
David Greene b609a26355 Pass NO_MISSING_FIELD_INITIALIZERS to Compiler Flags
configure checks whether -Wno-missing-field-initializers is a valid
compiler flag but it was never actually used in Makefile.rules.
Enable it to avoid some ridiculous warnings from gcc.

llvm-svn: 172870
2013-01-18 23:22:52 +00:00
Han Ming Ong 4b6459f33f <rdar://problem/12976277>
Swap in index ids for thread ids in GDBRemoteCommunicationClient. Besides dealing with the async logic, I have to take care of the situation when the inferior paused as well.

llvm-svn: 172869
2013-01-18 23:11:53 +00:00
Nadav Rotem 7431211214 On Sandybridge loading unaligned 256bits using two XMM loads (vmovups and vinsertf128) is faster than using a single vmovups instruction.
llvm-svn: 172868
2013-01-18 23:10:30 +00:00
Jason Molenda 2affc1ea6d Add code to retreive the mach port # for each thread in the inferior application's
mach port namespace in addition to the mach port # in examine-threads' own port
namespace, and print it (when -v is used).

llvm-svn: 172867
2013-01-18 23:07:45 +00:00
Jordan Rose ed1bf29df1 Use hexDigitValue in LLLexer.
llvm-svn: 172866
2013-01-18 23:05:41 +00:00
David Blaikie 68f71a3a78 Remove windows line endings.
llvm-svn: 172865
2013-01-18 23:03:15 +00:00
Michael Gottesman 87db357547 Improved comment.
llvm-svn: 172864
2013-01-18 23:02:45 +00:00
Michael Gottesman 9854e0c6a2 Fixed typo in comment.
llvm-svn: 172863
2013-01-18 23:00:33 +00:00
Matt Beaumont-Gay 21c6c959ec Remove unused variable
llvm-svn: 172862
2013-01-18 22:34:17 +00:00
Jordan Rose 78ed86a7e5 Adopt llvm::hexDigitValue.
llvm-svn: 172861
2013-01-18 22:33:58 +00:00
Jordan Rose 668a433723 Fix mismatched #endif.
llvm-svn: 172860
2013-01-18 22:33:54 +00:00
Douglas Gregor caddba9f00 Once we've collected the template arguments for a
partially-substituted parameter pack in a template, forget about the
partially-substituted parameter pack: it is now completed. Fixes
<rdar://problem/12176336>.

llvm-svn: 172859
2013-01-18 22:27:09 +00:00
DeLesley Hutchins 9fa426a666 Thread-safety analysis: ignore edges from throw expressions in CFG.
llvm-svn: 172858
2013-01-18 22:15:45 +00:00
Eric Christopher e9ec2458e7 Split out DW_OP_addr for the split debug info DWARF5 proposal.
llvm-svn: 172857
2013-01-18 22:11:33 +00:00
Richard Smith f75c8b3c8d Include ubsan runtime even when building a shared library. We don't require the executable to be linked with UBSan.
llvm-svn: 172856
2013-01-18 22:09:26 +00:00
Akira Hatanaka b2206e71e1 [mips] Enable inlining of atomic ops on mips32 and mips64.
llvm-svn: 172855
2013-01-18 21:58:11 +00:00
Bill Wendling 7df048e6b6 If the attributes don't exist, just bail for now.
llvm-svn: 172854
2013-01-18 21:56:07 +00:00
Bill Wendling 658d24d211 Use AttributeSet accessor methods instead of Attribute accessor methods.
Further encapsulation of the Attribute object. Don't allow direct access to the
Attribute object as an aggregate.

llvm-svn: 172853
2013-01-18 21:53:16 +00:00
Bill Wendling 4f972ea2d8 Remove unused parameter. Also use the AttributeSet query methods instead of the Attribute query methods.
llvm-svn: 172852
2013-01-18 21:50:24 +00:00
Jordan Rose e1f76583dd Add llvm::hexDigitValue to convert single characters to hex.
This is duplicated in a couple places in the codebase. Adopt this in APFloat.

llvm-svn: 172851
2013-01-18 21:45:30 +00:00
Michael J. Spencer a17b72e7cf [Core] Fix passing an rvalue reference of ErrorOr.
llvm-svn: 172850
2013-01-18 21:42:01 +00:00
Bill Wendling 63ffde573e Use the AttributeSet query method instead of the Attribute method.
llvm-svn: 172849
2013-01-18 21:26:07 +00:00
Sean Callanan 7b5805d0d1 Made the expression handle variables with
DW_AT_const_value instead of a location.  Also
added a testcase covering "frame variable," "expr"
using the IR interpreter, and "expr" using the
LLVM JIT.

<rdar://problem/12978195>

llvm-svn: 172848
2013-01-18 21:20:51 +00:00
Jack Carter c1b17ed2e1 This is a resubmittal. For some reason it broke the bots yesterday
but I cannot reproduce the problem and have scrubed my sources and
even tested with llvm-lit -v --vg.
Support for Mips register information sections.

Mips ELF object files have a section that is dedicated
to register use info. Some of this information such as
the assumed Global Pointer value is used by the linker
in relocation resolution.

The register info file is .reginfo in o32 and .MIPS.options
in 64 and n32 abi files.

This patch contains the changes needed to create the sections,
but leaves the actual register accounting for a future patch.


Contributer: Jack Carter
 
llvm-svn: 172847
2013-01-18 21:20:38 +00:00