platform/upstream/llvm.git
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

10 years agoExplicitly request unsigned enum types when desired
Reid Kleckner [Tue, 8 Oct 2013 20:15:11 +0000 (20:15 +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: 192227

10 years agoObjectiveC migration. Add support for inferring
Fariborz Jahanian [Tue, 8 Oct 2013 20:14:24 +0000 (20:14 +0000)]
ObjectiveC migration. Add support for inferring
properties of block pointer types. Also, remove
strong lifetime attribute from property type
in this migration. This is wip.
// rdar://15082818

llvm-svn: 192226

10 years agoRevert 192220 as it fails on an assertion
Timur Iskhodzhanov [Tue, 8 Oct 2013 20:09:50 +0000 (20:09 +0000)]
Revert 192220 as it fails on an assertion

llvm-svn: 192225

10 years agoDebug Info: update testing to reflect r192018.
Manman Ren [Tue, 8 Oct 2013 20:06:43 +0000 (20:06 +0000)]
Debug Info: update testing to reflect r192018.

llvm-svn: 192224

10 years agoAdd fabsf to the list of inlined functions; otherwise
Reed Kotler [Tue, 8 Oct 2013 19:55:01 +0000 (19:55 +0000)]
Add fabsf to the list of inlined functions; otherwise
Mips16 will try and create a stub for it and this will
result in a link error because that function does not exist in libc.

llvm-svn: 192223

10 years agoSuggest people use -Xclang not -cc1 when passing options to the frontend.
Richard Smith [Tue, 8 Oct 2013 19:50:01 +0000 (19:50 +0000)]
Suggest people use -Xclang not -cc1 when passing options to the frontend.

llvm-svn: 192222

10 years agoRemove documentation of removed -ast-dump-xml flag.
Richard Smith [Tue, 8 Oct 2013 19:45:46 +0000 (19:45 +0000)]
Remove documentation of removed -ast-dump-xml flag.

llvm-svn: 192221

10 years agoAbstract out parts of thunk emission code, add support for simple thunks when using...
Timur Iskhodzhanov [Tue, 8 Oct 2013 19:15:38 +0000 (19:15 +0000)]
Abstract out parts of thunk emission code, add support for simple thunks when using -cxx-abi microsoft

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

llvm-svn: 192220

10 years ago[mips] Remove XFAIL.
Akira Hatanaka [Tue, 8 Oct 2013 19:08:54 +0000 (19:08 +0000)]
[mips] Remove XFAIL.

Triple x86_64 has been added to the command line, so this test doesn't fail
on mips anymore.

llvm-svn: 192219

10 years agoAdd DbgVariable::resolve per Eric's suggestion.
Manman Ren [Tue, 8 Oct 2013 19:07:44 +0000 (19:07 +0000)]
Add DbgVariable::resolve per Eric's suggestion.

llvm-svn: 192218

10 years ago<rdar://problem/11778815>
Enrico Granata [Tue, 8 Oct 2013 19:03:22 +0000 (19:03 +0000)]
<rdar://problem/11778815>

Formats (as in "type format") are now included in categories
The only bit missing is caching formats along with synthetic children and summaries, which might be now desirable

llvm-svn: 192217

10 years agoDebug Info: rename getOriginalTypeSize to getBaseTypeSize.
Manman Ren [Tue, 8 Oct 2013 18:46:58 +0000 (18:46 +0000)]
Debug Info: rename getOriginalTypeSize to getBaseTypeSize.

llvm-svn: 192216

10 years agoDebug Info: take advantage of the existing CU::resolve.
Manman Ren [Tue, 8 Oct 2013 18:42:58 +0000 (18:42 +0000)]
Debug Info: take advantage of the existing CU::resolve.

llvm-svn: 192215

10 years agoMove DIRef::getName out of line.
Manman Ren [Tue, 8 Oct 2013 18:42:03 +0000 (18:42 +0000)]
Move DIRef::getName out of line.

llvm-svn: 192214

10 years ago[mips] Simplify and optimize code.
Akira Hatanaka [Tue, 8 Oct 2013 18:13:24 +0000 (18:13 +0000)]
[mips] Simplify and optimize code.

No intended functionality change.

llvm-svn: 192213

10 years agoAdd some xfaild R600 tests.
Matt Arsenault [Tue, 8 Oct 2013 18:06:36 +0000 (18:06 +0000)]
Add some xfaild R600 tests.

These are bugs to fix later.

llvm-svn: 192212

10 years agoRemove transient code I did not mean to check in.
Ted Kremenek [Tue, 8 Oct 2013 18:04:56 +0000 (18:04 +0000)]
Remove transient code I did not mean to check in.

llvm-svn: 192211

10 years ago[sanitizer] Fix deadlock in StopTheWorld.
Sergey Matveev [Tue, 8 Oct 2013 18:01:03 +0000 (18:01 +0000)]
[sanitizer] Fix deadlock in StopTheWorld.

The tracer thread in StopTheWorld could wait on a mutex forever if the parent
process died before unlocking it. Use PR_SET_PDEATHSIG so that the parent would
kill the child in this scenario.

llvm-svn: 192210

10 years agoIRBuilder: Downgrade InsertPointGuard's instruction pointer to a raw pointer.
Benjamin Kramer [Tue, 8 Oct 2013 17:44:56 +0000 (17:44 +0000)]
IRBuilder: Downgrade InsertPointGuard's instruction pointer to a raw pointer.

Sadly this loses the checking from AssertingVH, but apparently storing the
end() of a BasicBlock into an AssertingVH has bad consequences as it's not
really an instruction.

llvm-svn: 192209

10 years agoFixed messages in tests.
Serge Pavlov [Tue, 8 Oct 2013 17:38:38 +0000 (17:38 +0000)]
Fixed messages in tests.

llvm-svn: 192208

10 years agoLet rotr and bswap be handled by expansion for Mips16 since we don't
Reed Kotler [Tue, 8 Oct 2013 17:32:33 +0000 (17:32 +0000)]
Let rotr and bswap be handled by expansion for Mips16 since we don't
have native instructions for this.

llvm-svn: 192207

10 years agoAn example of data formatters that generate a summary for a Unicode UTF encoded strin...
Enrico Granata [Tue, 8 Oct 2013 17:29:27 +0000 (17:29 +0000)]
An example of data formatters that generate a summary for a Unicode UTF encoded string represented as a (pointer,length) pair

llvm-svn: 192206

10 years agoRemoving unintended code block from lli
Andrew Kaylor [Tue, 8 Oct 2013 17:15:11 +0000 (17:15 +0000)]
Removing unintended code block from lli

llvm-svn: 192205

10 years agoFixed grammar. Thanks to Jordan Rose.
Serge Pavlov [Tue, 8 Oct 2013 17:09:03 +0000 (17:09 +0000)]
Fixed grammar. Thanks to Jordan Rose.

llvm-svn: 192204

10 years agoConvert anachronistic use of 'void *' to 'DeclContext *' in Scope that was a holdover...
Ted Kremenek [Tue, 8 Oct 2013 17:08:03 +0000 (17:08 +0000)]
Convert anachronistic use of 'void *' to 'DeclContext *' in Scope that was a holdover from the long-dead Action interface.

llvm-svn: 192203

10 years agoFix an edge case in the template differ with default arguments.
Benjamin Kramer [Tue, 8 Oct 2013 16:58:52 +0000 (16:58 +0000)]
Fix an edge case in the template differ with default arguments.

In the test case one type is coming from a typedef with no default arg, the
other has the default arg. Taking the default arg from the typedef crashes, so
always use the real template paramter declaration. PR17510.

llvm-svn: 192202

10 years agoclang-cl: ignore the /sdl[-] flag
Hans Wennborg [Tue, 8 Oct 2013 16:56:54 +0000 (16:56 +0000)]
clang-cl: ignore the /sdl[-] flag

In cl.exe, this flag turns some warnings into errors and adds some
codegen security checks. I don't think we intend to support this.

llvm-svn: 192201

10 years agoAdd fixits suggesting parenthesis around type name in expressions like sizeof.
Serge Pavlov [Tue, 8 Oct 2013 16:56:30 +0000 (16:56 +0000)]
Add fixits suggesting parenthesis around type name in expressions like sizeof.
This fixes PR16992 - Fixit missing when "sizeof type" found.

llvm-svn: 192200

10 years agoGrammar.
Eric Christopher [Tue, 8 Oct 2013 16:47:11 +0000 (16:47 +0000)]
Grammar.

llvm-svn: 192199

10 years ago[sanitizer] Do not break the CFI unwind chain in clone().
Sergey Matveev [Tue, 8 Oct 2013 16:38:39 +0000 (16:38 +0000)]
[sanitizer] Do not break the CFI unwind chain in clone().

Fixes build on clang 3.2, which doesn't support cfi_undefined. This change
doesn't seem to break the slow unwinder. Even if it does, the worst thing that
could happen is that we would not see a backtrace when a fatal error happens
under StopTheWorld.

llvm-svn: 192196

10 years agoSwitching code owner email address.
Edwin Vane [Tue, 8 Oct 2013 16:28:05 +0000 (16:28 +0000)]
Switching code owner email address.

llvm-svn: 192189

10 years agoclang-format: Improve indentation when deriving from templated classes.
Daniel Jasper [Tue, 8 Oct 2013 16:24:07 +0000 (16:24 +0000)]
clang-format: Improve indentation when deriving from templated classes.

Before:
  struct aaaaaaaaaaaaa : public aaaaaaaaaaaaaaaaaaa< //
      aaaaaaaaaaaaaaaa> {};
  struct aaaaaaaaaaaaaaaaaaaa : public aaaaaaaaaaaaaaaaaaa<
      aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa> {};

After:
  struct aaaaaaaaaaaaa : public aaaaaaaaaaaaaaaaaaa< //
                             aaaaaaaaaaaaaaaa> {};
  struct aaaaaaaaaaaaaaaaaaaa
      : public aaaaaaaaaaaaaaaaaaa<aaaaaaaaaaaaaaaaaaaaa,
                                   aaaaaaaaaaaaaaaaaaaaaa> {};

llvm-svn: 192187

10 years agoFix build on Solaris 11.
Rafael Espindola [Tue, 8 Oct 2013 16:12:58 +0000 (16:12 +0000)]
Fix build on Solaris 11.

Patch by Vladimir Voskresensky. The erros were:

Path.inc:274:3: error: ‘Dl_info’ was not declared in this scope
...

and

usr/include/spawn.h:52:14: error: expected ‘,’ or ‘...’ before ‘argv’

llvm-svn: 192185

10 years agoclang-format: Don't exit with failure on empty files.
Daniel Jasper [Tue, 8 Oct 2013 15:54:36 +0000 (15:54 +0000)]
clang-format: Don't exit with failure on empty files.

Also let clang-format-diff.py detect errors based on clang-format's
return code. Otherwise messages like "Can't find usable .clang-format,
falling back to LLVM style" can make it fail, which might be undesired.

Patch by Alp Toker. Thank you!

llvm-svn: 192184

10 years ago[LinkingContext] make LinkingContext non-const
Shankar Easwaran [Tue, 8 Oct 2013 15:43:48 +0000 (15:43 +0000)]
[LinkingContext] make LinkingContext non-const

llvm-svn: 192183

10 years agoOnly modify lto.exports.def when contents have changed.
Rafael Espindola [Tue, 8 Oct 2013 15:07:00 +0000 (15:07 +0000)]
Only modify lto.exports.def when contents have changed.

Patch by Greg Bedwell.

llvm-svn: 192182

10 years agoAdd a MCTargetStreamer interface.
Rafael Espindola [Tue, 8 Oct 2013 13:08:17 +0000 (13:08 +0000)]
Add a MCTargetStreamer interface.

This patch fixes an old FIXME by creating a MCTargetStreamer interface
and moving the target specific functions for ARM, Mips and PPC to it.

The ARM streamer is still declared in a common place because it is
used from lib/CodeGen/ARMException.cpp, but the Mips and PPC are
completely hidden in the corresponding Target directories.

I will send an email to llvmdev with instructions on how to use this.

llvm-svn: 192181

10 years agoConsistent spelling of names.
Joerg Sonnenberger [Tue, 8 Oct 2013 12:35:07 +0000 (12:35 +0000)]
Consistent spelling of names.

llvm-svn: 192180

10 years agoSparcJITInfo.cpp: Prune "default:" label to fix a warning. [-Wcovered-switch-default]
NAKAMURA Takumi [Tue, 8 Oct 2013 10:29:09 +0000 (10:29 +0000)]
SparcJITInfo.cpp: Prune "default:" label to fix a warning. [-Wcovered-switch-default]

llvm-svn: 192179

10 years agoPrune trailing linefeeds.
NAKAMURA Takumi [Tue, 8 Oct 2013 10:29:03 +0000 (10:29 +0000)]
Prune trailing linefeeds.

llvm-svn: 192178

10 years agoMake InstantiatingTemplate depth checks clearer
Alp Toker [Tue, 8 Oct 2013 08:09:04 +0000 (08:09 +0000)]
Make InstantiatingTemplate depth checks clearer

The bool conversion operator on InstantiatingTemplate never added value and
only served to obfuscate the template instantiation routines.

This replaces the conversion and its callers with an explicit isInvalid()
function to make it clear what's going on at a glance.

llvm-svn: 192177

10 years ago[Sparc] Implement JIT for SPARC.
Venkatraman Govindaraju [Tue, 8 Oct 2013 07:15:22 +0000 (07:15 +0000)]
[Sparc] Implement JIT for SPARC.

No new testcases. However, this patch makes all supported JIT testcases in
test/ExecutionEngine  pass on Sparc.

llvm-svn: 192176

10 years agoRemove unneeded MMX instruction definition by moving pattern to an equivalent instruc...
Craig Topper [Tue, 8 Oct 2013 06:30:39 +0000 (06:30 +0000)]
Remove unneeded MMX instruction definition by moving pattern to an equivalent instruction definition and removing the filtering from the disassembler table building.

llvm-svn: 192175

10 years agoFix a typo in the mattr part of the run line.
Craig Topper [Tue, 8 Oct 2013 06:12:26 +0000 (06:12 +0000)]
Fix a typo in the mattr part of the run line.

llvm-svn: 192174

10 years agoExplicitly disable AVX on a bunch of tests so they won't fail on AVX machines post...
Craig Topper [Tue, 8 Oct 2013 06:06:57 +0000 (06:06 +0000)]
Explicitly disable AVX on a bunch of tests so they won't fail on AVX machines post r192171.

llvm-svn: 192173

10 years ago[Cleanup] Remove file thats not being used
Shankar Easwaran [Tue, 8 Oct 2013 06:05:38 +0000 (06:05 +0000)]
[Cleanup] Remove file thats not being used

llvm-svn: 192172

10 years agoRemove some instructions that existed to provide aliases to the assembler. Can be...
Craig Topper [Tue, 8 Oct 2013 05:53:50 +0000 (05:53 +0000)]
Remove some instructions that existed to provide aliases to the assembler. Can be done with InstAlias instead. Unfortunately, this was causing printer to use 'vmovq' or 'vmovd' based on what was parsed. To cleanup the inconsistencies convert all 'vmovd' with 64-bit registers to 'vmovq', but provide an alias so that 'vmovd' will still parse.

llvm-svn: 192171

10 years agoMove duplicate code in InputGraphs to the parent class.
Rui Ueyama [Tue, 8 Oct 2013 05:52:01 +0000 (05:52 +0000)]
Move duplicate code in InputGraphs to the parent class.

llvm-svn: 192170

10 years agoRename GnuLd's path() too.
Rui Ueyama [Tue, 8 Oct 2013 05:23:03 +0000 (05:23 +0000)]
Rename GnuLd's path() too.

llvm-svn: 192169

10 years agoclang-format: Improve constructor initializer linewrapping.
Daniel Jasper [Tue, 8 Oct 2013 05:11:18 +0000 (05:11 +0000)]
clang-format: Improve constructor initializer linewrapping.

Specifically make ConstructorInitializerAllOnOneLineOrOnePerLine work
nicely with BreakConstructorInitializersBeforeComma.

This fixes llvm.org/PR17395.

llvm-svn: 192168

10 years agoRename path() -> getPath().
Rui Ueyama [Tue, 8 Oct 2013 04:57:08 +0000 (04:57 +0000)]
Rename path() -> getPath().

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

llvm-svn: 192167

10 years agoFix linkage calculation of auto member functions returning lambdas
Faisal Vali [Tue, 8 Oct 2013 04:15:04 +0000 (04:15 +0000)]
Fix linkage calculation of auto member functions returning lambdas

As described by Richard in https://groups.google.com/a/isocpp.org/d/msg/std-discussion/S1kmj0wF5-g/fb6agEYoL2IJ

we should allow:

template<typename S>
struct A {

template<typename T> static auto default_lambda() {
  return [](const T&) { return 42; };
}

template<class U = decltype(default_lambda<S>())>
  U func(U u = default_lambda<S>()) { return u; }

};

int run2 = A<double>{}.func()(3.14);

int run3 = A<char>{}.func()('a');

This patch allows the code using the same trickery that was used to allow the code in non-member functions at namespace scope.

Please see http://llvm-reviews.chandlerc.com/D1844 for richard's approval.

llvm-svn: 192166

10 years agoUse size_t instead of uint64_t to represent the vector length.
Rui Ueyama [Tue, 8 Oct 2013 03:59:50 +0000 (03:59 +0000)]
Use size_t instead of uint64_t to represent the vector length.

llvm-svn: 192165

10 years agoRemove an unnecessary local variable.
Rui Ueyama [Tue, 8 Oct 2013 03:59:48 +0000 (03:59 +0000)]
Remove an unnecessary local variable.

llvm-svn: 192164

10 years agoMake bitmask an unsigned type.
Rui Ueyama [Tue, 8 Oct 2013 03:59:45 +0000 (03:59 +0000)]
Make bitmask an unsigned type.

llvm-svn: 192163

10 years agoExpand auto for readability.
Rui Ueyama [Tue, 8 Oct 2013 03:59:42 +0000 (03:59 +0000)]
Expand auto for readability.

llvm-svn: 192162

10 years agoAdd entries for arm6m to ArchSpec's g_macho_arch_entries.
Jason Molenda [Tue, 8 Oct 2013 03:01:08 +0000 (03:01 +0000)]
Add entries for arm6m to ArchSpec's g_macho_arch_entries.
<rdar://problem/15099306>

llvm-svn: 192161

10 years ago[Sparc] Do not hardcode nop in the delay slot of TLS_CALL. Use DelaySlotFiller to...
Venkatraman Govindaraju [Tue, 8 Oct 2013 02:50:29 +0000 (02:50 +0000)]
[Sparc] Do not hardcode nop in the delay slot of TLS_CALL. Use DelaySlotFiller to fill the delay slot instead.

llvm-svn: 192160

10 years agoClarify how to handle a thread register context with a gap
Jason Molenda [Tue, 8 Oct 2013 02:42:39 +0000 (02:42 +0000)]
Clarify how to handle a thread register context with a gap
in the middle because of alignment rules.

llvm-svn: 192159

10 years agotypo.
Adrian Prantl [Tue, 8 Oct 2013 02:30:54 +0000 (02:30 +0000)]
typo.

llvm-svn: 192158

10 years agotypo.
Adrian Prantl [Tue, 8 Oct 2013 02:28:20 +0000 (02:28 +0000)]
typo.

llvm-svn: 192157

10 years agoReduce testcase from 1r92011.
Adrian Prantl [Tue, 8 Oct 2013 02:21:44 +0000 (02:21 +0000)]
Reduce testcase from 1r92011.

llvm-svn: 192156

10 years agoFix build break: clang no longer supports -ast-dump-xml.
Richard Smith [Tue, 8 Oct 2013 02:19:45 +0000 (02:19 +0000)]
Fix build break: clang no longer supports -ast-dump-xml.

llvm-svn: 192155

10 years agofix typos
Nick Kledzik [Tue, 8 Oct 2013 02:07:19 +0000 (02:07 +0000)]
fix typos

llvm-svn: 192154

10 years agofix all EXPECT_EQ(.address) tests
Nick Kledzik [Tue, 8 Oct 2013 01:27:03 +0000 (01:27 +0000)]
fix all EXPECT_EQ(.address) tests

llvm-svn: 192153

10 years agofix test case failing on bot
Nick Kledzik [Tue, 8 Oct 2013 01:12:35 +0000 (01:12 +0000)]
fix test case failing on bot

llvm-svn: 192152

10 years agoupdate mach-o EXPORT_SYMBOL_* names
Nick Kledzik [Tue, 8 Oct 2013 00:59:13 +0000 (00:59 +0000)]
update mach-o EXPORT_SYMBOL_* names

llvm-svn: 192151

10 years ago[ms-cxxabi] Fix the calling convention for operator new in records
Reid Kleckner [Tue, 8 Oct 2013 00:58:57 +0000 (00:58 +0000)]
[ms-cxxabi] Fix the calling convention for operator new in records

Summary:
Operator new, new[], delete, and delete[] are all implicitly static when
declared inside a record.  CXXMethodDecl already knows this, but we need
to account for that before we pick the calling convention for the
function type.

Fixes PR17371.

Reviewers: rsmith

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

llvm-svn: 192150

10 years agoAdd comments. Early return.
Rui Ueyama [Tue, 8 Oct 2013 00:43:53 +0000 (00:43 +0000)]
Add comments. Early return.

llvm-svn: 192149

10 years agoConvert error code structs to scoped enums.
Rui Ueyama [Tue, 8 Oct 2013 00:43:50 +0000 (00:43 +0000)]
Convert error code structs to scoped enums.

Summary:
The original code with enum "_" is intended to emulate scoped enums.
Now we have real scoped enums, so use it.

Reviewers: Bigcheese

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

llvm-svn: 192148

10 years agoSupoort mach-o encoded in yaml.
Nick Kledzik [Tue, 8 Oct 2013 00:43:34 +0000 (00:43 +0000)]
Supoort mach-o encoded in yaml.

This is the first step in how I plan to get mach-o object files support into
lld. We need to be able to test the mach-o Reader and Write on systems without
a mach-o tools. Therefore, we want to support a textual way (YAML) to represent
mach-o files.

MachONormalizedFile.h defines an in-memory abstraction of the content of mach-o
files. The in-memory data structures are always native endianess and always
use 64-bit sizes. That internal data structure can then be converted to or
from three different formats: 1) yaml (text) encoded mach-o, 2) binary mach-o
files, 3) lld Atoms.

This patch defines the internal model and uses YAML I/O to implement the
conversion to and from the model to yaml. The next patch will implement
the conversion from normalized to binary mach-o.

This patch includes unit tests to validate the yaml conversion APIs.

llvm-svn: 192147

10 years agoSema: Only merge typedef attributes if the previous decl is a typedef
Justin Bogner [Tue, 8 Oct 2013 00:19:09 +0000 (00:19 +0000)]
Sema: Only merge typedef attributes if the previous decl is a typedef

In r186373, we started merging attributes on typedefs, but this causes
us to try to merge attributes even if the previous declaration was not
a typedef.

Only merge the attributes if the previous decl was also a typedef.

Fixes rdar://problem/15044218

llvm-svn: 192146

10 years agoTBAA: use the same format for scalar TBAA and struct-path aware TBAA.
Manman Ren [Tue, 8 Oct 2013 00:08:49 +0000 (00:08 +0000)]
TBAA: use the same format for scalar TBAA and struct-path aware TBAA.

An updated version of r191586 with bug fix.

Struct-path aware TBAA generates tags to specify the access path,
while scalar TBAA only generates tags to scalar types.

We should not generate a TBAA tag with null being the first field. When
a TBAA type node is null, the tag should be null too. Make sure we
don't decorate an instruction with a null TBAA tag.

Added a testing case for the bug reported by Richard with -relaxed-aliasing
and -fsanitizer=thread.

llvm-svn: 192145

10 years agoSplit test to test -Wshadow with emmintrin.h more portable.
Ted Kremenek [Tue, 8 Oct 2013 00:03:41 +0000 (00:03 +0000)]
Split test to test -Wshadow with emmintrin.h more portable.

llvm-svn: 192144

10 years agoSuppress useless -Wshadow warning when using _mm* macros from emmintrin.h
Ted Kremenek [Mon, 7 Oct 2013 23:51:11 +0000 (23:51 +0000)]
Suppress useless -Wshadow warning when using _mm* macros from emmintrin.h

Fixes <rdar://problem/10679282>.

I'm not completely satisfied with this patch.  Sprinkling "diagnostic ignored"
_Pragmas throughout this file is gross, but I couldn't suppress
it for the entire file.

llvm-svn: 192143

10 years agoFix LWG Issue 2141: common_type trait produces reference types
Marshall Clow [Mon, 7 Oct 2013 23:43:33 +0000 (23:43 +0000)]
Fix LWG Issue 2141: common_type trait produces reference types

llvm-svn: 192142

10 years agoclang-cl: Accept and mostly ignore /vm*, /GF, /GF-, /Zm, and /bigobj
Reid Kleckner [Mon, 7 Oct 2013 23:19:01 +0000 (23:19 +0000)]
clang-cl: Accept and mostly ignore /vm*, /GF, /GF-, /Zm, and /bigobj

Patch by David Ziman!

llvm-svn: 192141

10 years agoAdd a triple to unbreak buildbots where size_t is not 'unsigned long'.
Richard Smith [Mon, 7 Oct 2013 22:58:25 +0000 (22:58 +0000)]
Add a triple to unbreak buildbots where size_t is not 'unsigned long'.

llvm-svn: 192140

10 years agocmake: don't set LLVM_COMPILER_IS_GCC_COMPATIBLE when using clang-cl
Hans Wennborg [Mon, 7 Oct 2013 22:03:23 +0000 (22:03 +0000)]
cmake: don't set LLVM_COMPILER_IS_GCC_COMPATIBLE when using clang-cl

Tip-of-tree CMake has become clang-cl aware [1]. In this case,
CMAKE_CXX_COMPILER_ID will still be Clang, but MSVC will be true.

[1] See http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3d8356d4

llvm-svn: 192139

10 years agoRename lld:*_error::_ -> lld:*_error::ErrorCode.
Rui Ueyama [Mon, 7 Oct 2013 21:58:51 +0000 (21:58 +0000)]
Rename lld:*_error::_ -> lld:*_error::ErrorCode.

Summary: Rename lld:*_error::_ -> lld:*_error::ErrorCode.

Reviewers: shankarke

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

llvm-svn: 192138

10 years agoWindows: Avoiding resizing, use uninitialized data() instead
David Majnemer [Mon, 7 Oct 2013 21:57:07 +0000 (21:57 +0000)]
Windows: Avoiding resizing, use uninitialized data() instead

This is ever-so faster but more importantly matches what we have elsewhere.

llvm-svn: 192137

10 years agolibcxxabi contains the runtime support for C++. But, as some folks have
Nick Kledzik [Mon, 7 Oct 2013 21:39:41 +0000 (21:39 +0000)]
libcxxabi contains the runtime support for C++.  But, as some folks have
realized, it is not complete.  It relies on some _Unwind_* functions to be
supplied by the OS. That means it cannot be ported to platforms that don’t
already have an unwinder.

Years ago Apple wrote its own unwinder for MacOSX and iOS.  To make libcxxabi
complete, Apple has decided the source code for its unwinder can be contributed
to the open source LLVM libcxxabi project, with a dual licensed under LLVM
and MIT license.

So, I’ve spent some time cleaning up the sources to make them conform with
LLVM style and to conditionalize the sources in a way that should make it
easier to port to other platforms.  The sources are in a separate "Unwind"
directory under "src" in libcxxabi.

Background:
Most architectures now use "zero cost" exceptions for C++.  The zero cost means
there are no extra instructions executed if no exceptions are thrown.  But if
an exception is thrown, the runtime must consult side tables and figure out how
to restore registers and "unwind" from the current stack frame to the catch
clause.  That ability to modify the stack frames and cause the thread to resume
in a catch clause with all registers restored properly is the main purpose
of the unwinder.

This unwinder has two levels of API.  The high level APIs are the _Unwind_*
functions which the cxa_* exception functions in libcxxabi require.  The low
level APIs are the unw_* functions which are an interface defined by the the
old HP libunwind project (which shares no code with this unwinder).

llvm-svn: 192136

10 years ago[mips] Test case for r192124.
Akira Hatanaka [Mon, 7 Oct 2013 21:32:57 +0000 (21:32 +0000)]
[mips] Test case for r192124.

llvm-svn: 192135

10 years agoMark tests failing on FreeBSD after r191996
Ed Maste [Mon, 7 Oct 2013 21:25:48 +0000 (21:25 +0000)]
Mark tests failing on FreeBSD after r191996

llvm-svn: 192134

10 years agoLoopVectorize: External uses must use the last value in a reduction cycle
Arnold Schwaighofer [Mon, 7 Oct 2013 21:05:43 +0000 (21:05 +0000)]
LoopVectorize: External uses must use the last value in a reduction cycle

Otherwise, we don't perform operations that would have been performed on
the scalar version.

Fixes PR17498.

llvm-svn: 192133

10 years agoxfail for gcc tests due to pr17499 (regressions due to r191966).
Ashok Thirumurthi [Mon, 7 Oct 2013 21:00:29 +0000 (21:00 +0000)]
xfail for gcc tests due to pr17499 (regressions due to r191966).

llvm-svn: 192132

10 years agoRemove -ast-dump-xml.
Richard Smith [Mon, 7 Oct 2013 20:56:34 +0000 (20:56 +0000)]
Remove -ast-dump-xml.

llvm-svn: 192131

10 years agoAdd Mips16 patterns for sign extend byte and sign extend halfword.
Reed Kotler [Mon, 7 Oct 2013 20:46:19 +0000 (20:46 +0000)]
Add Mips16 patterns for sign extend byte and sign extend halfword.

llvm-svn: 192130

10 years agoObjectiveC migrator: A typical implementation of
Fariborz Jahanian [Mon, 7 Oct 2013 20:41:53 +0000 (20:41 +0000)]
ObjectiveC migrator: A typical implementation of
'default' methods in Foundation does not
infer 'instancetype' for methods' result type.
// rdar://15145218

llvm-svn: 192129

10 years agoAdd support for WG21 N3599 (literal operator template for strings) as a GNU
Richard Smith [Mon, 7 Oct 2013 19:57:58 +0000 (19:57 +0000)]
Add support for WG21 N3599 (literal operator template for strings) as a GNU
extension. The GCC folks have decided to support this even though the standard
committee have not yet approved this feature.

Patch by Hristo Venev!

llvm-svn: 192128

10 years agoObjectiveC modern rewriter. Rewrite typedefs
Fariborz Jahanian [Mon, 7 Oct 2013 19:54:22 +0000 (19:54 +0000)]
ObjectiveC modern rewriter. Rewrite typedefs
declared locally in ObjectiveC containers.
// rdar://15143875

llvm-svn: 192127

10 years agoStruct byval: use the correct alignment for loads generated to load
Manman Ren [Mon, 7 Oct 2013 19:47:53 +0000 (19:47 +0000)]
Struct byval: use the correct alignment for loads generated to load
from struct byval to registers.

We used to pass 0 which means the alignment of PtrVT. Even when the alignment
of the struct is smaller than 4, the LOADs would have alignment of 4, and
further optimizations could combine the LOADs into a ldm, which would
cause crash.

The fix is to pass the alignment of the struct byval.

rdar://problem/15144402

llvm-svn: 192126

10 years ago[mips] Coding style clean up.
Akira Hatanaka [Mon, 7 Oct 2013 19:33:02 +0000 (19:33 +0000)]
[mips] Coding style clean up.

llvm-svn: 192125

10 years ago[mips] Disable tail merging when long branch pass is enabled.
Akira Hatanaka [Mon, 7 Oct 2013 19:13:53 +0000 (19:13 +0000)]
[mips] Disable tail merging when long branch pass is enabled.

llvm-svn: 192124

10 years agoX86: Fix type check. Just because an integer type is illegal doesn't mean it's i64.
Benjamin Kramer [Mon, 7 Oct 2013 19:11:35 +0000 (19:11 +0000)]
X86: Fix type check. Just because an integer type is illegal doesn't mean it's i64.

Fixes PR17495, where an i24 triggered this code. It's intended to
optimize i64 loads on 32 bit x86.

llvm-svn: 192123

10 years ago[mips] Define method MipsSubtarget::enableLongBranchPass.
Akira Hatanaka [Mon, 7 Oct 2013 19:06:57 +0000 (19:06 +0000)]
[mips] Define method MipsSubtarget::enableLongBranchPass.

llvm-svn: 192122

10 years agoRevert r191834 until we measure the effect of this benchmarks and maybe find a better...
Alexey Samsonov [Mon, 7 Oct 2013 19:03:24 +0000 (19:03 +0000)]
Revert r191834 until we measure the effect of this benchmarks and maybe find a better way to fix it

llvm-svn: 192121

10 years agoFix objectsize tests after r192117
Matt Arsenault [Mon, 7 Oct 2013 19:00:18 +0000 (19:00 +0000)]
Fix objectsize tests after r192117

llvm-svn: 192120