platform/upstream/llvm.git
11 years agoInclude file cleanup. SymbolContext doesn’t need ClangASTType.h, Block.h did, and...
Jim Ingham [Thu, 5 Sep 2013 18:55:21 +0000 (18:55 +0000)]
Include file cleanup.  SymbolContext doesn’t need ClangASTType.h, Block.h did, and was getting it under the table from SymbolContext.h.

llvm-svn: 190083

11 years agoDebug Info: Update testing case.
Manman Ren [Thu, 5 Sep 2013 18:51:02 +0000 (18:51 +0000)]
Debug Info: Update testing case.

DIBuilder now uses an identifier to reference DIType in base type field of
ptr_to_member (in r190081).

llvm-svn: 190082

11 years agoDebug Info: Use identifier to reference DIType in base type field of
Manman Ren [Thu, 5 Sep 2013 18:48:31 +0000 (18:48 +0000)]
Debug Info: Use identifier to reference DIType in base type field of
ptr_to_member.

We introduce a new class DITypeRef that represents a reference to a DIType.
It wraps around a Value*, which can be either an identifier in MDString
or an actual MDNode. The class has a helper function "resolve" that
finds the actual MDNode for a given DITypeRef.

We specialize getFieldAs to return a field that is a reference to a
DIType. To correctly access the base type field of ptr_to_member,
getClassType now calls getFieldAs<DITypeRef> to return a DITypeRef.

Also add a typedef for DITypeIdentifierMap and a helper
generateDITypeIdentifierMap in DebugInfo.h. In DwarfDebug.cpp, we keep
a DITypeIdentifierMap and call generateDITypeIdentifierMap to actually
populate the map.

Verifier is updated accordingly.

llvm-svn: 190081

11 years agoR600: Add support for local memory atomic add
Tom Stellard [Thu, 5 Sep 2013 18:38:09 +0000 (18:38 +0000)]
R600: Add support for local memory atomic add

llvm-svn: 190080

11 years agoR600: Expand SELECT nodes rather than custom lowering them
Tom Stellard [Thu, 5 Sep 2013 18:38:03 +0000 (18:38 +0000)]
R600: Expand SELECT nodes rather than custom lowering them

llvm-svn: 190079

11 years agoR600: Fix incorrect LDS size calculation
Tom Stellard [Thu, 5 Sep 2013 18:37:57 +0000 (18:37 +0000)]
R600: Fix incorrect LDS size calculation

GlobalAdderss nodes that appeared in more than one basic block were
being counted twice.

llvm-svn: 190078

11 years agoR600/SI: Don't emit S_WQM_B64 instruction for compute shaders
Tom Stellard [Thu, 5 Sep 2013 18:37:52 +0000 (18:37 +0000)]
R600/SI: Don't emit S_WQM_B64 instruction for compute shaders

llvm-svn: 190077

11 years agoR600: Fix segfault in R600TextureIntrinsicReplacer
Tom Stellard [Thu, 5 Sep 2013 18:37:45 +0000 (18:37 +0000)]
R600: Fix segfault in R600TextureIntrinsicReplacer

This pass was segfaulting when it ran into a non-intrinsic function
call.  Function calls are not supported, so now instead of segfaulting,
we will get an assertion failure with a nice error message.

I'm not sure how to test this using lit.

llvm-svn: 190076

11 years agoUnbreak build with libc++, whose std::list<T> requires T to be complete.
Douglas Gregor [Thu, 5 Sep 2013 18:28:53 +0000 (18:28 +0000)]
Unbreak build with libc++, whose std::list<T> requires T to be complete.

llvm-svn: 190075

11 years agoMove accelerator table defines and constants to Dwarf.h since
Eric Christopher [Thu, 5 Sep 2013 18:20:16 +0000 (18:20 +0000)]
Move accelerator table defines and constants to Dwarf.h since
we're proposing it for DWARF5.

No functional change intended.

llvm-svn: 190074

11 years agoMark lambda closure classes as being implicitly-generated.
James Dennett [Thu, 5 Sep 2013 17:46:21 +0000 (17:46 +0000)]
Mark lambda closure classes as being implicitly-generated.

Summary: Closure classes for C++ lambdas are always compiler-generated.  This one-line change calls setImplicit(true) on them at creation time, such that a default RecursiveASTVisitor (or any for which shouldVisitImplicitCode returns false) will skip them.

Reviewers: rsmith, dblaikie

Reviewed By: dblaikie

CC: klimek, revane, cfe-commits, jordan_rose
Differential Revision: http://llvm-reviews.chandlerc.com/D1593

llvm-svn: 190073

11 years agoObjectiveC modern translator: fix up generated fast enumeration
Fariborz Jahanian [Thu, 5 Sep 2013 17:17:32 +0000 (17:17 +0000)]
ObjectiveC modern translator: fix up generated fast enumeration
code to work for bit 32bit and 64bit APIs.
// rdar://14913632

llvm-svn: 190072

11 years agoclang-cl: Use .obj as extension for unnamed object files (PR17095)
Hans Wennborg [Thu, 5 Sep 2013 17:05:56 +0000 (17:05 +0000)]
clang-cl: Use .obj as extension for unnamed object files (PR17095)

We already use .obj as extension when the user provides a stem file
name (via /Fo), but were failing in the most basic case when the file
name is based on the input file.

llvm-svn: 190071

11 years agoUse getwd(0) on FreeBSD as on OS X.
Ed Maste [Thu, 5 Sep 2013 17:05:37 +0000 (17:05 +0000)]
Use getwd(0) on FreeBSD as on OS X.

llvm-svn: 190070

11 years agoOptionValueProperties::DeepCopy (): return empty value to avoid compilation error...
Virgile Bello [Thu, 5 Sep 2013 16:57:48 +0000 (16:57 +0000)]
OptionValueProperties::DeepCopy (): return empty value to avoid compilation error on MSVC (even if assert).

llvm-svn: 190069

11 years agoAdded MSVC config file and makefile support.
Virgile Bello [Thu, 5 Sep 2013 16:56:12 +0000 (16:56 +0000)]
Added MSVC config file and makefile support.

llvm-svn: 190068

11 years agoRename enums to match convention and remove superfluous "dwarf" in names.
Eric Christopher [Thu, 5 Sep 2013 16:55:35 +0000 (16:55 +0000)]
Rename enums to match convention and remove superfluous "dwarf" in names.

llvm-svn: 190067

11 years agoAvoid ambiguity between pid_t and lldb::pid_t.
Virgile Bello [Thu, 5 Sep 2013 16:53:14 +0000 (16:53 +0000)]
Avoid ambiguity between pid_t and lldb::pid_t.

llvm-svn: 190066

11 years agoMinGW: avoid many warnings due to FAR/NEAR defines.
Virgile Bello [Thu, 5 Sep 2013 16:51:17 +0000 (16:51 +0000)]
MinGW: avoid many warnings due to FAR/NEAR defines.

llvm-svn: 190065

11 years agoReformat.
Eric Christopher [Thu, 5 Sep 2013 16:46:43 +0000 (16:46 +0000)]
Reformat.

llvm-svn: 190064

11 years agoAdd OptionParser.h
Virgile Bello [Thu, 5 Sep 2013 16:42:23 +0000 (16:42 +0000)]
Add OptionParser.h

llvm-svn: 190063

11 years agoUse <atomic> instead of "llvm/Support/Atomic.h". Removed unused RefCounter class.
Virgile Bello [Thu, 5 Sep 2013 16:38:02 +0000 (16:38 +0000)]
Use <atomic> instead of "llvm/Support/Atomic.h". Removed unused RefCounter class.

llvm-svn: 190062

11 years agoAdd ATTRIBUTE_UNUSED to silence unused-function warning in release
Daniel Jasper [Thu, 5 Sep 2013 16:05:56 +0000 (16:05 +0000)]
Add ATTRIBUTE_UNUSED to silence unused-function warning in release
builds.

llvm-svn: 190061

11 years ago[ARMv8] Add some missing tests for DSB/DMB.
Joey Gouly [Thu, 5 Sep 2013 16:05:45 +0000 (16:05 +0000)]
[ARMv8] Add some missing tests for DSB/DMB.

llvm-svn: 190060

11 years agoRemove unneeded semi-colons
Aaron Watry [Thu, 5 Sep 2013 16:04:07 +0000 (16:04 +0000)]
Remove unneeded semi-colons

Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 190059

11 years agoAdd atomic_inc and atomic_add builtins
Aaron Watry [Thu, 5 Sep 2013 16:04:01 +0000 (16:04 +0000)]
Add atomic_inc and atomic_add builtins

Reviewed-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 190058

11 years agosysctl.h does not exist under GNU/HURD (like windows)
Sylvestre Ledru [Thu, 5 Sep 2013 15:39:09 +0000 (15:39 +0000)]
sysctl.h does not exist under GNU/HURD (like windows)

llvm-svn: 190057

11 years agoGNU HURD can be considered (for now?) like a GNU/Linux
Sylvestre Ledru [Thu, 5 Sep 2013 15:37:36 +0000 (15:37 +0000)]
GNU HURD can be considered (for now?) like a GNU/Linux

llvm-svn: 190056

11 years ago[ARMv8] Implement the new DMB/DSB operands.
Joey Gouly [Thu, 5 Sep 2013 15:35:24 +0000 (15:35 +0000)]
[ARMv8] Implement the new DMB/DSB operands.

This removes the custom ISD Node: MEMBARRIER and replaces it
with an intrinsic.

llvm-svn: 190055

11 years agoFixes PR 17106 (explicitly typed enums are formatted differently).
Manuel Klimek [Thu, 5 Sep 2013 15:34:55 +0000 (15:34 +0000)]
Fixes PR 17106 (explicitly typed enums are formatted differently).

Before:
 enum X : int { A, B, C };

After:
 enum X : int {
   A,
   B,
   C
 };

llvm-svn: 190054

11 years agoAdd AArch32 DCPS{1,2,3} and HLT instructions.
Richard Barton [Thu, 5 Sep 2013 14:14:19 +0000 (14:14 +0000)]
Add AArch32 DCPS{1,2,3} and HLT instructions.

These were pretty straightforward instructions, with some assembly support
required for HLT.

The ARM assembler is keen to split the instruction mnemonic into a
(non-existent) 'H' instruction with the LT condition code. An exception for
HLT is needed.

HLT follows the same rules as BKPT when in IT blocks, so the special BKPT
hadling code has been adapted to handle HLT also.

Regression tests added including diagnostic tests for out of range immediates
and illegal condition codes, as well as negative tests for pre-ARMv8.

llvm-svn: 190053

11 years agoHandle zero-width and double-width characters in string literals and comments.
Alexander Kornienko [Thu, 5 Sep 2013 14:08:34 +0000 (14:08 +0000)]
Handle zero-width and double-width characters in string literals and comments.

Summary:
Count column width instead of the number of code points. This also
includes correct handling of tabs inside string literals and comments (with an
exception of multiline string literals/comments, where tabs are present before
the first escaped newline).

Reviewers: djasper, klimek

Reviewed By: klimek

CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D1601

llvm-svn: 190052

11 years agoFix the profile of the function (fix commit 190048)
Sylvestre Ledru [Thu, 5 Sep 2013 13:58:07 +0000 (13:58 +0000)]
Fix the profile of the function (fix commit 190048)

llvm-svn: 190051

11 years agoFix writing of reformatted files.
Manuel Klimek [Thu, 5 Sep 2013 13:55:39 +0000 (13:55 +0000)]
Fix writing of reformatted files.

If transformations lead to changes that do not need reformatting, the
current strategy will not write those files. With this patch, we just
update the overall state with the changes due to reformatting, and then
write out everything.

llvm-svn: 190050

11 years agoRemoved empty directories left after r189960.
Alexander Kornienko [Thu, 5 Sep 2013 13:47:10 +0000 (13:47 +0000)]
Removed empty directories left after r189960.

llvm-svn: 190049

11 years agoFix bug #17104 - Target info for GNU/kFreeBSD were missing.
Sylvestre Ledru [Thu, 5 Sep 2013 13:47:07 +0000 (13:47 +0000)]
Fix bug #17104 - Target info for GNU/kFreeBSD were missing.
As a result, Clang doesn't define the pre-processor macros that are expected
on this platform.

Thanks to Robert Millan for the patch

llvm-svn: 190048

11 years agoReverting 190043 for now.
Tilmann Scheller [Thu, 5 Sep 2013 11:59:43 +0000 (11:59 +0000)]
Reverting 190043 for now.

Solution is not sufficient to prevent 'mov pc, lr' being emitted for jump table code.
Test case doesn't trigger the added functionality.

llvm-svn: 190047

11 years agoclang-format: Quickfix for braced init lists detected as lambdas.
Daniel Jasper [Thu, 5 Sep 2013 11:49:39 +0000 (11:49 +0000)]
clang-format: Quickfix for braced init lists detected as lambdas.

Before:
  constexpr char hello [] { "hello" };

After:
  constexpr char hello[]{ "hello" };

llvm-svn: 190046

11 years ago[tsan] add colors to tsan output
Kostya Serebryany [Thu, 5 Sep 2013 11:23:27 +0000 (11:23 +0000)]
[tsan] add colors to tsan output

llvm-svn: 190045

11 years agoAdd new methods for TargetInfo:
Stepan Dyatkovskiy [Thu, 5 Sep 2013 11:23:21 +0000 (11:23 +0000)]
Add new methods for TargetInfo:
     getRealTypeByWidth and getIntTypeByWidth
  for ASTContext names are almost same(invokes new methods from TargetInfo):
     getIntTypeForBitwidth and getRealTypeForBitwidth.

As first commit for PR16752 fix: 'mode' attribute for unusual targets doesn't work properly
Description:
Troubles could be happened due to some assumptions in handleModeAttr function (see SemaDeclAttr.cpp).
For example, it assumes that 32 bit integer is 'int', while it could be 16 bit only.
Instead of asking target: 'which type do you want to use for int32_t ?' it just hardcodes general opinion. That doesn't looks pretty correct.
Please consider the next solution:
1. In Basic/TargetInfo add getIntTypeByWidth and getRealTypeByWidth virtual methods. By default current behaviour could be implemented here.
2. Fix handleModeAttr according to new methods in TargetInfo.
This approach is implemented in the patch attached to this post.

Fixes:
1st Commit (Current): Add new methods for TargetInfo:
     getRealTypeByWidth and getIntTypeByWidth
  for ASTContext names are almost same(invokes new methods from TargetInfo):
     getIntTypeForBitwidth and getRealTypeForBitwidth

2nd Commit (Next): Fix SemaDeclAttr, handleModeAttr function.

llvm-svn: 190044

11 years agoARM: Add GPR register class excluding LR for use with the ADR instruction.
Tilmann Scheller [Thu, 5 Sep 2013 11:10:31 +0000 (11:10 +0000)]
ARM: Add GPR register class excluding LR for use with the ADR instruction.

This improves code generation for jump tables by avoiding the emission of "mov pc, lr" which could fool the processor into believing this is a return from a function causing mispredicts. The code generation logic for jump tables uses ADR to materialize the address of the jump target.

Patch by Daniel Stewart!

llvm-svn: 190043

11 years agoAddress post-commit review comments from r190038.
Daniel Jasper [Thu, 5 Sep 2013 10:48:50 +0000 (10:48 +0000)]
Address post-commit review comments from r190038.

Mostly additional comments :-).

llvm-svn: 190042

11 years ago[SystemZ] Add NC, OC and XC
Richard Sandiford [Thu, 5 Sep 2013 10:36:45 +0000 (10:36 +0000)]
[SystemZ] Add NC, OC and XC

For now these are just used to handle scalar ANDs, ORs and XORs in which
all operands are memory.

llvm-svn: 190041

11 years agoSupport suppressing unused arguments warnings as a core option so that
Chandler Carruth [Thu, 5 Sep 2013 10:09:03 +0000 (10:09 +0000)]
Support suppressing unused arguments warnings as a core option so that
it works in the CL flavor driver.

llvm-svn: 190040

11 years agoclang-format: Fix parsing and indenting lambdas.
Daniel Jasper [Thu, 5 Sep 2013 10:04:31 +0000 (10:04 +0000)]
clang-format: Fix parsing and indenting lambdas.

Before:
  void f() {
    other(x.begin(), x.end(), //
                         [&](int, int) { return 1; });
  }

After:
  void f() {
    other(x.begin(), x.end(), //
          [&](int, int) { return 1; });
  }

llvm-svn: 190039

11 years agoclang-format: Enable formatting of nested blocks.
Daniel Jasper [Thu, 5 Sep 2013 09:29:45 +0000 (09:29 +0000)]
clang-format: Enable formatting of nested blocks.

Among other things, this enables (better) formatting lambdas and
constructs like:
  MACRO({
          long_statement();
          long_statement_2();
        },
        {
          long_statement();
          long_statement_2();
        },
        { short_statement(); }, "");

This fixes llvm.org/PR15381.

llvm-svn: 190038

11 years ago[analyzer] Restructure a test file
Pavel Labath [Thu, 5 Sep 2013 09:18:36 +0000 (09:18 +0000)]
[analyzer] Restructure a test file

Summary:
I've had a test failure here while experimenting and I've found that it's
impossible to find what is wrong with the previous structure of the file. So I
have grouped the expected output with the function that produces it, to make
searching for discrepancies more obvious.

Reviewers: jordan_rose

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1595

llvm-svn: 190037

11 years agoMake error text if clang-format is not on the system PATH more helpful,
Manuel Klimek [Thu, 5 Sep 2013 08:31:48 +0000 (08:31 +0000)]
Make error text if clang-format is not on the system PATH more helpful,
as this is going to be a common mistake (installing LLVM defaults to not putting
the tools onto the PATH).

llvm-svn: 190036

11 years agoDeclare missing dependency on AliasAnalysis. Patch by Liu Xin!
Nick Lewycky [Thu, 5 Sep 2013 08:19:58 +0000 (08:19 +0000)]
Declare missing dependency on AliasAnalysis. Patch by Liu Xin!

llvm-svn: 190035

11 years agoFix typos in assert message.
Nick Lewycky [Thu, 5 Sep 2013 06:53:59 +0000 (06:53 +0000)]
Fix typos in assert message.

llvm-svn: 190034

11 years ago[Sparc] Correctly handle call to functions with ReturnsTwice attribute.
Venkatraman Govindaraju [Thu, 5 Sep 2013 05:32:16 +0000 (05:32 +0000)]
[Sparc] Correctly handle call to functions with ReturnsTwice attribute.

In sparc, setjmp stores only the registers %fp, %sp, %i7 and %o7. longjmp restores
the stack, and the callee-saved registers (all local/in registers: %i0-%i7, %l0-%l7)
using the stored %fp and register windows. However, this does not guarantee that the longjmp
will restore the registers, as they were when the setjmp was called. This is because these
registers may be clobbered after returning from setjmp, but before calling longjmp.

This patch prevents the registers %i0-%i5, %l0-l7 to live across the setjmp call using the register mask.

llvm-svn: 190033

11 years agoN3545: Quoted strings
Marshall Clow [Thu, 5 Sep 2013 04:48:45 +0000 (04:48 +0000)]
N3545: Quoted strings

llvm-svn: 190032

11 years ago[lld][cleanup] remove unused ReaderFunc to avoid confusion.
Shankar Easwaran [Thu, 5 Sep 2013 04:27:17 +0000 (04:27 +0000)]
[lld][cleanup] remove unused ReaderFunc to avoid confusion.

llvm-svn: 190031

11 years agosanitizers: Make sure Visual Studio gets error reports
Reid Kleckner [Thu, 5 Sep 2013 03:19:57 +0000 (03:19 +0000)]
sanitizers: Make sure Visual Studio gets error reports

Visual Studio appears to close stderr before launching a non-console
win32 program.  This means we don't see any sanitizer reports.  If
stderr printing fails, call OutputDebugStringA to get the reports into
the Visual Studio debugger console.

llvm-svn: 190030

11 years agoFor "expected unqualified-id" errors after a double colon, and the double colon
Richard Trieu [Thu, 5 Sep 2013 02:31:33 +0000 (02:31 +0000)]
For "expected unqualified-id" errors after a double colon, and the double colon
is at the end of the line, point to the location after the double colon instead
of at the next token.  There is more context to be given this way.  In addition,
the next token can be several lines later.

llvm-svn: 190029

11 years agomsbuild: Add clang's compiler-rt libs to the LibraryPath
Reid Kleckner [Thu, 5 Sep 2013 02:09:34 +0000 (02:09 +0000)]
msbuild: Add clang's compiler-rt libs to the LibraryPath

This allows linking libraries like the asan RTL.

llvm-svn: 190028

11 years agoRemove a spurious comment.
Jim Ingham [Thu, 5 Sep 2013 01:52:29 +0000 (01:52 +0000)]
Remove a spurious comment.

llvm-svn: 190027

11 years agoRemove an unused ivar.
Jim Ingham [Thu, 5 Sep 2013 01:51:57 +0000 (01:51 +0000)]
Remove an unused ivar.

llvm-svn: 190026

11 years agoRemove some unused #includes.
Jim Ingham [Thu, 5 Sep 2013 01:51:15 +0000 (01:51 +0000)]
Remove some unused #includes.

llvm-svn: 190025

11 years ago[lld][ELF] Change the order of the writable note section
Shankar Easwaran [Thu, 5 Sep 2013 01:50:21 +0000 (01:50 +0000)]
[lld][ELF] Change the order of the writable note section

Writable note sections if they exist should not appear before text
they belong in the data segment

llvm-svn: 190024

11 years agoRemove spurious reference to radars in code (we try not to put Radar numbers into...
Jim Ingham [Thu, 5 Sep 2013 01:48:56 +0000 (01:48 +0000)]
Remove spurious reference to radars in code (we try not to put Radar numbers into the sources.)

llvm-svn: 190023

11 years agoasan: Add a wcslen interceptor mirroring strlen
Reid Kleckner [Thu, 5 Sep 2013 01:13:49 +0000 (01:13 +0000)]
asan: Add a wcslen interceptor mirroring strlen

Tested on Linux, since I can't build the tests on Windows yet.

llvm-svn: 190022

11 years agoFix comments to reflect reality.
Bill Wendling [Thu, 5 Sep 2013 00:54:52 +0000 (00:54 +0000)]
Fix comments to reflect reality.

llvm-svn: 190021

11 years agoFormatting.
Eric Christopher [Thu, 5 Sep 2013 00:22:35 +0000 (00:22 +0000)]
Formatting.

llvm-svn: 190019

11 years agoAdd specific warning flags for GNU ext in lexer.
Eli Friedman [Thu, 5 Sep 2013 00:02:30 +0000 (00:02 +0000)]
Add specific warning flags for GNU ext in lexer.

This patch adds the following flags covering existing warnings:

-Wgnu-zero-variadic-macro-arguments
-Wgnu-imaginary-constant
-Wgnu-binary-literal
-Wgnu-zero-line-directive

Patch by Peter Lewis.

llvm-svn: 190017

11 years agoNote when a decl is used in AST files.
Eli Friedman [Thu, 5 Sep 2013 00:02:25 +0000 (00:02 +0000)]
Note when a decl is used in AST files.

When an AST file is built based on another AST file, it can use a decl from
the fist file, and therefore mark the "isUsed" bit.  We need to note this in
the AST file so that the bit is set correctly when the second AST file is
loaded.

This patch introduces the distinction between setIsUsed() and markUsed() so
that we don't call into the ASTMutationListener callback when it wouldn't
be appropriate.

Fixes PR16635.

llvm-svn: 190016

11 years agoClean up some whitespace and comment formatting.
Eric Christopher [Thu, 5 Sep 2013 00:01:17 +0000 (00:01 +0000)]
Clean up some whitespace and comment formatting.

llvm-svn: 190015

11 years agomi-sched: Force bottom up scheduling for generic targets.
Andrew Trick [Wed, 4 Sep 2013 23:54:00 +0000 (23:54 +0000)]
mi-sched: Force bottom up scheduling for generic targets.

Fast register pressure tracking currently only takes effect during
bottom up scheduling. Forcing this is a bit faster and simpler for
targets that don't have many scheduling constraints and don't need
top-down scheduling.

llvm-svn: 190014

11 years agoAdd names for mach-o permissions bits and use the symbol names in place of magic...
Nick Kledzik [Wed, 4 Sep 2013 23:53:44 +0000 (23:53 +0000)]
Add names for mach-o permissions bits and use the symbol names in place of magic numbers

llvm-svn: 190013

11 years agoMark issues 2103, 2005, 2196 and 2203 as complete. No code changes.
Marshall Clow [Wed, 4 Sep 2013 23:48:25 +0000 (23:48 +0000)]
Mark issues 2103, 2005, 2196 and 2203 as complete. No code changes.

llvm-svn: 190012

11 years agoMove default dwarf version enum into the llvm dwarf constants rather
Eric Christopher [Wed, 4 Sep 2013 23:38:29 +0000 (23:38 +0000)]
Move default dwarf version enum into the llvm dwarf constants rather
than the spec dwarf constants.

llvm-svn: 190011

11 years agoPR17103: Scoped enumerations with signed integer types have signed integer
Richard Smith [Wed, 4 Sep 2013 23:34:21 +0000 (23:34 +0000)]
PR17103: Scoped enumerations with signed integer types have signed integer
representation. Don't emit comparisons on them as 'icmp ult'!

llvm-svn: 190010

11 years agofix typo in enum name
Nick Kledzik [Wed, 4 Sep 2013 23:27:21 +0000 (23:27 +0000)]
fix typo in enum name

llvm-svn: 190009

11 years agoReport all methods in an Objective-C class that
Sean Callanan [Wed, 4 Sep 2013 23:25:26 +0000 (23:25 +0000)]
Report all methods in an Objective-C class that
have a certain name, not just the first.  This
is useful if a class method and an instance
method have the same name.

<rdar://problem/14872081>

llvm-svn: 190008

11 years agoFixed detection of 'p' packet support in debugserver,
Sean Callanan [Wed, 4 Sep 2013 23:24:15 +0000 (23:24 +0000)]
Fixed detection of 'p' packet support in debugserver,
by appending the thread ID to the test packet when
debugserver requires it.

This allows register writing (and, by extension,
expressions) to work on Mac OS X.

llvm-svn: 190007

11 years agoTweak implementation of -Wwrite-strings to better match the behavior of current GCCs:
Richard Smith [Wed, 4 Sep 2013 22:50:31 +0000 (22:50 +0000)]
Tweak implementation of -Wwrite-strings to better match the behavior of current GCCs:

 * In C, as before, if the "warning flag" is enabled, warnings are produced by
   forcing string literals to have const-qualified types (the produced warnings
   are *not* -Wwrite-strings warnings). However, more recent GCCs (at least 4.4
   onwards) now take -w into account here, so we now do the same.

 * In C++, this flag is entirely sane: it behaves just like any other warning
   flag. Stop triggering -fconst-strings here. This is a bit cleaner, but there's
   no real functionality change except in the case where -Xclang -fno-const-strings
   is also specified.

llvm-svn: 190006

11 years agoObjectiveC migrator: start introducing NS_XXX annotations
Fariborz Jahanian [Wed, 4 Sep 2013 22:49:19 +0000 (22:49 +0000)]
ObjectiveC migrator: start introducing NS_XXX annotations
to Method/functions returning ObjC objects. wip.

llvm-svn: 190005

11 years agoAdd missing header line.
Bill Wendling [Wed, 4 Sep 2013 22:35:41 +0000 (22:35 +0000)]
Add missing header line.

llvm-svn: 190004

11 years agoUse ArrayRef instead of explicit container.
Bill Wendling [Wed, 4 Sep 2013 22:35:29 +0000 (22:35 +0000)]
Use ArrayRef instead of explicit container.

llvm-svn: 190003

11 years agoRemove hack ensuring that darwin didn't produce dwarf > 3 for modules
Eric Christopher [Wed, 4 Sep 2013 22:21:24 +0000 (22:21 +0000)]
Remove hack ensuring that darwin didn't produce dwarf > 3 for modules
without a limiting factor.

Update all testcases accordingly.

llvm-svn: 190002

11 years agoReapply r189013 (reverted in r189906) now that the underlying issue is fixed and...
David Blaikie [Wed, 4 Sep 2013 22:03:57 +0000 (22:03 +0000)]
Reapply r189013 (reverted in r189906) now that the underlying issue is fixed and tested (in r189996)

Debug info emission was tripping over an IRGen bug (fixed in r189996)
that was resulting in duplicate emission of static data members of class
templates in namespaces.

We could add more test coverage to debug info for this issue
specifically, but I think the underlying IRGen test is more targeted and
sufficient for the issue.

llvm-svn: 190001

11 years agoRevert "Revert r189902 as the workaround shouldn't be necessary anymore."
Eric Christopher [Wed, 4 Sep 2013 21:36:52 +0000 (21:36 +0000)]
Revert "Revert r189902 as the workaround shouldn't be necessary anymore."

Needs testcase updates.

llvm-svn: 190000

11 years agoRevert r189902 as the workaround shouldn't be necessary anymore.
Eric Christopher [Wed, 4 Sep 2013 21:26:56 +0000 (21:26 +0000)]
Revert r189902 as the workaround shouldn't be necessary anymore.

llvm-svn: 189999

11 years agoExpand and rewrite comment.
Eric Christopher [Wed, 4 Sep 2013 21:23:23 +0000 (21:23 +0000)]
Expand and rewrite comment.

llvm-svn: 189998

11 years agocomment typo
Andrew Trick [Wed, 4 Sep 2013 21:12:05 +0000 (21:12 +0000)]
comment typo

llvm-svn: 189997

11 years agoDo not emit duplicate global initializers for template static data members inside...
David Blaikie [Wed, 4 Sep 2013 21:07:37 +0000 (21:07 +0000)]
Do not emit duplicate global initializers for template static data members inside namespaces

A quirk of AST representation leads to class template static data member
definitions being visited twice during Clang IRGen resulting in
duplicate (benign) initializers.

Discovered while investigating a possibly-related debug info bug tickled
by the duplicate emission of these members & their associated debug
info.

With thanks to Richard Smith for help investigating, understanding, and
helping with the fix.

llvm-svn: 189996

11 years agoRemove dead subtree limit code.
Andrew Trick [Wed, 4 Sep 2013 21:00:20 +0000 (21:00 +0000)]
Remove dead subtree limit code.

llvm-svn: 189995

11 years ago-view-misched-dags, better pruning.
Andrew Trick [Wed, 4 Sep 2013 21:00:18 +0000 (21:00 +0000)]
-view-misched-dags, better pruning.

llvm-svn: 189994

11 years agomi-sched: DEBUG cleanup, call tracePick for unidirectional scheduling.
Andrew Trick [Wed, 4 Sep 2013 21:00:16 +0000 (21:00 +0000)]
mi-sched: DEBUG cleanup, call tracePick for unidirectional scheduling.

llvm-svn: 189993

11 years ago80 columns
Andrew Trick [Wed, 4 Sep 2013 21:00:13 +0000 (21:00 +0000)]
80 columns

llvm-svn: 189992

11 years agomi-sched: Suppress register pressure tracking when the scheduling window is too small.
Andrew Trick [Wed, 4 Sep 2013 21:00:11 +0000 (21:00 +0000)]
mi-sched: Suppress register pressure tracking when the scheduling window is too small.

If the instruction window is < NumRegs/2, pressure tracking is not
likely to be effective. The scheduler has to process a very large
number of tiny blocks. We want this to be fast.

llvm-svn: 189991

11 years agomi-sched: Load clustering is a bit to expensive to enable unconditionally.
Andrew Trick [Wed, 4 Sep 2013 21:00:08 +0000 (21:00 +0000)]
mi-sched: Load clustering is a bit to expensive to enable unconditionally.

llvm-svn: 189990

11 years agomi-sched: Reuse an invalid HazardRecognizer to save compile time.
Andrew Trick [Wed, 4 Sep 2013 21:00:05 +0000 (21:00 +0000)]
mi-sched: Reuse an invalid HazardRecognizer to save compile time.

llvm-svn: 189989

11 years agomi-sched: bypass heuristic checks when regpressure tracking is disabled.
Andrew Trick [Wed, 4 Sep 2013 21:00:02 +0000 (21:00 +0000)]
mi-sched: bypass heuristic checks when regpressure tracking is disabled.

llvm-svn: 189988

11 years agoAdded -misched-regpressure option.
Andrew Trick [Wed, 4 Sep 2013 20:59:59 +0000 (20:59 +0000)]
Added -misched-regpressure option.

Register pressure tracking is half the complexity of the
scheduler. It's useful to be able to turn it off for compile time and
performance comparisons.

llvm-svn: 189987

11 years agoChange swift/vldm test case to be less dependent on allocation order
Arnold Schwaighofer [Wed, 4 Sep 2013 20:51:06 +0000 (20:51 +0000)]
Change swift/vldm test case to be less dependent on allocation order

'Force' values in registers using the calling convention. Now, we only depend on
the calling convention and that the allocator performs copy coalescing.

llvm-svn: 189985

11 years agomodularize - Fix of header dependencies - this time with the source.
John Thompson [Wed, 4 Sep 2013 20:46:24 +0000 (20:46 +0000)]
modularize - Fix of header dependencies - this time with the source.

llvm-svn: 189984

11 years agomodularize - Fix of header dependencies.
John Thompson [Wed, 4 Sep 2013 20:45:43 +0000 (20:45 +0000)]
modularize - Fix of header dependencies.

llvm-svn: 189983

11 years agoRename some variables to match the style guide.
Rafael Espindola [Wed, 4 Sep 2013 20:08:46 +0000 (20:08 +0000)]
Rename some variables to match the style guide.

I am about to patch this code, and this makes the diff far more readable.

llvm-svn: 189982

11 years agoR600: Use shared op optimization when checking cycle compatibility
Vincent Lejeune [Wed, 4 Sep 2013 19:53:54 +0000 (19:53 +0000)]
R600: Use shared op optimization when checking cycle compatibility

llvm-svn: 189981