platform/upstream/llvm.git
10 years agoAdd decorator for recent FreeBSD failure
Ed Maste [Fri, 7 Mar 2014 14:50:29 +0000 (14:50 +0000)]
Add decorator for recent FreeBSD failure

llvm.org/pr19075

llvm-svn: 203245

10 years agoAdd missing std:: qualifiers.
Benjamin Kramer [Fri, 7 Mar 2014 14:50:15 +0000 (14:50 +0000)]
Add missing std:: qualifiers.

llvm-svn: 203244

10 years agoMake header standalone for libstdc++.
Benjamin Kramer [Fri, 7 Mar 2014 14:43:48 +0000 (14:43 +0000)]
Make header standalone for libstdc++.

llvm-svn: 203243

10 years ago[C++11] Replace LLVM-style type traits with C++11 standard ones.
Benjamin Kramer [Fri, 7 Mar 2014 14:42:25 +0000 (14:42 +0000)]
[C++11] Replace LLVM-style type traits with C++11 standard ones.

No functionality change.

llvm-svn: 203242

10 years ago[C++11] Replace LLVM-style type traits with C++11 standard ones.
Benjamin Kramer [Fri, 7 Mar 2014 14:30:23 +0000 (14:30 +0000)]
[C++11] Replace LLVM-style type traits with C++11 standard ones.

No functionality change.

llvm-svn: 203241

10 years ago[C++11] Replacing iterators ddiag_begin() and ddiag_end() with iterator_range ddiags...
Aaron Ballman [Fri, 7 Mar 2014 14:09:15 +0000 (14:09 +0000)]
[C++11] Replacing iterators ddiag_begin() and ddiag_end() with iterator_range ddiags(). Updating all of the usages of the iterators with range-based for loops.

llvm-svn: 203240

10 years ago[C++11] Updating getUsingDirectives to use iterator_range instead of a std::pair.
Aaron Ballman [Fri, 7 Mar 2014 13:44:44 +0000 (13:44 +0000)]
[C++11] Updating getUsingDirectives to use iterator_range instead of a std::pair.

llvm-svn: 203239

10 years agoRemove sanitizer_linux_libcdep.cc from TSan-Go build
Alexey Samsonov [Fri, 7 Mar 2014 13:17:32 +0000 (13:17 +0000)]
Remove sanitizer_linux_libcdep.cc from TSan-Go build

llvm-svn: 203238

10 years agoFully reverting r203236 -- it seems the only bots that are happy are the MSVC bots.
Aaron Ballman [Fri, 7 Mar 2014 13:13:38 +0000 (13:13 +0000)]
Fully reverting r203236 -- it seems the only bots that are happy are the MSVC bots.

llvm-svn: 203237

10 years ago[C++11] Replacing iterators attr_begin() and attr_end() with iterator_range attrs...
Aaron Ballman [Fri, 7 Mar 2014 12:50:00 +0000 (12:50 +0000)]
[C++11] Replacing iterators attr_begin() and attr_end() with iterator_range attrs(). Updating all of the usages of the iterators with range-based for loops.

llvm-svn: 203236

10 years ago[FreeBSD] Add support for sanitizer_linux_libcdep.cc
Alexey Samsonov [Fri, 7 Mar 2014 11:47:32 +0000 (11:47 +0000)]
[FreeBSD] Add support for sanitizer_linux_libcdep.cc

Patch by Viktor Kutuzov!

llvm-svn: 203235

10 years ago[SystemZ] Move sign_extend optimization to PerformDAGCombine
Richard Sandiford [Fri, 7 Mar 2014 11:34:35 +0000 (11:34 +0000)]
[SystemZ] Move sign_extend optimization to PerformDAGCombine

The target was marking SIGN_EXTEND as Custom because it wanted to optimize
certain sign-extended shifts.  In all other respects the extension is Legal,
so it'd be better to do the optimization in PerformDAGCombine instead.

No functional change intended.

llvm-svn: 203234

10 years agoDon't hold the ThreadList lock over calls to the GetStatus (Process or Thread) calls
Jim Ingham [Fri, 7 Mar 2014 11:20:03 +0000 (11:20 +0000)]
Don't hold the ThreadList lock over calls to the GetStatus (Process or Thread) calls
or the lower levels of the Process won't be able to restart.

<rdar://problem/16244835>

llvm-svn: 203233

10 years agoIf you are disabling a hardware breakpoint, use z1 not z0.
Jim Ingham [Fri, 7 Mar 2014 11:18:02 +0000 (11:18 +0000)]
If you are disabling a hardware breakpoint, use z1 not z0.

<rdar://problem/16256532>

llvm-svn: 203232

10 years agoThe ThreadPlanCallFunction needs to pass its "StopOthers" to its run to address subplan.
Jim Ingham [Fri, 7 Mar 2014 11:16:37 +0000 (11:16 +0000)]
The ThreadPlanCallFunction needs to pass its "StopOthers" to its run to address subplan.

llvm-svn: 203231

10 years agoCodeGenPrep: sink extends of illegal types into use block.
Tim Northover [Fri, 7 Mar 2014 11:04:30 +0000 (11:04 +0000)]
CodeGenPrep: sink extends of illegal types into use block.

This helps the instruction selector to lower an i64 * i64 -> i128
multiplication into a single instruction on targets which support it.

Patch by Manuel Jacob.

llvm-svn: 203230

10 years agoInstCombine: form shuffles from wider range of insert/extractelements
Tim Northover [Fri, 7 Mar 2014 10:24:44 +0000 (10:24 +0000)]
InstCombine: form shuffles from wider range of insert/extractelements

Sequences of insertelement/extractelements are sometimes used to build
vectorsr; this code tries to put them back together into shuffles, but
could only produce a completely uniform shuffle types (<N x T> from two
<N x T> sources).

This should allow shuffles with different numbers of elements on the
input and output sides as well.

llvm-svn: 203229

10 years agoRemove a test that we don't need anymore
Timur Iskhodzhanov [Fri, 7 Mar 2014 10:21:25 +0000 (10:21 +0000)]
Remove a test that we don't need anymore

llvm-svn: 203228

10 years ago[FreeBSD] Port sanitizers' syscalls.
Alexey Samsonov [Fri, 7 Mar 2014 10:03:54 +0000 (10:03 +0000)]
[FreeBSD] Port sanitizers' syscalls.

Patch by Viktor Kutuzov!

llvm-svn: 203227

10 years agotsan: fix pthread_cond_destroy interceptor on android
Dmitry Vyukov [Fri, 7 Mar 2014 10:01:16 +0000 (10:01 +0000)]
tsan: fix pthread_cond_destroy interceptor on android

llvm-svn: 203226

10 years ago[OPENMP] Fix for threadprivate construct instantiatiation.
Alexey Bataev [Fri, 7 Mar 2014 09:46:29 +0000 (09:46 +0000)]
[OPENMP] Fix for threadprivate construct instantiatiation.

llvm-svn: 203225

10 years ago[ASan] Better way to disable tests for functions unavailable on certain platforms
Alexey Samsonov [Fri, 7 Mar 2014 09:39:01 +0000 (09:39 +0000)]
[ASan] Better way to disable tests for functions unavailable on certain platforms

llvm-svn: 203224

10 years agoChange MCDisassembler::setSymbolizer to take unique_ptr by value.
Ahmed Charles [Fri, 7 Mar 2014 09:38:02 +0000 (09:38 +0000)]
Change MCDisassembler::setSymbolizer to take unique_ptr by value.

This changes the interface to be more explicit that ownership is being
transferred.

llvm-svn: 203223

10 years agoFix PR18967 -- Bad this adjustment for virtual methods in a diamond virtual inheritan...
Timur Iskhodzhanov [Fri, 7 Mar 2014 09:34:59 +0000 (09:34 +0000)]
Fix PR18967 -- Bad this adjustment for virtual methods in a diamond virtual inheritance hierarchy

llvm-svn: 203222

10 years agoRemove unused method.
Craig Topper [Fri, 7 Mar 2014 09:26:53 +0000 (09:26 +0000)]
Remove unused method.

llvm-svn: 203221

10 years ago[C++11] Add 'override' keyword to virtual methods that override their base class.
Craig Topper [Fri, 7 Mar 2014 09:26:03 +0000 (09:26 +0000)]
[C++11] Add 'override' keyword to virtual methods that override their base class.

llvm-svn: 203220

10 years agoExternalClangExamples: add a link to ToyClangPlugin
Dmitri Gribenko [Fri, 7 Mar 2014 09:06:12 +0000 (09:06 +0000)]
ExternalClangExamples: add a link to ToyClangPlugin

Patch by Alexey Denisov.

llvm-svn: 203219

10 years agoEnable FeatureFastUAMem for Silvermont processor
Alexey Volkov [Fri, 7 Mar 2014 09:03:49 +0000 (09:03 +0000)]
Enable FeatureFastUAMem for Silvermont processor

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

llvm-svn: 203218

10 years agoUpdate for clang r203213
Ben Langmuir [Fri, 7 Mar 2014 08:31:36 +0000 (08:31 +0000)]
Update for clang r203213

llvm-svn: 203217

10 years agoTest commit
Alexey Volkov [Fri, 7 Mar 2014 08:28:44 +0000 (08:28 +0000)]
Test commit
Removed whitespace

llvm-svn: 203216

10 years agoTweak some test paths to match on Windows
Ben Langmuir [Fri, 7 Mar 2014 08:15:35 +0000 (08:15 +0000)]
Tweak some test paths to match on Windows

llvm-svn: 203215

10 years ago[OPENMP] Small update in threadprivate variables processing to fix template instantia...
Alexey Bataev [Fri, 7 Mar 2014 08:03:37 +0000 (08:03 +0000)]
[OPENMP] Small update in threadprivate variables processing to fix template instantiation.

llvm-svn: 203214

10 years ago[Preprocessor] Pass TranslationUnitKind to the preprocessor and if it is TU_Prefix
Argyrios Kyrtzidis [Fri, 7 Mar 2014 07:47:58 +0000 (07:47 +0000)]
[Preprocessor] Pass TranslationUnitKind to the preprocessor and if it is TU_Prefix
avoid warning for unused macros.

rdar://15034698

llvm-svn: 203213

10 years ago[OPENMP] Fixed linked libraries for libiomp5 on Linux
Alexey Bataev [Fri, 7 Mar 2014 07:43:52 +0000 (07:43 +0000)]
[OPENMP] Fixed linked libraries for libiomp5 on Linux

llvm-svn: 203212

10 years agoMC: Remove superfluous section attribute flag definitions
David Majnemer [Fri, 7 Mar 2014 07:36:05 +0000 (07:36 +0000)]
MC: Remove superfluous section attribute flag definitions

Summary:
llvm/MC/MCSectionMachO.h and llvm/Support/MachO.h both had the same
definitions for the section flags.  Instead, grab the definitions out of
support.

No functionality change.

Reviewers: grosbach, Bigcheese, rafael

Reviewed By: rafael

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

llvm-svn: 203211

10 years agoAdd a bunch of missing changes from r203208
Ben Langmuir [Fri, 7 Mar 2014 07:27:49 +0000 (07:27 +0000)]
Add a bunch of missing changes from r203208

Somehow lost these in a git operation.

llvm-svn: 203210

10 years agoFix recent regressions in -Wreturn-type caused by heuristics to -Wunreachable-code.
Ted Kremenek [Fri, 7 Mar 2014 07:14:36 +0000 (07:14 +0000)]
Fix recent regressions in -Wreturn-type caused by heuristics to -Wunreachable-code.

I had forgotten that the same reachability code is used by both -Wreturn-type
and -Wunreachable-code, so the heuristics applied to the latter were indirectly
impacting the former.

To address this, the reachability code is more refactored so that whiled
the logic at its core is shared, the intention of the clients are better
captured and segregated in helper APIs.

Fixes PR19074, and also some false positives reported offline to me
by Nick Lewycky.

llvm-svn: 203209

10 years agoAdd dependencies from imported modules with -MD
Ben Langmuir [Fri, 7 Mar 2014 06:40:32 +0000 (06:40 +0000)]
Add dependencies from imported modules with -MD

Add module dependencies to the dependency files created by -MD/-MMD/etc.
by attaching an ASTReaderListener that will call into the dependency
file generator when a module input file is seen in the serialized AST.

llvm-svn: 203208

10 years agoTodd points out that my change to ProcessElfCore is probably
Jason Molenda [Fri, 7 Mar 2014 06:28:29 +0000 (06:28 +0000)]
Todd points out that my change to ProcessElfCore is probably
not going to key off of the ELF object file like I'd intended.
Revert my change in r203205; also revert Greg's change in
r203107 which builds ProcessElfCore on non-Linux/FreeBSD systems
for the moment until we can straighten this out.

llvm-svn: 203207

10 years ago[Typo] Fix sentence in CMake documentation.
Ahmed Charles [Fri, 7 Mar 2014 06:24:30 +0000 (06:24 +0000)]
[Typo] Fix sentence in CMake documentation.

llvm-svn: 203206

10 years agoOnly enable ProcessElfCore if this is an ELF file. Right now this plugin is winning...
Jason Molenda [Fri, 7 Mar 2014 06:15:24 +0000 (06:15 +0000)]
Only enable ProcessElfCore if this is an ELF file.  Right now this plugin is winning over
ProcessMachCore because it doesn't check the format of the file up front.  (this is only now
happening because of Greg's change in r203178 to build ProcessElfCore for non-Linux/FreeBSD
hosts).
<rdar://problem/16257533>

llvm-svn: 203205

10 years agoReplace PROLOG_LABEL with a new CFI_INSTRUCTION.
Rafael Espindola [Fri, 7 Mar 2014 06:08:31 +0000 (06:08 +0000)]
Replace PROLOG_LABEL with a new CFI_INSTRUCTION.

The old system was fairly convoluted:
* A temporary label was created.
* A single PROLOG_LABEL was created with it.
* A few MCCFIInstructions were created with the same label.

The semantics were that the cfi instructions were mapped to the PROLOG_LABEL
via the temporary label. The output position was that of the PROLOG_LABEL.
The temporary label itself was used only for doing the mapping.

The new CFI_INSTRUCTION has a 1:1 mapping to MCCFIInstructions and points to
one by holding an index into the CFI instructions of this function.

I did consider removing MMI.getFrameInstructions completelly and having
CFI_INSTRUCTION own a MCCFIInstruction, but MCCFIInstructions have non
trivial constructors and destructors and are somewhat big, so the this setup
is probably better.

The net result is that we don't create temporary labels that are never used.

llvm-svn: 203204

10 years agoclang-format a bit of code to make the next patch easier to read.
Rafael Espindola [Fri, 7 Mar 2014 05:32:03 +0000 (05:32 +0000)]
clang-format a bit of code to make the next patch easier to read.

llvm-svn: 203203

10 years agoSimplify. No functionality change.
Rafael Espindola [Fri, 7 Mar 2014 04:58:32 +0000 (04:58 +0000)]
Simplify. No functionality change.

llvm-svn: 203202

10 years ago[Mips] Removed extra space. Thanks to dexonsmith's eagle eye.
Simon Atanasyan [Fri, 7 Mar 2014 04:50:53 +0000 (04:50 +0000)]
[Mips] Removed extra space. Thanks to dexonsmith's eagle eye.

llvm-svn: 203201

10 years agoReplace uses of OwningPtr<T> with std::unique_ptr<T>.
Ahmed Charles [Fri, 7 Mar 2014 04:45:22 +0000 (04:45 +0000)]
Replace uses of OwningPtr<T> with std::unique_ptr<T>.

llvm-svn: 203200

10 years agoSimplify. No functionality change.
Rafael Espindola [Fri, 7 Mar 2014 04:45:03 +0000 (04:45 +0000)]
Simplify. No functionality change.

llvm-svn: 203199

10 years agoAllow constant folding of round function whenever feasible
Karthik Bhat [Fri, 7 Mar 2014 04:36:21 +0000 (04:36 +0000)]
Allow constant folding of round function whenever feasible

llvm-svn: 203198

10 years agoAdd missing "[unnamed_addr]" to LangRef.rst#functions.
Rafael Espindola [Fri, 7 Mar 2014 04:28:28 +0000 (04:28 +0000)]
Add missing "[unnamed_addr]" to LangRef.rst#functions.

Patch by Manuel Jacob.

llvm-svn: 203197

10 years agoAnother one fix for getSema()/getDerived().getSema()
Alexey Bataev [Fri, 7 Mar 2014 04:16:48 +0000 (04:16 +0000)]
Another one fix for getSema()/getDerived().getSema()

llvm-svn: 203196

10 years agoFixed getSema()/getDerived().getSema() diff pointed by Hal Finkel.
Alexey Bataev [Fri, 7 Mar 2014 04:01:56 +0000 (04:01 +0000)]
Fixed getSema()/getDerived().getSema() diff pointed by Hal Finkel.

llvm-svn: 203195

10 years ago[-Wunreachable-code] Correctly expand artificial reachability to pruned '&&' and...
Ted Kremenek [Fri, 7 Mar 2014 02:25:53 +0000 (02:25 +0000)]
[-Wunreachable-code] Correctly expand artificial reachability to pruned '&&' and '||' branches involving configuration values.

llvm-svn: 203194

10 years ago[-Wunreachable-code] Teach reachable code analysis heuristics about more literal...
Ted Kremenek [Fri, 7 Mar 2014 02:25:50 +0000 (02:25 +0000)]
[-Wunreachable-code] Teach reachable code analysis heuristics about more literal types.

llvm-svn: 203193

10 years agoDebugInfo: Limit r203187 to non-darwin as lldb can't handle this yet
David Blaikie [Fri, 7 Mar 2014 02:19:41 +0000 (02:19 +0000)]
DebugInfo: Limit r203187 to non-darwin as lldb can't handle this yet

llvm-svn: 203192

10 years agoMove some dwarf emission routines to AsmPrinterDwarf.cpp.
Eric Christopher [Fri, 7 Mar 2014 01:44:14 +0000 (01:44 +0000)]
Move some dwarf emission routines to AsmPrinterDwarf.cpp.

llvm-svn: 203191

10 years ago80-column fixups.
Eric Christopher [Fri, 7 Mar 2014 01:44:12 +0000 (01:44 +0000)]
80-column fixups.

llvm-svn: 203190

10 years ago[docs] Option parsing driver work is pretty much done.
Michael J. Spencer [Fri, 7 Mar 2014 01:42:35 +0000 (01:42 +0000)]
[docs] Option parsing driver work is pretty much done.

llvm-svn: 203189

10 years ago[docs] Update current status.
Michael J. Spencer [Fri, 7 Mar 2014 01:42:19 +0000 (01:42 +0000)]
[docs] Update current status.

llvm-svn: 203188

10 years agoDebugInfo: Emit DW_TAG_subprogram's DW_AT_high_pc as an offset from the low_pc
David Blaikie [Fri, 7 Mar 2014 01:30:55 +0000 (01:30 +0000)]
DebugInfo: Emit DW_TAG_subprogram's DW_AT_high_pc as an offset from the low_pc

This removes a relocation from each subprogram, reducing link times,
etc.

llvm-svn: 203187

10 years agoDebugInfo: Refactor test to not rely on fixed DIE offsets
David Blaikie [Fri, 7 Mar 2014 01:19:31 +0000 (01:19 +0000)]
DebugInfo: Refactor test to not rely on fixed DIE offsets

llvm-svn: 203186

10 years agoAllow line numbers to be shown in multi-line expressions.
Greg Clayton [Fri, 7 Mar 2014 00:53:24 +0000 (00:53 +0000)]
Allow line numbers to be shown in multi-line expressions.

llvm-svn: 203185

10 years agoDebugInfo: Improve test to not depend on the specific naming of temporary symbols
David Blaikie [Fri, 7 Mar 2014 00:23:38 +0000 (00:23 +0000)]
DebugInfo: Improve test to not depend on the specific naming of temporary symbols

llvm-svn: 203184

10 years agoThe Visual Studio IDE changed behavior in VS2012. It used to be the case that
Yunzhong Gao [Fri, 7 Mar 2014 00:23:36 +0000 (00:23 +0000)]
The Visual Studio IDE changed behavior in VS2012. It used to be the case that
the clang diagnostic has to report a column number one less than the correct
value in order for the IDE to move the cursor to the expected location. This
behavior is changed in VS2012 and VS2013 so that the IDE is now expecting the
column number to match the actual source location.
  Before: source(line, column-1): type: message
  After: source(line, column): type: message

This patch changes -fdiagnostics-format=msvc to match the new VS2012 and VS2013
when fmsc-version is 1700 or greater.

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

llvm-svn: 203183

10 years agoPartial revert of r203179. The build bots are telling me that some out-of-tree builds...
Aaron Ballman [Fri, 7 Mar 2014 00:10:58 +0000 (00:10 +0000)]
Partial revert of r203179. The build bots are telling me that some out-of-tree builds are using redecls_begin()/redecls_end(), so adding some machinery back in to support them.

llvm-svn: 203182

10 years agoAdd iterator_range support for MachineInstr's operand and memoperand iterators.
Owen Anderson [Fri, 7 Mar 2014 00:08:57 +0000 (00:08 +0000)]
Add iterator_range support for MachineInstr's operand and memoperand iterators.

llvm-svn: 203181

10 years agoThis commit provides support for running the dosep.ty test driver with multiple threads.
Steve Pucci [Fri, 7 Mar 2014 00:01:11 +0000 (00:01 +0000)]
This commit provides support for running the dosep.ty test driver with multiple threads.

It speeds up running the full test suite on my HP z620 Ubuntu machine with 32 hyperthreaded CPUs from 11 minutes to about 1m13s (about 9x).

The default behavior is to run single-threaded as before.  If the environment variable LLDB_TEST_THREADS is set, a Python work queue is set up with that many worker threads.

To avoid collisions within a test directory where multiple tests make use of the same prebuilt executable, the unit of work for the worker threads is a single directory (that is, all tests within a directory are processed in the normal serial way by a single thread).

tfiala & I have run this way a number of times; the only issue I found was that the TestProcessAttach.py test failed once, when attempting to attach to the process "a.out" by name.  I assume this is because some other thread was running an executable of that name at the same time, and we were attempting to attach to the wrong one, so I changed that test to use a different executable name (that change is also included in this commit).

llvm-svn: 203180

10 years ago[C++11] Replacing iterators redecls_begin() and redecls_end() with iterator_range...
Aaron Ballman [Thu, 6 Mar 2014 23:45:36 +0000 (23:45 +0000)]
[C++11] Replacing iterators redecls_begin() and redecls_end() with iterator_range redecls(). Updating all of the usages of the iterators with range-based for loops, which allows the begin/end forms to be removed entirely.

llvm-svn: 203179

10 years agoRe-enable the JITLoaderGDB and ProcessElfCore that were disabled by:
Greg Clayton [Thu, 6 Mar 2014 23:29:58 +0000 (23:29 +0000)]
Re-enable the JITLoaderGDB and ProcessElfCore that were disabled by:

Author: ace2001ac
Date: Thu Mar  6 05:30:34 2014
New Revision: 203107

URL: http://llvm.org/viewvc/llvm-project?rev=203107&view=rev
Log:
Fix Windows build break introduced in r203035.

Add '#if defined(__linux__) || defined(__FreeBSD__)' around JITLoaderGDB
and ProcessElfCore, which are only built on Linux and FreeBSD.

Modified:
   lldb/trunk/source/lldb.cpp

Windows will need to start building all files necessary so that JITLoaderGDB and ProcessElfCore can build since they should work on all platforms.

llvm-svn: 203178

10 years agoGet rid of lldb-dll-export.h and place the smarts of this into lldb-defines.h.
Greg Clayton [Thu, 6 Mar 2014 23:11:53 +0000 (23:11 +0000)]
Get rid of lldb-dll-export.h and place the smarts of this into lldb-defines.h.

Please do not add header files that are required in public APIs without first checking with us. This broke the LLDB builds at Apple because the lldb-dll-export.h wasn't included in the LLDB.framework and it was being included by public API header files.

llvm-svn: 203177

10 years agoReapply "MC: simplify object file selection for Windows"
Saleem Abdulrasool [Thu, 6 Mar 2014 23:02:15 +0000 (23:02 +0000)]
Reapply "MC: simplify object file selection for Windows"

That was overly aggressive in assuming that we could always assume COFF.  Some
of the tests assume that they will get ELF rather than COFF even on Windows
where the default is COFF.

llvm-svn: 203176

10 years agoC. Compare vector sizes using their raw element size instead of
Fariborz Jahanian [Thu, 6 Mar 2014 22:47:09 +0000 (22:47 +0000)]
C. Compare vector sizes using their raw element size instead of
getTypeSize (which rounds up sizes) in order to issue diagnostics
when casting to mismatched vector sizes; instead of crashing in IRGen.
// rdar:// 16196902. Reviewed offline by John McCall.

llvm-svn: 203175

10 years agoRemove shouldEmitUsedDirectiveFor.
Rafael Espindola [Thu, 6 Mar 2014 22:47:08 +0000 (22:47 +0000)]
Remove shouldEmitUsedDirectiveFor.

Clang now uses llvm.compiler.used for these cases.

llvm-svn: 203174

10 years agoConvert test to FileCheck.
Rafael Espindola [Thu, 6 Mar 2014 22:21:43 +0000 (22:21 +0000)]
Convert test to FileCheck.

llvm-svn: 203173

10 years agoUse llvm.compiler.used instead of llvm.used for objc symbols.
Rafael Espindola [Thu, 6 Mar 2014 22:15:10 +0000 (22:15 +0000)]
Use llvm.compiler.used instead of llvm.used for objc symbols.

LLVM currently has a hack (shouldEmitUsedDirectiveFor) that causes it to not
print no_dead_strip for symbols starting with 'l' or 'L'. These are exactly the
ones that the clang's objc codegen is producing. The net result, is that it is
equivalent to llvm.compiler.used.

The need for putting the private symbol in llvm.compiler.used should be clear
(the objc runtime uses them). The reason for also putting the weak symbols in
it is for LTO: ld64 will not ask us to preserve the it.

llvm-svn: 203172

10 years agoRemove unreachable 'return true' always dominated by 'return Error' or 'return false'.
Ted Kremenek [Thu, 6 Mar 2014 22:13:17 +0000 (22:13 +0000)]
Remove unreachable 'return true' always dominated by 'return Error' or 'return false'.

llvm-svn: 203171

10 years agoMake the test a bit stronger by showing what is added to llvm.used.
Rafael Espindola [Thu, 6 Mar 2014 22:02:16 +0000 (22:02 +0000)]
Make the test a bit stronger by showing what is added to llvm.used.

llvm-svn: 203170

10 years agoRemove a dead store, add a FIXME for another.
Richard Smith [Thu, 6 Mar 2014 21:59:38 +0000 (21:59 +0000)]
Remove a dead store, add a FIXME for another.

llvm-svn: 203169

10 years agoExclude invalid old decl from mismatching linkage assertion
Ismail Pazarbasi [Thu, 6 Mar 2014 21:48:45 +0000 (21:48 +0000)]
Exclude invalid old decl from mismatching linkage assertion

This patch fixes PR18964. In linkage computation, assertion fails when
an old invalid declaration's linkage mismatches with the current
decl's one.

llvm-svn: 203168

10 years agoRemove dead code I introduced 6 years, 4 months ago in r43518.
Ted Kremenek [Thu, 6 Mar 2014 21:42:43 +0000 (21:42 +0000)]
Remove dead code I introduced 6 years, 4 months ago in r43518.

Found by -Wunreachable-code.

llvm-svn: 203167

10 years agoPGO: rename profile data files from .pgodata to .profdata.
Bob Wilson [Thu, 6 Mar 2014 21:36:04 +0000 (21:36 +0000)]
PGO: rename profile data files from .pgodata to .profdata.

These tests were added before we had settled on using a .profdata extension
for the profile data files. Renaming them now for consistency.

llvm-svn: 203166

10 years agoPGO: rename FileCheck variable to follow the existing convention.
Bob Wilson [Thu, 6 Mar 2014 21:35:59 +0000 (21:35 +0000)]
PGO: rename FileCheck variable to follow the existing convention.

I added this "STF" variable without noticing that all the other counter names
end with a "C". Renaming it to "STC" for consistency.

llvm-svn: 203165

10 years agoAdd "override" and remove "virtual" where appropriate.
Rui Ueyama [Thu, 6 Mar 2014 21:14:04 +0000 (21:14 +0000)]
Add "override" and remove "virtual" where appropriate.

For the record, I used clang-modernize to add "override" and perl to remove
"virtual".

llvm-svn: 203164

10 years agoremove unused code
Sebastian Pop [Thu, 6 Mar 2014 20:59:18 +0000 (20:59 +0000)]
remove unused code

llvm-svn: 203163

10 years ago[Support/LockFileManager] Re-apply r203137 and r203138 but use symbolic links only...
Argyrios Kyrtzidis [Thu, 6 Mar 2014 20:53:58 +0000 (20:53 +0000)]
[Support/LockFileManager] Re-apply r203137 and r203138 but use symbolic links only on unix.

Reid Kleckner pointed out that we can't use symbolic links on Windows.

llvm-svn: 203162

10 years agoUpdate for LLVM API change
Saleem Abdulrasool [Thu, 6 Mar 2014 20:47:19 +0000 (20:47 +0000)]
Update for LLVM API change

Use the new getObjectFormat/setObjectFormat instead of Environment now that the
file format is a separate field.

llvm-svn: 203161

10 years agoSupport: split object format out of environment
Saleem Abdulrasool [Thu, 6 Mar 2014 20:47:11 +0000 (20:47 +0000)]
Support: split object format out of environment

This is a preliminary setup change to support a renaming of Windows target
triples.  Split the object file format information out of the environment into a
separate entity.  Unfortunately, file format was previously treated as an
environment with an unknown OS.  This is most obvious in the ARM subtarget where
the handling for macho on an arbitrary platform switches to AAPCS rather than
APCS (as per Apple's needs).

llvm-svn: 203160

10 years agoMC: simplify object file selection for Windows
Saleem Abdulrasool [Thu, 6 Mar 2014 20:47:03 +0000 (20:47 +0000)]
MC: simplify object file selection for Windows

Windows always uses COFF unless Windows ELF is in use.  Rather than checking if
Windows, MinGW, or Cygwin is being targeted, just check if the target OS is
windows and that it is not an ELF environment.

llvm-svn: 203159

10 years ago[docs] s/cpp11-migrate/clang-modernize/
Rui Ueyama [Thu, 6 Mar 2014 20:30:05 +0000 (20:30 +0000)]
[docs] s/cpp11-migrate/clang-modernize/

llvm-svn: 203158

10 years agoPGO: Add support for Objective-C blocks.
Bob Wilson [Thu, 6 Mar 2014 20:24:27 +0000 (20:24 +0000)]
PGO: Add support for Objective-C blocks.

llvm-svn: 203157

10 years ago[X86] Teach the DAGCombiner how to fold a OR of two shufflevector nodes.
Andrea Di Biagio [Thu, 6 Mar 2014 20:19:52 +0000 (20:19 +0000)]
[X86] Teach the DAGCombiner how to fold a OR of two shufflevector nodes.

This patch teaches the DAGCombiner how to fold a binary OR between two
shufflevector into a single shuffle vector when possible.

The rules are:
  1. fold (or (shuf A, V_0, MA), (shuf B, V_0, MB)) -> (shuf A, B, Mask1)
  2. fold (or (shuf A, V_0, MA), (shuf B, V_0, MB)) -> (shuf B, A, Mask2)

The DAGCombiner can take advantage of the fact that OR is commutative and
compute two possible shuffle masks (Mask1 and Mask2) for the resulting
shuffle node.

Before folding a dag according to either rule 1 or 2, DAGCombiner verifies
that the resulting shuffle mask is legal for the target.
DAGCombiner would firstly try to fold according to 1.; If not possible
then it will try to fold according to 2.
If both Mask1 and Mask2 are illegal then we conservatively don't fold
the OR instruction.

llvm-svn: 203156

10 years agoFix warning about mismatched signs in comparison.
Rafael Espindola [Thu, 6 Mar 2014 20:16:24 +0000 (20:16 +0000)]
Fix warning about mismatched signs in comparison.

llvm-svn: 203155

10 years agoFix the printing of n_type.
Rafael Espindola [Thu, 6 Mar 2014 20:13:41 +0000 (20:13 +0000)]
Fix the printing of n_type.

Despite the name, n_type contains the type of the symbol, but also if it is
extern or private extern.

llvm-svn: 203154

10 years agoFix dead store and simplify. No functionality change (although the code is now
Richard Smith [Thu, 6 Mar 2014 20:00:05 +0000 (20:00 +0000)]
Fix dead store and simplify. No functionality change (although the code is now
correct if MaxEditDistance were increased to something greater than 1).

llvm-svn: 203153

10 years agoUse the existing N_STAB from the MachO namespace.
Rafael Espindola [Thu, 6 Mar 2014 19:58:56 +0000 (19:58 +0000)]
Use the existing N_STAB from the MachO namespace.

llvm-svn: 203152

10 years agoMS ABI: Disambiguate the manglings for global guard variables
David Majnemer [Thu, 6 Mar 2014 19:57:36 +0000 (19:57 +0000)]
MS ABI: Disambiguate the manglings for global guard variables

If a guard variable will be created for an entity at global scope,
then we cannot rely on the scope depth to disambiguate names for us.

Instead, mangle the entire variable into the guard to ensure it's uniqueness.

llvm-svn: 203151

10 years agoConstify a few things with DotDebugLocEntry.
Eric Christopher [Thu, 6 Mar 2014 19:51:16 +0000 (19:51 +0000)]
Constify a few things with DotDebugLocEntry.

llvm-svn: 203150

10 years agoBased on usage, the NamedDecl is always set when constructing a CallingContext, but...
Aaron Ballman [Thu, 6 Mar 2014 19:37:24 +0000 (19:37 +0000)]
Based on usage, the NamedDecl is always set when constructing a CallingContext, but none of the other optional parameters are. Removing the optional parameters, and making the NamedDecl required.

No functional changes intended.

llvm-svn: 203149

10 years agoRefactored to use a simple helper function that wraps the logic of creating an SExprN...
Aaron Ballman [Thu, 6 Mar 2014 19:25:11 +0000 (19:25 +0000)]
Refactored to use a simple helper function that wraps the logic of creating an SExprNode and returning the position in which it was inserted.

No functional change intended.

llvm-svn: 203148

10 years agoAdd tests for MS inline asm change r203146
Reid Kleckner [Thu, 6 Mar 2014 19:19:36 +0000 (19:19 +0000)]
Add tests for MS inline asm change r203146

llvm-svn: 203147

10 years agoMS asm: The initial dot in struct access is optional
Reid Kleckner [Thu, 6 Mar 2014 19:19:12 +0000 (19:19 +0000)]
MS asm: The initial dot in struct access is optional

Fixes PR18994.

Tests, once again, in that other repository.  =P

llvm-svn: 203146