platform/upstream/llvm.git
10 years ago[mips] Do not generate INS/EXT nodes if target does not have support for
Akira Hatanaka [Wed, 9 Oct 2013 23:36:17 +0000 (23:36 +0000)]
[mips] Do not generate INS/EXT nodes if target does not have support for
ins/ext.

llvm-svn: 192330

10 years agoRevert "llvm-c: Make target initializer functions external functions in lib."
Rui Ueyama [Wed, 9 Oct 2013 23:15:49 +0000 (23:15 +0000)]
Revert "llvm-c: Make target initializer functions external functions in lib."

This reverts commit r192316. The original change introduced circular
dependencies between libTarget and backends. That would broke a build unless
link everything into one big binary.

llvm-svn: 192329

10 years agoRefine string literal concatenation warning within an NSArray literal to not warn...
Ted Kremenek [Wed, 9 Oct 2013 22:34:33 +0000 (22:34 +0000)]
Refine string literal concatenation warning within an NSArray literal to not warn when the literal comes from a macro expansion.  Fixes <rdar://problem/15147688>.

llvm-svn: 192328

10 years agoImplemented the reverse-lookup API in the AST
Sean Callanan [Wed, 9 Oct 2013 22:33:34 +0000 (22:33 +0000)]
Implemented the reverse-lookup API in the AST
importer to avoid duplicate imports of anonymous
structs.

<rdar://problem/14421722>

llvm-svn: 192327

10 years agoInitial checkin of curses-based LLDB UI (lui)
Daniel Malea [Wed, 9 Oct 2013 22:11:30 +0000 (22:11 +0000)]
Initial checkin of curses-based LLDB UI (lui)

LLDB (Terminal) User Interface
==============================
This directory contains the curses user interface for LLDB. To use it, ensure Python can find your lldb module. You may have to modify PYTHONPATH for that purpose:

$ export PYTHONPATH=/path/to/lldb/module

Then, run the lui.py. To load a core file:
$ ./lui.py --core core

To create a target from an executable:
$ ./lui.py /bin/echo "hello world"

To attach to a running process:
$ ./lui.py --attach <pid>

Known Issues
============
1. Resizing the terminal will most likely cause lui to crash.
2. Missing paging in command-window
3. Only minimal testing (on Ubuntu Linux x86_64)

Missing Features
================
- stdin/stdout/stderr windows
- memory window
- backtrace window
- threads window
- tab-completion
- syntax-highlighting (via pygments library)
- (local) variables window
- registers window
- disassembly window
- custom layout

llvm-svn: 192326

10 years agopatch by Yaron: Uses rand_s() from stdlib.h (when building for Windows)
Marshall Clow [Wed, 9 Oct 2013 21:49:03 +0000 (21:49 +0000)]
patch by Yaron: Uses rand_s() from stdlib.h (when building for Windows)

llvm-svn: 192325

10 years agoThis patch addresses a problem encountered by the
Sean Callanan [Wed, 9 Oct 2013 21:45:11 +0000 (21:45 +0000)]
This patch addresses a problem encountered by the
ASTImporter when importing the following types:

typedef struct {
} A;

typedef struct {
  A a;
} B;

Suppose we have imported B, but we did not at that
time need to complete it.  Then later we want to
import A.  The struct is anonymous, so the first
thing we want to do is make sure no other anonymous
struct already matches it.  So we set up an
StructuralEquivalenceContext and compare B with A.

This happens at ASTImporter.cpp:2179.

Now, in this scenario, B is not complete.  So we go
and import its fields, including a, which causes A
to be imported.  The ASTImporter doesn’t yet have A
in its list of already-imported things, so we
import A.

After the StructuralEquivalenceContext is finished
determining that A and B are different, the
ASTImporter concludes that A must be imported
because no equivalent exists, so it imports a second
copy of A.  Now we have two different structs
representing A.  This is really bad news.

The patch allows the StructuralEquivalenceContext to
use the original version of B when making its
comparison, obviating the need for an import and
cutting this loop.

llvm-svn: 192324

10 years agoFix endianness in ObjectFile::CopyData
Ed Maste [Wed, 9 Oct 2013 20:34:25 +0000 (20:34 +0000)]
Fix endianness in ObjectFile::CopyData

ObjectFile::CopyData is used to copy a block of target memory to the
caller's buffer (e.g. for "memory read").  This should be a straight
memcpy, and not byte-swapped if the target and host have different
endianness.

Add a new DataExtractor::CopyData() method that performs this straight
copy and use it in ObjectFile::CopyData().

llvm-svn: 192323

10 years agoAdd logging for POSIX DYLD failures
Ed Maste [Wed, 9 Oct 2013 19:57:11 +0000 (19:57 +0000)]
Add logging for POSIX DYLD failures

llvm-svn: 192322

10 years agoDebug Info: update testing cases when the context and type fields of
Manman Ren [Wed, 9 Oct 2013 19:47:05 +0000 (19:47 +0000)]
Debug Info: update testing cases when the context and type fields of
template_type and template_value are updated to use DIRef.

Paired commit with r192320.

llvm-svn: 192321

10 years agoDebug Info: In DIBuilder, the context and type fields of template_type and
Manman Ren [Wed, 9 Oct 2013 19:46:28 +0000 (19:46 +0000)]
Debug Info: In DIBuilder, the context and type fields of template_type and
template_value are updated to use DIRef.

A paired commit at clang is required due to changes to DIBuilder.

llvm-svn: 192320

10 years agoAdd exec support for Linux including common support for POSIX.
Matt Kopec [Wed, 9 Oct 2013 19:39:55 +0000 (19:39 +0000)]
Add exec support for Linux including common support for POSIX.

llvm-svn: 192319

10 years agoAdd error checking to 'cmd' buffer as it may not be available (ie. in the case of...
Matt Kopec [Wed, 9 Oct 2013 19:23:34 +0000 (19:23 +0000)]
Add error checking to 'cmd' buffer as it may not be available (ie. in the case of exec).

llvm-svn: 192318

10 years agoObjectiveC migrator. Introduce a new objcmt-atomic-property option
Fariborz Jahanian [Wed, 9 Oct 2013 19:06:08 +0000 (19:06 +0000)]
ObjectiveC migrator. Introduce a new objcmt-atomic-property option
and use it to infer all properties as 'atomic'.
// rdar://14988132

llvm-svn: 192317

10 years agollvm-c: Make target initializer functions external functions in lib.
Anders Waldenborg [Wed, 9 Oct 2013 19:02:09 +0000 (19:02 +0000)]
llvm-c: Make target initializer functions external functions in lib.

Making them proper functions defined in the (shared)lib instead of
static inlines defined in the header files makes it possible to
actually distribute a binary compiled against the shared library
without having to worry about getting undefined symbol errors when
calling e.g LLVMInitializeAllTargetInfos because the shared library on
the other system was compiled with different targets.

Differential Revision: http://llvm-reviews.chandlerc.com/D1714

llvm-svn: 192316

10 years agoFix warnings introduced in r192314.
DeLesley Hutchins [Wed, 9 Oct 2013 18:38:53 +0000 (18:38 +0000)]
Fix warnings introduced in r192314.

llvm-svn: 192315

10 years agoConsumed analysis: improve loop handling. The prior version of the analysis
DeLesley Hutchins [Wed, 9 Oct 2013 18:30:24 +0000 (18:30 +0000)]
Consumed analysis: improve loop handling.  The prior version of the analysis
marked all variables as "unknown" at the start of a loop.  The new version
keeps the initial state of variables unchanged, but issues a warning if the
state at the end of the loop is different from the state at the beginning.
This patch will eventually be replaced with a more precise analysis.

Initial patch by chris.wailes@gmail.com.  Reviewed and edited by
delesley@google.com.

llvm-svn: 192314

10 years agoRevert commit r192299 until find a way to account for simlinks in OS X.
Ariel J. Bernal [Wed, 9 Oct 2013 18:27:27 +0000 (18:27 +0000)]
Revert commit r192299 until find a way to account for simlinks in OS X.

llvm-svn: 192313

10 years agoInitialize vtorDisp in class constructors and destructors
Timur Iskhodzhanov [Wed, 9 Oct 2013 18:16:58 +0000 (18:16 +0000)]
Initialize vtorDisp in class constructors and destructors

Reviewed at http://llvm-reviews.chandlerc.com/D1867

llvm-svn: 192312

10 years agoDo not process .objtxt file twice.
Rui Ueyama [Wed, 9 Oct 2013 18:14:23 +0000 (18:14 +0000)]
Do not process .objtxt file twice.

A file with .objtxt extension is parsed in readFile(), but because we did not
propagate that information to the calling side, calling side would try to parse
it again. This patch will fix the issue by adding an extra parameter to
readFile().

llvm-svn: 192311

10 years ago[ELF] Change MaxAlignment to 2.
Shankar Easwaran [Wed, 9 Oct 2013 18:12:31 +0000 (18:12 +0000)]
[ELF] Change MaxAlignment to 2.

llvm-svn: 192310

10 years agoDebug Info: In DIBuilder, the context field of a forward decl is updated
Manman Ren [Wed, 9 Oct 2013 18:10:55 +0000 (18:10 +0000)]
Debug Info: In DIBuilder, the context field of a forward decl is updated
to use DIScopeRef.

llvm-svn: 192309

10 years agoTighten diagnostics for calling conventions on variadic functions
Hans Wennborg [Wed, 9 Oct 2013 18:10:25 +0000 (18:10 +0000)]
Tighten diagnostics for calling conventions on variadic functions

Follow-up from r192240.

This makes it an error to use callee-cleanup conventions on variadic
functions, except for __fastcall and __stdcall, which we ignore with
a warning for GCC and MSVC compatibility.

Differential Revision: http://llvm-reviews.chandlerc.com/D1870

llvm-svn: 192308

10 years agoAdd missing space between words in comment
Ed Maste [Wed, 9 Oct 2013 18:03:24 +0000 (18:03 +0000)]
Add missing space between words in comment

llvm-svn: 192307

10 years agoRe-enable test_convenience_registers_16bit_with_process_attach test for Linux.
Michael Sartain [Wed, 9 Oct 2013 17:44:52 +0000 (17:44 +0000)]
Re-enable test_convenience_registers_16bit_with_process_attach test for Linux.
Remove 32-bit POSIX register hack in ConvertBetweenRegisterKinds.

llvm-svn: 192306

10 years agoObjectiveC migrator. Introduce a new print policy for
Fariborz Jahanian [Wed, 9 Oct 2013 17:37:28 +0000 (17:37 +0000)]
ObjectiveC migrator. Introduce a new print policy for
suppression of strong lifetime qualifiers when
inferring property. // rdar://15082812

llvm-svn: 192305

10 years agoAdd missing releases.
Bill Wendling [Wed, 9 Oct 2013 17:37:04 +0000 (17:37 +0000)]
Add missing releases.

llvm-svn: 192304

10 years agoFlip the ownership of MCStreamer and MCTargetStreamer.
Benjamin Kramer [Wed, 9 Oct 2013 17:23:41 +0000 (17:23 +0000)]
Flip the ownership of MCStreamer and MCTargetStreamer.

MCStreamer now owns the target streamer. This prevents leaking the target
streamer.

llvm-svn: 192303

10 years agoFix a bug in Dead Argument Elimination.
Shuxin Yang [Wed, 9 Oct 2013 17:21:44 +0000 (17:21 +0000)]
Fix a bug in Dead Argument Elimination.

  If a function seen at compile time is not necessarily the one linked to
the binary being built, it is illegal to change the actual arguments
passing to it.

  e.g.
   --------------------------
   void foo(int lol) {
     // foo() has linkage satisifying isWeakForLinker()
     // "lol" is not used at all.
   }

   void bar(int lo2) {
      // xform to foo(undef) is illegal, as compiler dose not know which
      // instance of foo() will be linked to the the binary being built.
      foo(lol2);
   }
  -----------------------------

  Such functions can be captured by isWeakForLinker(). NOTE that
mayBeOverridden() is insufficient for this purpose as it dosen't include
linkage types like AvailableExternallyLinkage and LinkOnceODRLinkage.
Take link_odr* as an example, it indicates a set of *EQUIVALENT* globals
that can be merged at link-time. However, the semantic of
*EQUIVALENT*-functions includes parameters. Changing parameters breaks
the assumption.

  Thank John McCall for help, especially for the explanation of subtle
difference between linkage types.

  rdar://11546243

llvm-svn: 192302

10 years agoAllow Process::WaitForProcessToStop to return immediately if process is already in...
Daniel Malea [Wed, 9 Oct 2013 16:56:28 +0000 (16:56 +0000)]
Allow Process::WaitForProcessToStop to return immediately if process is already in the stopped state
- By default, the above function will wait for at least one event
- Set wait_always=false to make the function return immediately if the process is already stopped

llvm-svn: 192301

10 years agoUse aliases for more constructors and destructors.
Rafael Espindola [Wed, 9 Oct 2013 16:13:15 +0000 (16:13 +0000)]
Use aliases for more constructors and destructors.

With this patch we produce alias for cases like

template<typename T>
struct foobar {
  foobar() {
  }
};
template struct foobar<void>;

It is safe to use aliases to weak symbols, as long and the alias itself is also
weak.

llvm-svn: 192300

10 years agoThis patch fixes replacements that are not applied when relative paths are
Ariel J. Bernal [Wed, 9 Oct 2013 16:09:23 +0000 (16:09 +0000)]
This patch fixes replacements that are not applied when relative paths are
specified.

In particular it makes sure that relative paths for non-virtual files aren't
made absolute.
Added unittest test.

llvm-svn: 192299

10 years agoAdd a GlobalAlias::isValidLinkage to reduce code duplication.
Rafael Espindola [Wed, 9 Oct 2013 16:07:32 +0000 (16:07 +0000)]
Add a GlobalAlias::isValidLinkage to reduce code duplication.

Thanks to Reid Kleckner for the suggestion.

llvm-svn: 192298

10 years agoclang-format: Fix template declaration line breaking with comment.
Daniel Jasper [Wed, 9 Oct 2013 15:06:17 +0000 (15:06 +0000)]
clang-format: Fix template declaration line breaking with comment.

Before, clang-format would always insert a linebreak before the comment
in code like:
  template <typename T> // T can be A, B or C.
  struct S {};

llvm-svn: 192297

10 years agoFix filenames in header comment blocks
Ed Maste [Wed, 9 Oct 2013 14:18:45 +0000 (14:18 +0000)]
Fix filenames in header comment blocks

llvm-svn: 192296

10 years ago[sanitizer] Fix the parent liveness check in StopTheWorld.
Sergey Matveev [Wed, 9 Oct 2013 13:36:20 +0000 (13:36 +0000)]
[sanitizer] Fix the parent liveness check in StopTheWorld.

Comparing the parent PID with 1 isn't sufficient to ensure the parent is alive,
because of prctl(PR_SET_CHILD_SUBREAPER, ...). Compare with the real parent's
recorded PID instead.

llvm-svn: 192295

10 years ago[Sparc] Disable tail call optimization for sparc64.
Venkatraman Govindaraju [Wed, 9 Oct 2013 12:50:39 +0000 (12:50 +0000)]
[Sparc] Disable tail call optimization for sparc64.

This patch fixes PR17506.

llvm-svn: 192294

10 years ago[Mips] Group MIPS-related options checking function in one place.
Simon Atanasyan [Wed, 9 Oct 2013 12:12:39 +0000 (12:12 +0000)]
[Mips] Group MIPS-related options checking function in one place.

llvm-svn: 192293

10 years ago[Mips] Make the isMipsR2Arch() function simpler - remove checking for
Simon Atanasyan [Wed, 9 Oct 2013 12:12:34 +0000 (12:12 +0000)]
[Mips] Make the isMipsR2Arch() function simpler - remove checking for
MIPS-arch.

llvm-svn: 192292

10 years ago[Mips] Remove unused mips_CPUs_Group options group. It's better to join
Simon Atanasyan [Wed, 9 Oct 2013 12:12:29 +0000 (12:12 +0000)]
[Mips] Remove unused mips_CPUs_Group options group. It's better to join
all MIPS-related options to the new m_mips_Features_Group later.

llvm-svn: 192291

10 years ago[Mips] Do not check for options from the OPT_mips_CPUs_Group. All these
Simon Atanasyan [Wed, 9 Oct 2013 12:12:24 +0000 (12:12 +0000)]
[Mips] Do not check for options from the OPT_mips_CPUs_Group. All these
options are aliases now.

llvm-svn: 192290

10 years ago[Mips] Make mips32/mips32r2/mips64/mips64r2 real aliases for appropriate
Simon Atanasyan [Wed, 9 Oct 2013 12:12:19 +0000 (12:12 +0000)]
[Mips] Make mips32/mips32r2/mips64/mips64r2 real aliases for appropriate
march options.

llvm-svn: 192289

10 years agoCode cleanup: rename VTableContext to ItaniumVTableContext, VTableBuilder to ItaniumV...
Timur Iskhodzhanov [Wed, 9 Oct 2013 11:33:51 +0000 (11:33 +0000)]
Code cleanup: rename VTableContext to ItaniumVTableContext, VTableBuilder to ItaniumVTableBuilder and clang-format code around

llvm-svn: 192288

10 years agoclang/test/Coverage/codegen-next.m: Exclude this for targeting x86_64-win32.
NAKAMURA Takumi [Wed, 9 Oct 2013 09:45:27 +0000 (09:45 +0000)]
clang/test/Coverage/codegen-next.m: Exclude this for targeting x86_64-win32.

llvm-svn: 192286

10 years agoReland 192220 "Abstract out parts of thunk emission code, add support for simple...
Timur Iskhodzhanov [Wed, 9 Oct 2013 09:23:58 +0000 (09:23 +0000)]
Reland 192220 "Abstract out parts of thunk emission code, add support for simple thunks when using -cxx-abi microsoft" with relaxed assertions

llvm-svn: 192285

10 years agoTest commit. Remove whitespace from otherwise empty lines.
Greg Bedwell [Wed, 9 Oct 2013 08:55:27 +0000 (08:55 +0000)]
Test commit.  Remove whitespace from otherwise empty lines.

llvm-svn: 192284

10 years agoAVX-512: Added VRCP28 and VRSQRT28 instructions and intrinsics.
Elena Demikhovsky [Wed, 9 Oct 2013 08:16:14 +0000 (08:16 +0000)]
AVX-512: Added VRCP28 and VRSQRT28 instructions and intrinsics.

llvm-svn: 192283

10 years agoAArch64: enable MISched by default.
Tim Northover [Wed, 9 Oct 2013 07:53:57 +0000 (07:53 +0000)]
AArch64: enable MISched by default.

Substantial SelectionDAG scheduling is going away soon, and is
interfering with Hao's attempts to implement LDn/STn instructions, so
I say we make the leap first.

There were a few reorderings (inevitably) which broke some tests. I
tried to replace them with CHECK-DAG variants mostly, but some too
complex for that to be useful and I just reordered them.

llvm-svn: 192282

10 years agoAArch64: migrate ADRP relaxation test to be llvm-mc only.
Tim Northover [Wed, 9 Oct 2013 07:53:49 +0000 (07:53 +0000)]
AArch64: migrate ADRP relaxation test to be llvm-mc only.

llvm-svn: 192281

10 years ago[Layout] Dont set ordinals to Files by default.
Shankar Easwaran [Wed, 9 Oct 2013 07:32:47 +0000 (07:32 +0000)]
[Layout] Dont set ordinals to Files by default.

This change removes code in various places which was setting the File Ordinals.
This is because the file ordinals are assigned by the way files are resolved.

There was no other way than making the getNextFileAndOrdinal be set const and
change the _nextOrdinal to mutable.

There are so many places in code, that you would need to cleanup to make
LinkingContext non-const!

llvm-svn: 192280

10 years agoMore x86 disassembler filtering cleanup.
Craig Topper [Wed, 9 Oct 2013 06:12:53 +0000 (06:12 +0000)]
More x86 disassembler filtering cleanup.

llvm-svn: 192279

10 years ago[cleanup] remove unused private variable
Shankar Easwaran [Wed, 9 Oct 2013 05:37:01 +0000 (05:37 +0000)]
[cleanup] remove unused private variable

llvm-svn: 192278

10 years ago[Layout] Assign ordinals in Resolution order.
Shankar Easwaran [Wed, 9 Oct 2013 05:23:23 +0000 (05:23 +0000)]
[Layout] Assign ordinals in Resolution order.

llvm-svn: 192277

10 years agoAdd missing HasAVX512 predicate.
Andrew Trick [Wed, 9 Oct 2013 05:11:10 +0000 (05:11 +0000)]
Add missing HasAVX512 predicate.

This was only working because AVX had cheaper rules in all cases.
I'm sure there are other places in this file where predicates are missing.

llvm-svn: 192276

10 years agoRemove some old filters from the x86 disassembler table builder.
Craig Topper [Wed, 9 Oct 2013 05:02:29 +0000 (05:02 +0000)]
Remove some old filters from the x86 disassembler table builder.

llvm-svn: 192275

10 years agoReplace a couple instructions with patterns referring to other instructions with...
Craig Topper [Wed, 9 Oct 2013 04:54:21 +0000 (04:54 +0000)]
Replace a couple instructions with patterns referring to other instructions with same encoding and operands. Mark a couple other instructions as CodeGenOnly since we have FR and VR instructions and only one of them is needed by the assembler/disassembler.

llvm-svn: 192274

10 years ago[test] Just use the exit code from the test for now.
Shankar Easwaran [Wed, 9 Oct 2013 04:30:17 +0000 (04:30 +0000)]
[test] Just use the exit code from the test for now.

Will fix this in later commits. Not sure why the regex is not passing.

llvm-svn: 192273

10 years agoUse AVX512PIi8 for the alt forms of vcmp instructions. This adds the TB prefix and...
Craig Topper [Wed, 9 Oct 2013 04:24:38 +0000 (04:24 +0000)]
Use AVX512PIi8 for the alt forms of vcmp instructions. This adds the TB prefix and keeps the mnemonic from starting with an extra 'v'

llvm-svn: 192272

10 years agoMark some instructions as CodeGenOnly since they aren't needed by the assembler or...
Craig Topper [Wed, 9 Oct 2013 03:56:16 +0000 (03:56 +0000)]
Mark some instructions as CodeGenOnly since they aren't needed by the assembler or disassembler. Disassembler already filtered them, but asm parser still had them in its tables.

llvm-svn: 192271

10 years ago[test] Fix regex for failing test on bot
Shankar Easwaran [Wed, 9 Oct 2013 03:53:32 +0000 (03:53 +0000)]
[test] Fix regex for failing test on bot

llvm-svn: 192270

10 years ago[inputGraph] Associate Resolve state with appropriate nodes
Shankar Easwaran [Wed, 9 Oct 2013 03:40:29 +0000 (03:40 +0000)]
[inputGraph] Associate Resolve state with appropriate nodes

This associates resolveState to FileNodes. The control node derive
their resolution state from the inputElements that are contained in
it.

This makes --start-group/--end-group to work with ELF linking.

llvm-svn: 192269

10 years agoHandle the case where completing variables in a frame
Jason Molenda [Wed, 9 Oct 2013 02:39:26 +0000 (02:39 +0000)]
Handle the case where completing variables in a frame
with no source-level debug information correctly.
<rdar://problem/15182936>

llvm-svn: 192268

10 years agoFixed a bug where variables' byte sizes would not
Sean Callanan [Wed, 9 Oct 2013 02:32:37 +0000 (02:32 +0000)]
Fixed a bug where variables' byte sizes would not
respect their Clang types if the variables' values
were represented by DWARF constu values.

<rdar://problem/14636499>

llvm-svn: 192267

10 years agoAdd in64BitMode/in32BitMode to the MMX/SSE2/AVX maskmovq/dq instructions. This way...
Craig Topper [Wed, 9 Oct 2013 02:18:34 +0000 (02:18 +0000)]
Add in64BitMode/in32BitMode to the MMX/SSE2/AVX maskmovq/dq instructions. This way the asm parser will pick the right one based on the mode. Instruction selection already did the right thing based on the pointer size.

llvm-svn: 192266

10 years agoAdd a paragraph about MCTargetStreamer.
Rafael Espindola [Wed, 9 Oct 2013 02:05:08 +0000 (02:05 +0000)]
Add a paragraph about MCTargetStreamer.

llvm-svn: 192265

10 years agoFixed a bug in the Materializer where we sent the
Sean Callanan [Wed, 9 Oct 2013 02:04:57 +0000 (02:04 +0000)]
Fixed a bug in the Materializer where we sent the
wrong information to ValueObjectConstResult.

<rdar://problem/15101795>

llvm-svn: 192264

10 years agoClean up RegisterContextPOSIX i386 code.
Michael Sartain [Wed, 9 Oct 2013 01:28:57 +0000 (01:28 +0000)]
Clean up RegisterContextPOSIX i386 code.
Use 32-bit register enums without gaps on 64-bit hosts.
Don't show 64-bit registers when debugging 32-bit targets.
Add psuedo gpr registers (ax, ah, al, etc.)
Add mmx registers.
Fix TestRegisters.py to not read ymm15 register on 32-bit targets.
Fill out and move gcc/dwarf/gdb register enums to RegisterContext_x86.h

llvm-svn: 192263

10 years agollvm/test/LTO should run also on cygwin.
NAKAMURA Takumi [Wed, 9 Oct 2013 01:07:31 +0000 (01:07 +0000)]
llvm/test/LTO should run also on cygwin.

llvm-svn: 192262

10 years agoUpdate error classes from all lowercase to camel case.
Rui Ueyama [Wed, 9 Oct 2013 00:57:22 +0000 (00:57 +0000)]
Update error classes from all lowercase to camel case.

llvm-svn: 192261

10 years agoMove a local variable into while-loop scope.
Rui Ueyama [Wed, 9 Oct 2013 00:42:57 +0000 (00:42 +0000)]
Move a local variable into while-loop scope.

llvm-svn: 192260

10 years ago<rdar://problem/14923930>
Enrico Granata [Wed, 9 Oct 2013 00:33:55 +0000 (00:33 +0000)]
<rdar://problem/14923930>

Constant ValueObjects should clear their description as well as their summary. Rationale being that both can depend on deeper-than-constified data
so both are subject to changes in "unpredictable" ways
To see this consider repeatedly po'ing a persistent variable of a type whose -description result changes at each invocation

llvm-svn: 192259

10 years agoMake wording for certain invalid unary expressions more consistent.
David Majnemer [Wed, 9 Oct 2013 00:22:23 +0000 (00:22 +0000)]
Make wording for certain invalid unary expressions more consistent.

An invalid decltype expression like 'decltype int' gives:
error: expected '(' after 'decltype'

This makes it so 'sizeof int' gives a similar one:
error: expected parentheses around type name in sizeof expression

llvm-svn: 192258

10 years agoDebug Info: update testing cases when the context field of
Manman Ren [Wed, 9 Oct 2013 00:17:23 +0000 (00:17 +0000)]
Debug Info: update testing cases when the context field of
DICompositeType is updated to use DIScopeRef.

Paired commit with r192256.

llvm-svn: 192257

10 years agoDebug Info: In DIBuilder, the context field of a DICompositeType is updated
Manman Ren [Wed, 9 Oct 2013 00:17:04 +0000 (00:17 +0000)]
Debug Info: In DIBuilder, the context field of a DICompositeType is updated
to use DIScopeRef.

A paired commit at clang is required due to changes to DIBuilder.

llvm-svn: 192256

10 years ago<rdar://problem/15180638>
Enrico Granata [Wed, 9 Oct 2013 00:13:17 +0000 (00:13 +0000)]
<rdar://problem/15180638>

Making GetNumberOfDirectBaseClasses() work for ObjC pointers, and for classes for which we don't have full debug info

llvm-svn: 192255

10 years agoDebug Info: In DIBuilder, the context fields of a static member and a
Manman Ren [Tue, 8 Oct 2013 23:49:38 +0000 (23:49 +0000)]
Debug Info: In DIBuilder, the context fields of a static member and a
typedef are updated to use DIScopeRef.

llvm-svn: 192254

10 years agoclang-modernize: Clean up help output
Edwin Vane [Tue, 8 Oct 2013 23:31:05 +0000 (23:31 +0000)]
clang-modernize: Clean up help output

Now hiding options clang-modernize doesn't use and didn't create. Version
printer specialized for clang-modernize. EXAMPLES text fixed and brought
up-to-date.

Differential Revision: http://llvm-reviews.chandlerc.com/D1849

llvm-svn: 192253

10 years agoDebug Info: update testing cases when the derived-from field of
Manman Ren [Tue, 8 Oct 2013 23:29:36 +0000 (23:29 +0000)]
Debug Info: update testing cases when the derived-from field of
DICompositeType is updated to use DITypeRef.

Paired commit with r192251.

llvm-svn: 192252

10 years agoDebug Info: In DIBuilder, the derived-from field of DICompositeType
Manman Ren [Tue, 8 Oct 2013 23:28:51 +0000 (23:28 +0000)]
Debug Info: In DIBuilder, the derived-from field of DICompositeType
is updated to use DITypeRef.

A paired commit at clang is required due to changes to DIBuilder.

llvm-svn: 192251

10 years agoFix flaky elf/X86_64/dynlib-search.test.
Rui Ueyama [Tue, 8 Oct 2013 23:01:52 +0000 (23:01 +0000)]
Fix flaky elf/X86_64/dynlib-search.test.

Output to llvm::err() is not guaranteed to be thread-safe, so it needs
to be guarded with a lock.

Differential Revision: http://llvm-reviews.chandlerc.com/D1862

llvm-svn: 192250

10 years agoUse size_t for array index.
Rui Ueyama [Tue, 8 Oct 2013 23:01:49 +0000 (23:01 +0000)]
Use size_t for array index.

llvm-svn: 192249

10 years ago[unwind] Fix unw_init_remote_thread() use to void* instead of thread_t for parameter...
Nick Kledzik [Tue, 8 Oct 2013 22:59:34 +0000 (22:59 +0000)]
[unwind] Fix unw_init_remote_thread() use to void* instead of thread_t for parameter to match other implementations

llvm-svn: 192248

10 years agoDebug Info: update testing cases when the derived-from field of
Manman Ren [Tue, 8 Oct 2013 22:56:54 +0000 (22:56 +0000)]
Debug Info: update testing cases when the derived-from field of
DIDerivedType is updated to use DITypeRef.

Paired commit with r192246.

llvm-svn: 192247

10 years agoDebug Info: In DIBuilder, the derived-from field of DIDerivedType
Manman Ren [Tue, 8 Oct 2013 22:56:31 +0000 (22:56 +0000)]
Debug Info: In DIBuilder, the derived-from field of DIDerivedType
is updated to use DITypeRef.

A paired commit at clang is required due to changes to DIBuilder.

llvm-svn: 192246

10 years ago[unwind] add required #include
Nick Kledzik [Tue, 8 Oct 2013 22:51:34 +0000 (22:51 +0000)]
[unwind] add required #include

llvm-svn: 192245

10 years ago-Wmicrosoft: Don't warn on non-inline pure virtual method definitions
Reid Kleckner [Tue, 8 Oct 2013 22:45:29 +0000 (22:45 +0000)]
-Wmicrosoft: Don't warn on non-inline pure virtual method definitions

MSVC and clang with -fms-extensions allow pure virtual methods to be
defined inline after the "= 0" tokens.  Clang warns on these because it
is not standard, but incorrectly warns on out-of-line definitions, which
are standard.

With this change, clang will only warn on inline definitions of pure
virtual methods.

Fixes some self-host warnings on out-of-line definitions of pure virtual
destructors.

llvm-svn: 192244

10 years ago[AArch64] Add support for NEON scalar floating-point reciprocal estimate,
Chad Rosier [Tue, 8 Oct 2013 22:09:29 +0000 (22:09 +0000)]
[AArch64] Add support for NEON scalar floating-point reciprocal estimate,
reciprocal exponent, and reciprocal square root estimate instructions.

llvm-svn: 192243

10 years ago[AArch64] Add support for NEON scalar floating-point reciprocal estimate,
Chad Rosier [Tue, 8 Oct 2013 22:09:04 +0000 (22:09 +0000)]
[AArch64] Add support for NEON scalar floating-point reciprocal estimate,
reciprocal exponent, and reciprocal square root estimate instructions.

llvm-svn: 192242

10 years agoFix conditionals on __Unwind_SjLj_* functions to only build for SJLJ based architectures
Nick Kledzik [Tue, 8 Oct 2013 21:57:22 +0000 (21:57 +0000)]
Fix conditionals on __Unwind_SjLj_* functions to only build for SJLJ based architectures

llvm-svn: 192241

10 years agoTurn error about fastcall variadic function into warning in MS mode (PR12535)
Hans Wennborg [Tue, 8 Oct 2013 21:52:56 +0000 (21:52 +0000)]
Turn error about fastcall variadic function into warning in MS mode (PR12535)

MSVC allows this and silently falls back to __cdecl for variadic functions.
This patch turns Clang's error into a warning in MS mode and adds a test
to make sure we generate correct code.

Differential Revision: http://llvm-reviews.chandlerc.com/D1861

llvm-svn: 192240

10 years ago<rdar://problem/14028923>
Enrico Granata [Tue, 8 Oct 2013 21:49:02 +0000 (21:49 +0000)]
<rdar://problem/14028923>

Implement SBTarget::CreateValueFromAddress() with a behavior equivalent to SBValue::CreateValueFromAddress()
(but without the need to grab an SBValue first just as a starting point to make up another SBValue out of whole cloth)

llvm-svn: 192239

10 years agoObjectiveC migrator: Add support for inferring
Fariborz Jahanian [Tue, 8 Oct 2013 21:32:16 +0000 (21:32 +0000)]
ObjectiveC migrator: Add support for inferring
properties of function pointer type.
// rdar://15082812

llvm-svn: 192237

10 years agoFix duplicated assertions.
Matt Arsenault [Tue, 8 Oct 2013 21:11:12 +0000 (21:11 +0000)]
Fix duplicated assertions.

Do what some other instructions do, and add an assert method.

llvm-svn: 192236

10 years agoTweak documentation for formats in categories
Enrico Granata [Tue, 8 Oct 2013 21:07:22 +0000 (21:07 +0000)]
Tweak documentation for formats in categories

llvm-svn: 192235

10 years ago<rdar://problem/12632394>
Enrico Granata [Tue, 8 Oct 2013 20:59:02 +0000 (20:59 +0000)]
<rdar://problem/12632394>

Add a format for FourCharCode

This is now safe to do thanks to the "formats in categories" feature

llvm-svn: 192233

10 years ago[AArch64] Add support for NEON scalar signed/unsigned integer to floating-point
Chad Rosier [Tue, 8 Oct 2013 20:43:46 +0000 (20:43 +0000)]
[AArch64] Add support for NEON scalar signed/unsigned integer to floating-point
convert instructions.

llvm-svn: 192232

10 years ago[AArch64] Add support for NEON scalar signed/unsigned integer to floating-point
Chad Rosier [Tue, 8 Oct 2013 20:43:30 +0000 (20:43 +0000)]
[AArch64] Add support for NEON scalar signed/unsigned integer to floating-point
convert instructions.

llvm-svn: 192231

10 years agoFix #endif comment.
Rui Ueyama [Tue, 8 Oct 2013 20:24:25 +0000 (20:24 +0000)]
Fix #endif comment.

llvm-svn: 192230

10 years agoUse size_t instead of int64_t for the vector size.
Rui Ueyama [Tue, 8 Oct 2013 20:24:23 +0000 (20:24 +0000)]
Use size_t instead of int64_t for the vector size.

llvm-svn: 192229

10 years agoExplicitly request unsigned enum types when desired
Reid Kleckner [Tue, 8 Oct 2013 20:20:00 +0000 (20:20 +0000)]
Explicitly request unsigned enum types when desired

This fixes repeated -Wmicrosoft warnings when self-hosting clang on
Windows, and gets us real unsigned enum types with MSVC.

llvm-svn: 192228