platform/upstream/llvm.git
11 years agoThis patch adds new private headers to the module map. Private
Lawrence Crowl [Thu, 20 Jun 2013 21:14:14 +0000 (21:14 +0000)]
This patch adds new private headers to the module map. Private
headers may be included from within the module, but not from outside
the module.

llvm-svn: 184471

11 years agoExtend -Wnon-pod-varargs to check calls made from function pointers.
Richard Trieu [Thu, 20 Jun 2013 21:03:13 +0000 (21:03 +0000)]
Extend -Wnon-pod-varargs to check calls made from function pointers.

llvm-svn: 184470

11 years ago[yaml2obj][ELF] Add support for st_value and st_size.
Sean Silva [Thu, 20 Jun 2013 20:59:47 +0000 (20:59 +0000)]
[yaml2obj][ELF] Add support for st_value and st_size.

After this patch, the ELF file produced by
`yaml2obj-elf-symbol-basic.yaml`, when linked and executed on x86_64
(under SysV ABI, obviously; I tested on Linux), produces a working
executable that goes into an infinite loop!

llvm-svn: 184469

11 years ago[yaml2obj][ELF] Allow symbols to reference sections.
Sean Silva [Thu, 20 Jun 2013 20:59:41 +0000 (20:59 +0000)]
[yaml2obj][ELF] Allow symbols to reference sections.

llvm-svn: 184468

11 years ago[yaml2obj][ELF] Add the section name -> section index map to State.
Sean Silva [Thu, 20 Jun 2013 20:59:34 +0000 (20:59 +0000)]
[yaml2obj][ELF] Add the section name -> section index map to State.

One of the key things that the YAML format abstracts over is the use of
section numbers for referencing sections. Instead, textual section names
are used, which yaml2obj then translates into appropriate section
numbers. (Technically ELF doesn't care about section names (only section
numbers), but since this is a testing tool, readability counts).

This simplifies using section names as symbolic references in various
parts of the code. An upcoming commit will use this to allow symbols to
reference sections.

llvm-svn: 184467

11 years agoClean up warning and add a test.
Eli Friedman [Thu, 20 Jun 2013 20:58:02 +0000 (20:58 +0000)]
Clean up warning and add a test.

llvm-svn: 184466

11 years agoAdd test.
Eli Friedman [Thu, 20 Jun 2013 20:56:57 +0000 (20:56 +0000)]
Add test.

llvm-svn: 184465

11 years agoAdd a setLastModificationAndAccessTime to PathV2.
Rafael Espindola [Thu, 20 Jun 2013 20:56:14 +0000 (20:56 +0000)]
Add a setLastModificationAndAccessTime to PathV2.

With this we can remove the last use of PathV1 from llvm-ar.cpp.

llvm-svn: 184464

11 years agoFix English grammar error.
Lawrence Crowl [Thu, 20 Jun 2013 20:51:51 +0000 (20:51 +0000)]
Fix English grammar error.

llvm-svn: 184463

11 years ago[mips] Remove Triple:mips from SupportedArchs in MCJIT unittests
Akira Hatanaka [Thu, 20 Jun 2013 20:33:06 +0000 (20:33 +0000)]
[mips] Remove Triple:mips from SupportedArchs in MCJIT unittests

MIPS does not handle multiple relocations correctly, so two tests from the
unittests are expected to fail. These are:
 - MCJITTest.return_global and
 - MCJITTest.multiple_functions.

Until the multiple relocations are fixed, XFAIL the MCJIT unittests for
MIPS. This issue is tracked as Bug 16250.

Patch by Petar Jovanovic.

llvm-svn: 184461

11 years agoUse a raw_fd_ostream instead of a std::ofstream.
Rafael Espindola [Thu, 20 Jun 2013 19:50:39 +0000 (19:50 +0000)]
Use a raw_fd_ostream instead of a std::ofstream.

llvm-svn: 184460

11 years agoRemove the simplify-libcalls pass (finally)
Meador Inge [Thu, 20 Jun 2013 19:48:07 +0000 (19:48 +0000)]
Remove the simplify-libcalls pass (finally)

This commit completely removes what is left of the simplify-libcalls
pass.  All of the functionality has now been migrated to the instcombine
and functionattrs passes.  The following C API functions are now NOPs:

  1. LLVMAddSimplifyLibCallsPass
  2. LLVMPassManagerBuilderSetDisableSimplifyLibCalls

llvm-svn: 184459

11 years agoCodeGen: Don't set 'PMBuilder.DisableSimplifyLibCalls'
Meador Inge [Thu, 20 Jun 2013 19:47:18 +0000 (19:47 +0000)]
CodeGen: Don't set 'PMBuilder.DisableSimplifyLibCalls'

The simplify-libcalls pass has been removed from LLVM.  Thus
'PMBuilder.DisableSimplifyLibCalls' does not exist anymore.
The disabling/enabling of library call simplifications is
done through the TargetLibraryInfo which is already wired
up in Clang.

llvm-svn: 184458

11 years ago[yaml2obj][ELF] Start factoring into "single point of truth".
Sean Silva [Thu, 20 Jun 2013 19:11:44 +0000 (19:11 +0000)]
[yaml2obj][ELF] Start factoring into "single point of truth".

llvm-svn: 184457

11 years ago[yaml2obj][ELF] Just let this class own its buffer.
Sean Silva [Thu, 20 Jun 2013 19:11:41 +0000 (19:11 +0000)]
[yaml2obj][ELF] Just let this class own its buffer.

llvm-svn: 184456

11 years agoRemove a trivial use of sys::Path.
Rafael Espindola [Thu, 20 Jun 2013 18:55:44 +0000 (18:55 +0000)]
Remove a trivial use of sys::Path.

llvm-svn: 184455

11 years agoAdd an additional test for dynamic_cast.
Eli Friedman [Thu, 20 Jun 2013 18:53:38 +0000 (18:53 +0000)]
Add an additional test for dynamic_cast.

llvm-svn: 184454

11 years agoRemove dead code.
Eli Friedman [Thu, 20 Jun 2013 18:53:21 +0000 (18:53 +0000)]
Remove dead code.

llvm-svn: 184453

11 years ago[ReleaseNotes] Added bullet point stating that APFloat::isNormal() is now IEEE 754R...
Michael Gottesman [Thu, 20 Jun 2013 18:47:51 +0000 (18:47 +0000)]
[ReleaseNotes] Added bullet point stating that APFloat::isNormal() is now IEEE 754R-2008 compliant and that the relevant method renaming occurred.

For more information see r184449, r184350, r184356, r184366.

llvm-svn: 184452

11 years agoFixed a problem with materialization and
Sean Callanan [Thu, 20 Jun 2013 18:42:16 +0000 (18:42 +0000)]
Fixed a problem with materialization and
dematerialization of registers that caused
conditional breakpoint expressions not to
work properly.  Also added a testcase.

<rdar://problem/14129252>

llvm-svn: 184451

11 years agoAdd support for getting the last modification time from a file_status.
Rafael Espindola [Thu, 20 Jun 2013 18:42:04 +0000 (18:42 +0000)]
Add support for getting the last modification time from a file_status.

Use that in llvm-ar.cpp to replace a use of sys::PathWithStatus.

llvm-svn: 184450

11 years ago[APFloat] Rename isIEEENormal => isNormal and remove old isNormal method.
Michael Gottesman [Thu, 20 Jun 2013 18:34:38 +0000 (18:34 +0000)]
[APFloat] Rename isIEEENormal => isNormal and remove old isNormal method.

The old isNormal is already functionally replaced by the method isFiniteNonZero
in r184350 and all references to said method were replaced in LLVM/clang in
r184356/134366.

llvm-svn: 184449

11 years agoUse only the filename when deciding if a file is a duplicate.
Rafael Espindola [Thu, 20 Jun 2013 18:30:37 +0000 (18:30 +0000)]
Use only the filename when deciding if a file is a duplicate.

Matches gnu ar behavior.

llvm-svn: 184448

11 years ago[APFloat] Fix typo in test so we actually test if we handle denormals.
Michael Gottesman [Thu, 20 Jun 2013 18:25:16 +0000 (18:25 +0000)]
[APFloat] Fix typo in test so we actually test if we handle denormals.

llvm-svn: 184447

11 years agoClang-format the SLP vectorizer. No functionality change.
Nadav Rotem [Thu, 20 Jun 2013 17:54:36 +0000 (17:54 +0000)]
Clang-format the SLP vectorizer. No functionality change.

llvm-svn: 184446

11 years agoThis reverts r155000.
Joey Gouly [Thu, 20 Jun 2013 17:42:36 +0000 (17:42 +0000)]
This reverts r155000.
The cdp2 instruction should have the same restrictions as cdp on the
co-processor registers.

VFP instructions on v8/AArch32 share the same encoding space as cdp2.

llvm-svn: 184445

11 years agoSLPVectorization: Add a basic support for cross-basic block slp vectorization.
Nadav Rotem [Thu, 20 Jun 2013 17:41:45 +0000 (17:41 +0000)]
SLPVectorization:  Add a basic support for cross-basic block slp vectorization.

We collect gather sequences when we vectorize basic blocks. Gather sequences are excellent
hints for vectorization of other basic blocks.

llvm-svn: 184444

11 years agoGive this X86-specific test a triple so it's actually X86-specific.
David Blaikie [Thu, 20 Jun 2013 17:31:32 +0000 (17:31 +0000)]
Give this X86-specific test a triple so it's actually X86-specific.

llvm-svn: 184443

11 years agoFix CodeGenCXX/debug-info.cpp to target a known ABI (x86-64-linux) so as not to be...
David Blaikie [Thu, 20 Jun 2013 17:23:30 +0000 (17:23 +0000)]
Fix CodeGenCXX/debug-info.cpp to target a known ABI (x86-64-linux) so as not to be confused by strange (& currently broken) Windows ABI

llvm-svn: 184442

11 years ago[PowerPC] Remove unused parameter
Ulrich Weigand [Thu, 20 Jun 2013 16:58:14 +0000 (16:58 +0000)]
[PowerPC] Remove unused parameter

The isDarwin parameter to the llvm::LowerPPCMachineInstrToMCInst
routine is now no longer needed; remove it.

llvm-svn: 184441

11 years agoChange the debug type to match the debug type that is used by vecutils.cpp.
Nadav Rotem [Thu, 20 Jun 2013 16:38:05 +0000 (16:38 +0000)]
Change the debug type to match the debug type that is used by vecutils.cpp.
This change makes it easier to filter debug messages.

llvm-svn: 184440

11 years ago[PowerPC] Add missing build dependency
Ulrich Weigand [Thu, 20 Jun 2013 16:38:00 +0000 (16:38 +0000)]
[PowerPC] Add missing build dependency

This (hopefully) fixes build failures resulting from r184436;
the PowerPC asm parser now depends on PowerPC target expresssions.

llvm-svn: 184439

11 years agoFix CodeGenCXX/debug-info.cpp test on Windows
Reid Kleckner [Thu, 20 Jun 2013 16:28:24 +0000 (16:28 +0000)]
Fix CodeGenCXX/debug-info.cpp test on Windows

On Windows, it looks like FlagIndirectVariable is being set in Flags for
DIBuilder::createLocalVariable(), giving us an i32 of 8192 instead of 0,
as on Linux.

Fixes breakage from r184367.

llvm-svn: 184438

11 years ago[MC] Support @ variants with directional labels
Ulrich Weigand [Thu, 20 Jun 2013 16:24:17 +0000 (16:24 +0000)]
[MC] Support @ variants with directional labels

The assembler parser common code supports recognizing symbol variants
using the @ modifer.  On PowerPC, it should also be possible to use
(some of) those modifiers with directional labels, like "1f@l".

This patch adds support for accepting symbol variants on directional
labels as well.

llvm-svn: 184437

11 years ago[PowerPC] Optimize @ha/@l constructs
Ulrich Weigand [Thu, 20 Jun 2013 16:23:52 +0000 (16:23 +0000)]
[PowerPC] Optimize @ha/@l constructs

This patch adds support for having the assembler optimize fixups
to constructs like "symbol@ha" or "symbol@l" if "symbol" can be
resolved at assembler time.

This optimization is already present in the PPCMCExpr.cpp code
for handling PPC_HA16/PPC_LO16 target expressions.  However,
those target expression were used only on Darwin targets.

This patch changes target expression code so that they are
usable also with the GNU assembler (using the @ha / @l syntax
instead of the ha16() / lo16() syntax), and changes the
MCInst lowering code to generate those target expressions
where appropriate.

It also changes the asm parser to generate HA16/LO16 target
expressions when parsing assembler source that uses the
@ha / @l modifiers.  The effect is that now the above-
mentioned optimization automatically becomes available
for those situations too.

llvm-svn: 184436

11 years ago[PowerPC] Support compare mnemonics with implied CR0
Ulrich Weigand [Thu, 20 Jun 2013 16:15:12 +0000 (16:15 +0000)]
[PowerPC] Support compare mnemonics with implied CR0

Just like for branch mnemonics (where support was recently added), the
assembler is supposed to support extended mnemonics for the compare
instructions where no condition register is specified explicitly
(and CR0 is assumed implicitly).

This patch adds support for those extended compare mnemonics.

Index: llvm-head/test/MC/PowerPC/ppc64-encoding-ext.s
===================================================================
--- llvm-head.orig/test/MC/PowerPC/ppc64-encoding-ext.s
+++ llvm-head/test/MC/PowerPC/ppc64-encoding-ext.s
@@ -449,21 +449,37 @@

 # CHECK: cmpdi 2, 3, 128                 # encoding: [0x2d,0x23,0x00,0x80]
          cmpdi 2, 3, 128
+# CHECK: cmpdi 0, 3, 128                 # encoding: [0x2c,0x23,0x00,0x80]
+         cmpdi 3, 128
 # CHECK: cmpd 2, 3, 4                    # encoding: [0x7d,0x23,0x20,0x00]
          cmpd 2, 3, 4
+# CHECK: cmpd 0, 3, 4                    # encoding: [0x7c,0x23,0x20,0x00]
+         cmpd 3, 4
 # CHECK: cmpldi 2, 3, 128                # encoding: [0x29,0x23,0x00,0x80]
          cmpldi 2, 3, 128
+# CHECK: cmpldi 0, 3, 128                # encoding: [0x28,0x23,0x00,0x80]
+         cmpldi 3, 128
 # CHECK: cmpld 2, 3, 4                   # encoding: [0x7d,0x23,0x20,0x40]
          cmpld 2, 3, 4
+# CHECK: cmpld 0, 3, 4                   # encoding: [0x7c,0x23,0x20,0x40]
+         cmpld 3, 4

 # CHECK: cmpwi 2, 3, 128                 # encoding: [0x2d,0x03,0x00,0x80]
          cmpwi 2, 3, 128
+# CHECK: cmpwi 0, 3, 128                 # encoding: [0x2c,0x03,0x00,0x80]
+         cmpwi 3, 128
 # CHECK: cmpw 2, 3, 4                    # encoding: [0x7d,0x03,0x20,0x00]
          cmpw 2, 3, 4
+# CHECK: cmpw 0, 3, 4                    # encoding: [0x7c,0x03,0x20,0x00]
+         cmpw 3, 4
 # CHECK: cmplwi 2, 3, 128                # encoding: [0x29,0x03,0x00,0x80]
          cmplwi 2, 3, 128
+# CHECK: cmplwi 0, 3, 128                # encoding: [0x28,0x03,0x00,0x80]
+         cmplwi 3, 128
 # CHECK: cmplw 2, 3, 4                   # encoding: [0x7d,0x03,0x20,0x40]
          cmplw 2, 3, 4
+# CHECK: cmplw 0, 3, 4                   # encoding: [0x7c,0x03,0x20,0x40]
+         cmplw 3, 4

 # FIXME: Trap mnemonics

Index: llvm-head/lib/Target/PowerPC/PPCInstrInfo.td
===================================================================
--- llvm-head.orig/lib/Target/PowerPC/PPCInstrInfo.td
+++ llvm-head/lib/Target/PowerPC/PPCInstrInfo.td
@@ -2201,3 +2201,12 @@ defm : BranchExtendedMnemonic<"ne", 68>;
 defm : BranchExtendedMnemonic<"nu", 100>;
 defm : BranchExtendedMnemonic<"ns", 100>;

+def : InstAlias<"cmpwi $rA, $imm", (CMPWI CR0, gprc:$rA, s16imm:$imm)>;
+def : InstAlias<"cmpw $rA, $rB", (CMPW CR0, gprc:$rA, gprc:$rB)>;
+def : InstAlias<"cmplwi $rA, $imm", (CMPLWI CR0, gprc:$rA, u16imm:$imm)>;
+def : InstAlias<"cmplw $rA, $rB", (CMPLW CR0, gprc:$rA, gprc:$rB)>;
+def : InstAlias<"cmpdi $rA, $imm", (CMPDI CR0, g8rc:$rA, s16imm:$imm)>;
+def : InstAlias<"cmpd $rA, $rB", (CMPD CR0, g8rc:$rA, g8rc:$rB)>;
+def : InstAlias<"cmpldi $rA, $imm", (CMPLDI CR0, g8rc:$rA, u16imm:$imm)>;
+def : InstAlias<"cmpld $rA, $rB", (CMPLD CR0, g8rc:$rA, g8rc:$rB)>;
+

llvm-svn: 184435

11 years agoFix get_magic() handling of short reads.
Evgeniy Stepanov [Thu, 20 Jun 2013 15:56:05 +0000 (15:56 +0000)]
Fix get_magic() handling of short reads.

PR16389

llvm-svn: 184434

11 years agoRemove the transitional GetUniqueID.
Rafael Espindola [Thu, 20 Jun 2013 15:20:11 +0000 (15:20 +0000)]
Remove the transitional GetUniqueID.

llvm-svn: 184433

11 years agoUse the new name of getUniqueID.
Rafael Espindola [Thu, 20 Jun 2013 15:12:38 +0000 (15:12 +0000)]
Use the new name of getUniqueID.

llvm-svn: 184432

11 years agoRename fs::GetUniqueID to fs::getUniqueID to match the style guide.
Rafael Espindola [Thu, 20 Jun 2013 15:06:35 +0000 (15:06 +0000)]
Rename fs::GetUniqueID to fs::getUniqueID to match the style guide.

llvm-svn: 184431

11 years agotsan: fix potential false positive race on fd
Dmitry Vyukov [Thu, 20 Jun 2013 14:32:12 +0000 (14:32 +0000)]
tsan: fix potential false positive race on fd

llvm-svn: 184430

11 years agoEnhancements for the DynTypedMatcher system.
Samuel Benzaquen [Thu, 20 Jun 2013 14:28:32 +0000 (14:28 +0000)]
Enhancements for the DynTypedMatcher system.
- Added conversion routines and checks in Matcher<T> that take a DynTypedMatcher.
- Added type information on the error messages for the marshallers.
- Allows future work on Polymorphic/overloaded matchers. We should be
  able to disambiguate at runtime and choose the appropriate overload.

llvm-svn: 184429

11 years agoRemove MSan hack that is no longer needed.
Evgeniy Stepanov [Thu, 20 Jun 2013 14:19:10 +0000 (14:19 +0000)]
Remove MSan hack that is no longer needed.

llvm-svn: 184428

11 years agoAdds the equalsBoundNode matcher.
Manuel Klimek [Thu, 20 Jun 2013 14:06:32 +0000 (14:06 +0000)]
Adds the equalsBoundNode matcher.

Most of the tests contributed by Edwin Vane.

llvm-svn: 184427

11 years agoFix typos "metatadata" -> "metadata" in the LangRef.
Stefanus Du Toit [Thu, 20 Jun 2013 14:02:44 +0000 (14:02 +0000)]
Fix typos "metatadata" -> "metadata" in the LangRef.

llvm-svn: 184426

11 years agoUse the same set of whitespace characters for all operations in BreakableToken.
Alexander Kornienko [Thu, 20 Jun 2013 13:58:37 +0000 (13:58 +0000)]
Use the same set of whitespace characters for all operations in BreakableToken.

Summary:
Fixes a problem where \t,\v or \f could lead to a crash when placed as
a first character in a line comment. The cause is that rtrim and ltrim handle
these characters, but our code didn't, so some invariants could be broken.

Reviewers: klimek

Reviewed By: klimek

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

llvm-svn: 184425

11 years agoMake sure ar is creating a new file instead of updating an existing one.
Rafael Espindola [Thu, 20 Jun 2013 13:44:49 +0000 (13:44 +0000)]
Make sure ar is creating a new file instead of updating an existing one.

Should fix the bots that are seeing a corrupted file from a previous run.

llvm-svn: 184424

11 years agoAdd r184420 back, but also handle long file names.
Rafael Espindola [Thu, 20 Jun 2013 13:41:51 +0000 (13:41 +0000)]
Add r184420 back, but also handle long file names.

Original message:

Don't include directory names in archives.

This matches the behavior of both gnu and os x versions of ar.

llvm-svn: 184423

11 years ago[asan] Define LSan annotations as no-ops if leak detection is not supported.
Sergey Matveev [Thu, 20 Jun 2013 13:39:42 +0000 (13:39 +0000)]
[asan] Define LSan annotations as no-ops if leak detection is not supported.

llvm-svn: 184422

11 years agoRevert "Don't include directory names in archives."
Rafael Espindola [Thu, 20 Jun 2013 13:23:48 +0000 (13:23 +0000)]
Revert "Don't include directory names in archives."

This reverts commit 184420.
Investigating the bot failures.

llvm-svn: 184421

11 years agoDon't include directory names in archives.
Rafael Espindola [Thu, 20 Jun 2013 13:16:44 +0000 (13:16 +0000)]
Don't include directory names in archives.

This matches the behavior of both gnu and os x versions of ar.

llvm-svn: 184420

11 years agoImplements declaratorDecl, parmVarDecl and hassTypeLoc matchers.
Manuel Klimek [Thu, 20 Jun 2013 13:08:29 +0000 (13:08 +0000)]
Implements declaratorDecl, parmVarDecl and hassTypeLoc matchers.

llvm-svn: 184419

11 years agoRemove remaining bits of the old LLVM specific symtab handling.
Rafael Espindola [Thu, 20 Jun 2013 13:00:30 +0000 (13:00 +0000)]
Remove remaining bits of the old LLVM specific symtab handling.

llvm-svn: 184418

11 years agoImproved source code fidelity for gcc mode attribute.
Enea Zaffanella [Thu, 20 Jun 2013 12:46:19 +0000 (12:46 +0000)]
Improved source code fidelity for gcc mode attribute.

llvm-svn: 184417

11 years agoRemove more unused functions.
Rafael Espindola [Thu, 20 Jun 2013 12:45:47 +0000 (12:45 +0000)]
Remove more unused functions.

llvm-svn: 184416

11 years agoRemove unused methods.
Rafael Espindola [Thu, 20 Jun 2013 12:42:00 +0000 (12:42 +0000)]
Remove unused methods.

llvm-svn: 184415

11 years agoUse the simpler sys::fs::exists.
Rafael Espindola [Thu, 20 Jun 2013 12:04:39 +0000 (12:04 +0000)]
Use the simpler sys::fs::exists.

llvm-svn: 184413

11 years agoConvert a use of sys::Path.
Rafael Espindola [Thu, 20 Jun 2013 11:59:19 +0000 (11:59 +0000)]
Convert a use of sys::Path.

llvm-svn: 184412

11 years agoOptimize register parsing for MipsAsmParser. Allow symbolic aliases for FPU registers.
Vladimir Medic [Thu, 20 Jun 2013 11:21:49 +0000 (11:21 +0000)]
Optimize register parsing for MipsAsmParser. Allow symbolic aliases for FPU registers.

llvm-svn: 184411

11 years agoAdd -fno-assume-sane-operator-new when building with MSan.
Evgeniy Stepanov [Thu, 20 Jun 2013 10:49:46 +0000 (10:49 +0000)]
Add -fno-assume-sane-operator-new when building with MSan.

A workaroudn for PR16386. MSan's operator new aften has side-effects that are
miscompiled without this flag.

llvm-svn: 184410

11 years agoFix unused function warning w/o changing compiler flags.
Evgeniy Stepanov [Thu, 20 Jun 2013 09:45:36 +0000 (09:45 +0000)]
Fix unused function warning w/o changing compiler flags.

We have way too many different build systems.

llvm-svn: 184409

11 years agoUpdate two options to my proposed syntax for user-facing driver options:
Chandler Carruth [Thu, 20 Jun 2013 09:42:40 +0000 (09:42 +0000)]
Update two options to my proposed syntax for user-facing driver options:

  -gcc-toolchain foo  ->  --gcc-toolchain=foo
  -target foo         ->  --target=foo

I've added legacy aliases for the original spellings. I've updated the
canonical tests to check both spellings, and switched all of the
-gcc-toolchain usages elsewhere in the test suite to use the new one.
I've updated some of the usages of -target to the new syntax, but will
finish that in a separate entirely mechanical change once I'm sure this
won't get rolled back for some reason (It touches a *huge* number of RUN
lines in the test suite unsurprisingly).

A nice result is that the three most common flags I end up using when
doing cross compiles are all now consistent: --target=, --sysroot=, and
--gcc-toolchain=.

llvm-svn: 184408

11 years ago[sanitizer] Fix Mac build.
Evgeniy Stepanov [Thu, 20 Jun 2013 09:39:34 +0000 (09:39 +0000)]
[sanitizer] Fix Mac build.

llvm-svn: 184407

11 years agoRemove an outdated comment.
Evgeniy Stepanov [Thu, 20 Jun 2013 09:21:25 +0000 (09:21 +0000)]
Remove an outdated comment.

llvm-svn: 184406

11 years ago[sanitizer] Handle EVIOxxxx ioctls.
Evgeniy Stepanov [Thu, 20 Jun 2013 09:19:28 +0000 (09:19 +0000)]
[sanitizer] Handle EVIOxxxx ioctls.

llvm-svn: 184405

11 years ago[ASan] Clear allocation magic value before recycling the chunk. This led to spurious...
Alexey Samsonov [Thu, 20 Jun 2013 08:13:06 +0000 (08:13 +0000)]
[ASan] Clear allocation magic value before recycling the chunk. This led to spurious crashes in LSan when it walked through reused chunks. Don't know how to create not-brittle test case for this.

llvm-svn: 184404

11 years agoFix static analyzer crash when casting from an incomplete type
Pavel Labath [Thu, 20 Jun 2013 07:45:01 +0000 (07:45 +0000)]
Fix static analyzer crash when casting from an incomplete type

Summary:
When doing a reinterpret+dynamic cast from an incomplete type, the analyzer
would crash (bug #16308). This fix makes the dynamic cast evaluator ignore
incomplete types, as they can never be used in a dynamic_cast. Also adding a
regression test.

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

llvm-svn: 184403

11 years agoAdd a regression test for PR16370 next to the dr7 test case since they
Chandler Carruth [Thu, 20 Jun 2013 07:06:39 +0000 (07:06 +0000)]
Add a regression test for PR16370 next to the dr7 test case since they
seem closely related. (I'm happy to move this if others have a better
idea of where to put it.)

llvm-svn: 184402

11 years agoTemporarily revert r183462: "Implement DR7"
Chandler Carruth [Thu, 20 Jun 2013 07:06:34 +0000 (07:06 +0000)]
Temporarily revert r183462: "Implement DR7"

This fixes PR16370, I'll add the test case in a follow-up commit.

llvm-svn: 184401

11 years agoRemove static, because it was messing everything up.
Bill Wendling [Thu, 20 Jun 2013 06:51:06 +0000 (06:51 +0000)]
Remove static, because it was messing everything up.

llvm-svn: 184400

11 years agoRevise r184335 so that warning suppression flag is only for clang 3.4 and higher
Andy Gibbs [Thu, 20 Jun 2013 06:47:36 +0000 (06:47 +0000)]
Revise r184335 so that warning suppression flag is only for clang 3.4 and higher

llvm-svn: 184399

11 years ago[TargetInfo] Undefined symbols move from ELFTargetInfo to TargetInfo
Shankar Easwaran [Thu, 20 Jun 2013 04:27:21 +0000 (04:27 +0000)]
[TargetInfo] Undefined symbols move from ELFTargetInfo to TargetInfo

This change moves the functionality of undefinedSymbols that were created in
ELFTargetInfo into TargetInfo. Looks like MachO/Windows use similiar options
like in ELF for creating undefined symbols when the linker is invoked.

Address comment from Ruiu.

(No change in functionality, except moving the functionality from ELF to
TargetInfo, so that multiple architectures can use the same)

llvm-svn: 184398

11 years agoFix one place I missed that was memcpy'ing TypeLocs in a way that messes
Eli Friedman [Thu, 20 Jun 2013 04:11:21 +0000 (04:11 +0000)]
Fix one place I missed that was memcpy'ing TypeLocs in a way that messes
up alignment.

Fixes utilities/tuple/tuple.tuple/tuple.creation/tuple_cat.pass.cpp from the
libc++ testsuite.

llvm-svn: 184397

11 years agoPR16377: Allow evaluation of statement expressions in constant evaluation,
Richard Smith [Thu, 20 Jun 2013 03:00:05 +0000 (03:00 +0000)]
PR16377: Allow evaluation of statement expressions in constant evaluation,
why not. Apparently GCC supports this.

llvm-svn: 184396

11 years agoAdd a workaround for a libstdc++-4.2 <tr1/hashtable> bug. This header uses
Richard Smith [Thu, 20 Jun 2013 02:18:31 +0000 (02:18 +0000)]
Add a workaround for a libstdc++-4.2 <tr1/hashtable> bug. This header uses

  return false;

in a function returning a pointer. 'false' was a null pointer constant in C++98
but is not in C++11. Punch a very small hole in the initialization rules in
C++11 mode to allow this specific case in system headers.

llvm-svn: 184395

11 years agoProtect against invalid mangled names. Add test suite for invalid mangled names.
Howard Hinnant [Thu, 20 Jun 2013 01:55:07 +0000 (01:55 +0000)]
Protect against invalid mangled names.  Add test suite for invalid mangled names.

llvm-svn: 184394

11 years agoOne more cast test.
Eli Friedman [Thu, 20 Jun 2013 01:47:05 +0000 (01:47 +0000)]
One more cast test.

llvm-svn: 184393

11 years agoAdd a few more tests for casts.
Eli Friedman [Thu, 20 Jun 2013 01:35:13 +0000 (01:35 +0000)]
Add a few more tests for casts.

llvm-svn: 184392

11 years agoFix typo in r184308.
Richard Smith [Thu, 20 Jun 2013 01:33:59 +0000 (01:33 +0000)]
Fix typo in r184308.

llvm-svn: 184391

11 years agoFixed a crasher that I encountered when looking up a virtual base class offset.
Greg Clayton [Thu, 20 Jun 2013 01:24:52 +0000 (01:24 +0000)]
Fixed a crasher that I encountered when looking up a virtual base class offset.

llvm-svn: 184390

11 years agoCleanup the output a bit by removing old print statements and also printing the numbe...
Greg Clayton [Thu, 20 Jun 2013 01:23:56 +0000 (01:23 +0000)]
Cleanup the output a bit by removing old print statements and also printing the number of types found.

llvm-svn: 184389

11 years agoUnique types a bit more using the clang type to make sure we don't get multiple copie...
Greg Clayton [Thu, 20 Jun 2013 01:23:18 +0000 (01:23 +0000)]
Unique types a bit more using the clang type to make sure we don't get multiple copies of the same type due to the debug info having multiple types that get uniqued.

llvm-svn: 184388

11 years agoDebugInfo: don't use location lists when the location covers the whole function anyway
David Blaikie [Thu, 20 Jun 2013 00:25:24 +0000 (00:25 +0000)]
DebugInfo: don't use location lists when the location covers the whole function anyway

Fix up three tests - one that was relying on abbreviation number,
another relying on a location list in this case (& testing raw asm,
changed that to use dwarfdump on the debug_info now that that's where
the location is), and another which was added in r184368 - exposing a
bug in that fix that is exposed when we emit the location inline rather
than through a location list. Fix that bug while I'm here.

llvm-svn: 184387

11 years agoAdd a testcase which uses an UnresolvedUsingTypenameDecl as the base of an NNS.
Eli Friedman [Thu, 20 Jun 2013 00:04:23 +0000 (00:04 +0000)]
Add a testcase which uses an UnresolvedUsingTypenameDecl as the base of an NNS.

llvm-svn: 184386

11 years ago[clang-lit] Added the run_long_tests param option/long_tests feature to toggle execut...
Michael Gottesman [Wed, 19 Jun 2013 23:23:49 +0000 (23:23 +0000)]
[clang-lit] Added the run_long_tests param option/long_tests feature to toggle execution of long running FileCheck tests.

This will allow for longer running FileCheck based tests to be committed to
clang for use on buildbots, preventing the normal make-check cycle from
increasing in time significantly.

This is a necessary change in order to commit the end-to-end arm neon intrinsic
tests since FileCheck takes ~20 seconds to run said test due to the large amount
of neon intrinsics.

To force a test to run only when --param run_long_tests=true is passed in use
the following requires statement:

// REQUIRES: long_tests

llvm-svn: 184385

11 years agoRevert r184205 and associated patches while investigating issue with broken buildbot...
Stephen Lin [Wed, 19 Jun 2013 23:23:19 +0000 (23:23 +0000)]
Revert r184205 and associated patches while investigating issue with broken buildbot (possible interaction with LTO)

<rdar://problem/14209661>

llvm-svn: 184384

11 years ago[libclang] Make sure crash-recovery for module-building does not interfere with libcl...
Argyrios Kyrtzidis [Wed, 19 Jun 2013 23:15:35 +0000 (23:15 +0000)]
[libclang] Make sure crash-recovery for module-building does not interfere with libclang crash-recovery.

This tests llvm commit r184380.
rdar://14204560

llvm-svn: 184383

11 years agoFix r184381 so the test doesn't fail. Sorry for the inconvenience, I thought I had...
Eli Friedman [Wed, 19 Jun 2013 23:00:37 +0000 (23:00 +0000)]
Fix r184381 so the test doesn't fail.  Sorry for the inconvenience, I thought I had checked it.

llvm-svn: 184382

11 years agoExtra test for diagnostic in Sema::BuildCXXNestedNameSpecifier.
Eli Friedman [Wed, 19 Jun 2013 22:58:30 +0000 (22:58 +0000)]
Extra test for diagnostic in Sema::BuildCXXNestedNameSpecifier.

llvm-svn: 184381

11 years ago[Support/CrashRecoveryContext] Make sure CrashRecoveryContext does not clear the...
Argyrios Kyrtzidis [Wed, 19 Jun 2013 22:53:45 +0000 (22:53 +0000)]
[Support/CrashRecoveryContext] Make sure CrashRecoveryContext does not clear the thread-local "CurrentContext"
in the "parent" thread, when we are using CrashRecoveryContext::RunSafelyOnThread.

When using CrashRecoveryContext::RunSafelyOnThread, we would set a CrashRecoveryContextImpl* to a thread-local variable
for the "child" thread, but CrashRecoveryContext would erroneously clear it in the "parent" thread.

The result was that if CrashRecoveryContext::RunSafelyOnThread was called again in the "child" thread it would mess up
crash-recovery for its parent.

A test for this will be added in the clang repository.
rdar://14204560

llvm-svn: 184380

11 years agoRemove dead code.
Eli Friedman [Wed, 19 Jun 2013 22:49:39 +0000 (22:49 +0000)]
Remove dead code.

llvm-svn: 184379

11 years agoImprove diagnostic for redeclaring static member function. Fixes PR16382.
Eli Friedman [Wed, 19 Jun 2013 22:43:55 +0000 (22:43 +0000)]
Improve diagnostic for redeclaring static member function.  Fixes PR16382.

llvm-svn: 184378

11 years agoFix for PR 16367, display the name of a function in a diagnostic instead of
Richard Trieu [Wed, 19 Jun 2013 22:25:01 +0000 (22:25 +0000)]
Fix for PR 16367, display the name of a function in a diagnostic instead of
showing "(null)".

llvm-svn: 184377

11 years agoThis is now a duplicate.
Bill Wendling [Wed, 19 Jun 2013 22:16:33 +0000 (22:16 +0000)]
This is now a duplicate.

llvm-svn: 184376

11 years agoMake the '==' operator inline.
Bill Wendling [Wed, 19 Jun 2013 22:16:11 +0000 (22:16 +0000)]
Make the '==' operator inline.

llvm-svn: 184375

11 years agoMake this static inline to avoid duplicates.
Bill Wendling [Wed, 19 Jun 2013 22:12:11 +0000 (22:12 +0000)]
Make this static inline to avoid duplicates.

llvm-svn: 184374

11 years agoMake the comparison operators non-member functions.
Bill Wendling [Wed, 19 Jun 2013 22:09:25 +0000 (22:09 +0000)]
Make the comparison operators non-member functions.

llvm-svn: 184373

11 years agoNow that we get non-trivial value parameters locations correct, un-XFAIL these tests.
David Blaikie [Wed, 19 Jun 2013 22:07:11 +0000 (22:07 +0000)]
Now that we get non-trivial value parameters locations correct, un-XFAIL these tests.

llvm-svn: 184372

11 years agoAdd missing test for -Wunneeded-member-functions.
Eli Friedman [Wed, 19 Jun 2013 22:01:25 +0000 (22:01 +0000)]
Add missing test for -Wunneeded-member-functions.

llvm-svn: 184371

11 years agoSpelling correction
David Blaikie [Wed, 19 Jun 2013 22:00:13 +0000 (22:00 +0000)]
Spelling correction

llvm-svn: 184370