platform/upstream/llvm.git
8 years agoRemove a redundant cast.
Rafael Espindola [Fri, 11 Mar 2016 13:17:15 +0000 (13:17 +0000)]
Remove a redundant cast.

llvm-svn: 263230

8 years ago[mips] MIPSR6 Instruction itineraries
Vasileios Kalintiris [Fri, 11 Mar 2016 13:05:06 +0000 (13:05 +0000)]
[mips] MIPSR6 Instruction itineraries

Summary: Defines instruction itineraries for common MIPSR6 instructions.

Patch by Simon Dardis.

Reviewers: vkalintiris

Subscribers: MatzeB, dsanders, llvm-commits

Differential Revision: http://reviews.llvm.org/D17198

llvm-svn: 263229

8 years agoSimplify now that local symbols can use getVA.
Rafael Espindola [Fri, 11 Mar 2016 13:04:28 +0000 (13:04 +0000)]
Simplify now that local symbols can use getVA.

It is really odd that Mips differentiates symbols that are born local
and those that become local because of hidden visibility. I don't know
enough mips to known if this is a bug or not.

llvm-svn: 263228

8 years ago[ELF] - Early continue in InputSectionBase<ELFT>::relocate(). NFC.
George Rimar [Fri, 11 Mar 2016 12:57:52 +0000 (12:57 +0000)]
[ELF] - Early continue in InputSectionBase<ELFT>::relocate(). NFC.

llvm-svn: 263227

8 years ago[ELF] - Evaluate addend earlier and use it instead getAddend() calls. NFC.
George Rimar [Fri, 11 Mar 2016 12:53:17 +0000 (12:53 +0000)]
[ELF] - Evaluate addend earlier and use it instead getAddend() calls. NFC.

llvm-svn: 263226

8 years agoCompute value of local symbol with getVA.
Rafael Espindola [Fri, 11 Mar 2016 12:19:05 +0000 (12:19 +0000)]
Compute value of local symbol with getVA.

llvm-svn: 263225

8 years agoRemember the input section of locals.
Rafael Espindola [Fri, 11 Mar 2016 12:14:02 +0000 (12:14 +0000)]
Remember the input section of locals.

This is already a simplification, but will allow much more.

llvm-svn: 263224

8 years ago[PM] Update Kaleidoscope with the new header file.
Chandler Carruth [Fri, 11 Mar 2016 12:10:15 +0000 (12:10 +0000)]
[PM] Update Kaleidoscope with the new header file.

llvm-svn: 263223

8 years agoCreate a SymbolBody for locals.
Rafael Espindola [Fri, 11 Mar 2016 12:06:30 +0000 (12:06 +0000)]
Create a SymbolBody for locals.

pr26878 shows a case where locals have to be in the got.

llvm-svn: 263222

8 years ago[clang-tidy] Make 'modernize-use-nullptr' check ignores NULL marcos used in other...
Haojian Wu [Fri, 11 Mar 2016 11:40:08 +0000 (11:40 +0000)]
[clang-tidy] Make 'modernize-use-nullptr' check ignores NULL marcos used in other macros.

Reviewers: bkramer, alexfh

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D17958

llvm-svn: 263221

8 years ago[mips] Range check simm4.
Daniel Sanders [Fri, 11 Mar 2016 11:37:50 +0000 (11:37 +0000)]
[mips] Range check simm4.

Summary:

Reviewers: vkalintiris

Subscribers: dsanders, llvm-commits

Differential Revision: http://reviews.llvm.org/D16811

llvm-svn: 263220

8 years ago[PM] Make the AnalysisManager parameter to run methods a reference.
Chandler Carruth [Fri, 11 Mar 2016 11:05:24 +0000 (11:05 +0000)]
[PM] Make the AnalysisManager parameter to run methods a reference.

This was originally a pointer to support pass managers which didn't use
AnalysisManagers. However, that doesn't realistically come up much and
the complexity of supporting it doesn't really make sense.

In fact, *many* parts of the pass manager were just assuming the pointer
was never null already. This at least makes it much more explicit and
clear.

llvm-svn: 263219

8 years ago[Sanitizer][MIPS] internal lstat and fstat for mips64
Mohit K. Bhakkad [Fri, 11 Mar 2016 10:51:03 +0000 (10:51 +0000)]
[Sanitizer][MIPS] internal lstat and fstat for mips64

Reviewers: dvyukov

Subscribers: jaydeep, sagar, llvm-commits

Differential Revision: http://reviews.llvm.org/D18078

llvm-svn: 263218

8 years ago[PM] Rename the CRTP mixin base classes for the new pass manager to
Chandler Carruth [Fri, 11 Mar 2016 10:33:22 +0000 (10:33 +0000)]
[PM] Rename the CRTP mixin base classes for the new pass manager to
clarify their purpose.

Firstly, call them "...Mixin" types so it is clear that there is no
type hierarchy being formed here. Secondly, use the term 'Info' to
clarify that they aren't adding any interesting *semantics* to the
passes or analyses, just exposing APIs used by the management layer to
get information about the pass or analysis.

Thanks to Manuel for helping pin down the naming confusion here and come
up with effective names to address it.

In case you already have some out-of-tree stuff, the following should be
roughly what you want to update:

  perl -pi -e 's/\b(Pass|Analysis)Base\b/\1InfoMixin/g'

llvm-svn: 263217

8 years ago[PM] Implement the final conclusion as to how the analysis IDs should
Chandler Carruth [Fri, 11 Mar 2016 10:22:49 +0000 (10:22 +0000)]
[PM] Implement the final conclusion as to how the analysis IDs should
work in the face of the limitations of DLLs and templated static
variables.

This requires passes that use the AnalysisBase mixin provide a static
variable themselves. So as to keep their APIs clean, I've made these
private and befriended the CRTP base class (which is the common
practice).

I've added documentation to AnalysisBase for why this is necessary and
at what point we can go back to the much simpler system.

This is clearly a better pattern than the extern template as it caught
*numerous* places where the template magic hadn't been applied and
things were "just working" but would eventually have broken
mysteriously.

llvm-svn: 263216

8 years ago[InstCombine] Use Twines to generate names.
Benjamin Kramer [Fri, 11 Mar 2016 10:20:56 +0000 (10:20 +0000)]
[InstCombine] Use Twines to generate names.

Since the names are used in a loop this does more work in debug builds. In
release builds value names are generally discarded so we don't have to do
the concatenation at all. It's also simpler code, no functional change
intended.

llvm-svn: 263215

8 years ago[ELF] - Move initSymbols() to Driver.cpp. NFC.
George Rimar [Fri, 11 Mar 2016 10:07:18 +0000 (10:07 +0000)]
[ELF] - Move initSymbols() to Driver.cpp. NFC.

That is followup for http://reviews.llvm.org/D18047
patch. initSymbols() moved to Driver.cpp and made static.

llvm-svn: 263214

8 years agoFix linux build after r263190
Ismail Donmez [Fri, 11 Mar 2016 09:55:06 +0000 (09:55 +0000)]
Fix linux build after r263190

llvm-svn: 263213

8 years ago[AMDGPU] Assembler: change v_madmk operands to have same order as mad.
Nikolay Haustov [Fri, 11 Mar 2016 09:27:25 +0000 (09:27 +0000)]
[AMDGPU] Assembler: change v_madmk operands to have same order as mad.

The constant is now at source operand 1 (previously at 2).
This is also how it is in legacy AMD sp3 assembler.
Update tests.

Differential Revision: http://reviews.llvm.org/D17984

llvm-svn: 263212

8 years ago[PM/AA] Teach the AAManager how to handle module analyses in addition to
Chandler Carruth [Fri, 11 Mar 2016 09:15:11 +0000 (09:15 +0000)]
[PM/AA] Teach the AAManager how to handle module analyses in addition to
function analyses, and use it to wire up globals-aa to the new pass
manager.

llvm-svn: 263211

8 years agoUpdate to include the new header file providing createGVNPass.
Chandler Carruth [Fri, 11 Mar 2016 09:02:43 +0000 (09:02 +0000)]
Update to include the new header file providing createGVNPass.

llvm-svn: 263210

8 years agoFix a bunch of signedness warnings in unittests
Pavel Labath [Fri, 11 Mar 2016 09:00:23 +0000 (09:00 +0000)]
Fix a bunch of signedness warnings in unittests

llvm-svn: 263209

8 years ago[PM] Port GVN to the new pass manager, wire it up, and teach a couple of
Chandler Carruth [Fri, 11 Mar 2016 08:50:55 +0000 (08:50 +0000)]
[PM] Port GVN to the new pass manager, wire it up, and teach a couple of
tests to run GVN in both modes.

This is mostly the boring refactoring just like SROA and other complex
transformation passes. There is some trickiness in that GVN's
ValueNumber class requires hand holding to get to compile cleanly. I'm
open to suggestions about a better pattern there, but I tried several
before settling on this. I was trying to balance my desire to sink as
much implementation detail into the source file as possible without
introducing overly many layers of abstraction.

Much like with SROA, the design of this system is made somewhat more
cumbersome by the need to support both pass managers without duplicating
the significant state and logic of the pass. The same compromise is
struck here.

I've also left a FIXME in a doxygen comment as the GVN pass seems to
have pretty woeful documentation within it. I'd like to submit this with
the FIXME and let those more deeply familiar backfill the information
here now that we have a nice place in an interface to put that kind of
documentaiton.

Differential Revision: http://reviews.llvm.org/D18019

llvm-svn: 263208

8 years agoFix a couple of cornercases in FileSpec + tests
Pavel Labath [Fri, 11 Mar 2016 08:44:44 +0000 (08:44 +0000)]
Fix a couple of cornercases in FileSpec + tests

Summary:
This fixes a couple of corner cases in FileSpec, related to AppendPathComponent and
handling of root directory (/) file spec. I add a bunch of unit tests for the new behavior.

Summary of changes:
FileSpec("/bar").GetCString(): before "//bar", after "/bar".
FileSpec("/").CopyByAppendingPathComponent("bar").GetCString(): before "//bar", after "/bar".
FileSpec("C:", ePathSyntaxWindows).CopyByAppendingPathComponent("bar").GetCString(): before "C:/bar", after "C:\bar".

Reviewers: clayborg, zturner

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D18044

llvm-svn: 263207

8 years agoAMDGPU: Don't use InstVisitor for AMDGPUPromoteAlloca
Matt Arsenault [Fri, 11 Mar 2016 08:20:50 +0000 (08:20 +0000)]
AMDGPU: Don't use InstVisitor for AMDGPUPromoteAlloca

Frontend authors are strongly encouraged to keep allocas
in the entry block, so don't bother visiting every instruction
in the other blocks of the function.

llvm-svn: 263206

8 years agoskip newly segfaulting test on OS X public CI
Todd Fiala [Fri, 11 Mar 2016 08:12:36 +0000 (08:12 +0000)]
skip newly segfaulting test on OS X public CI

llvm-svn: 263205

8 years agoAMDGPU: R600 code splitting cleanup
Matt Arsenault [Fri, 11 Mar 2016 08:00:27 +0000 (08:00 +0000)]
AMDGPU: R600 code splitting cleanup

Move a few functions only used by R600 to R600 specific code,
fix header macros to stop using R600, mark classes as final.

llvm-svn: 263204

8 years ago[mips] Invalid tests for MTC0, MTC2, MFC0, MFC2, DMTC0, DMFC0 MIPS instructions
Hrvoje Varga [Fri, 11 Mar 2016 08:00:11 +0000 (08:00 +0000)]
[mips] Invalid tests for MTC0, MTC2, MFC0, MFC2, DMTC0, DMFC0 MIPS instructions
Differential Revision: http://reviews.llvm.org/D18037

llvm-svn: 263203

8 years ago[OpenMP] NFC fix compilation warning about unused variable
Dmitry Polukhin [Fri, 11 Mar 2016 07:58:34 +0000 (07:58 +0000)]
[OpenMP] NFC fix compilation warning about unused variable

lib/Sema/SemaOpenMP.cpp:9243:13: warning: variable ‘IsRightMostExpression’ set but not used

llvm-svn: 263202

8 years agoAMDGPU: Materialize sign bits with bfrev
Matt Arsenault [Fri, 11 Mar 2016 07:42:49 +0000 (07:42 +0000)]
AMDGPU: Materialize sign bits with bfrev

If a constant is the same as the reverse of an inline immediate,
this is 4 bytes smaller than having to embed a 32-bit literal.

llvm-svn: 263201

8 years agoMinor code cleanups. NFC.
Junmo Park [Fri, 11 Mar 2016 07:05:32 +0000 (07:05 +0000)]
Minor code cleanups. NFC.

llvm-svn: 263200

8 years ago[Compiler-rt] Fix ioctl codes for MIPS in sanitizer_ioctl_test
Mohit K. Bhakkad [Fri, 11 Mar 2016 05:57:20 +0000 (05:57 +0000)]
[Compiler-rt] Fix ioctl codes for MIPS in sanitizer_ioctl_test

Reviewers: samsonov

Subscribers: jaydeep, sagar, llvm-commits

Differential Revision: http://reviews.llvm.org/D17985

llvm-svn: 263199

8 years agoFix indentation.
Sean Silva [Fri, 11 Mar 2016 05:48:04 +0000 (05:48 +0000)]
Fix indentation.

Somehow this slipped by in r263197. Thanks to Rui for noticing.

llvm-svn: 263198

8 years ago[lto] The previous testcase was not useful enough.
Sean Silva [Fri, 11 Mar 2016 05:42:34 +0000 (05:42 +0000)]
[lto] The previous testcase was not useful enough.

-shared was hiding the fact that the intrinsic wasn't being found.

llvm-svn: 263197

8 years agoMinor code cleanup. NFC.
Junmo Park [Fri, 11 Mar 2016 05:07:07 +0000 (05:07 +0000)]
Minor code cleanup. NFC.

llvm-svn: 263196

8 years agoFix ASan test cases after r263177
Alexey Samsonov [Fri, 11 Mar 2016 05:04:49 +0000 (05:04 +0000)]
Fix ASan test cases after r263177

llvm-svn: 263195

8 years agoRemoving the friend declaration was not a good idea.
John McCall [Fri, 11 Mar 2016 05:03:01 +0000 (05:03 +0000)]
Removing the friend declaration was not a good idea.

llvm-svn: 263194

8 years agoSpeculatively attempt to fix the MSVC build by making some
John McCall [Fri, 11 Mar 2016 04:55:21 +0000 (04:55 +0000)]
Speculatively attempt to fix the MSVC build by making some
methods non-private.

llvm-svn: 263193

8 years agoAdd a coerce-and-expand ABIArgInfo as a generalization of some
John McCall [Fri, 11 Mar 2016 04:30:43 +0000 (04:30 +0000)]
Add a coerce-and-expand ABIArgInfo as a generalization of some
of the things we do with Expand / Direct.

NFC for now, but this will be used by swiftcall expansion.

llvm-svn: 263192

8 years agoPreserve ExtParameterInfos into CGFunctionInfo.
John McCall [Fri, 11 Mar 2016 04:30:31 +0000 (04:30 +0000)]
Preserve ExtParameterInfos into CGFunctionInfo.

As part of this, make the function-arrangement interfaces
a little simpler and more semantic.

NFC.

llvm-svn: 263191

8 years agoELF: Add --thread option and partially parallelize writeTo().
Rui Ueyama [Fri, 11 Mar 2016 04:23:12 +0000 (04:23 +0000)]
ELF: Add --thread option and partially parallelize writeTo().

This patch adds --thread option and use parallel_for_each to write
sections in regular OutputSections.

This is the first patch to use more than one threads.

Note that --thread is off by default because it is experimental.
At this moment I still want to focus on single thread performance
because multi-threading is not a magic wand to fix performance
problems after all. It is generally very hard to make a slow program
faster by threads. Therefore, I want to make the linker as efficient
as possible first and then look for opportunity to make it even faster
using more than one core.

Here are some numbers to link programs with and without --threads
and using GNU gold. Numbers are in seconds.

Clang
  w/o --threads 0.697
  w --threads   0.528
  gold          1.643

Scylla
  w/o --threads 5.032
  w --threads   4.935
  gold          6.791

GNU gold
  w/o --threads 0.550
  w --threads   0.551
  gold          0.737

I limited the number of cores these processes can use to 4 using
perf command, so although my machine has 20 physical cores, the
performance gain I observed should be reproducible with a machine
which is not as beefy as mine.

llvm-svn: 263190

8 years agoRemove llvm::getDISubprogram in favor of Function::getSubprogram
Pete Cooper [Fri, 11 Mar 2016 02:14:16 +0000 (02:14 +0000)]
Remove llvm::getDISubprogram in favor of Function::getSubprogram

llvm::getDISubprogram walks the instructions in a function, looking for one in the scope of the current function, so that it can find the !dbg entry for the subprogram itself.

Now that !dbg is attached to functions, this should not be necessary. This patch changes all uses to just query the subprogram directly on the function.

Ideally this should be NFC, but in reality its possible that a function:

has no !dbg (in which case there's likely a bug somewhere in an opt pass), or
that none of the instructions had a scope referencing the function, so we used to not find the !dbg on the function but now we will

Reviewed by Duncan Exon Smith.

Differential Revision: http://reviews.llvm.org/D18074

llvm-svn: 263184

8 years agoFix SBDebugger.GetOutputFileHandle() on OS X.
Jim Ingham [Fri, 11 Mar 2016 01:57:45 +0000 (01:57 +0000)]
Fix SBDebugger.GetOutputFileHandle() on OS X.

The swig typemaps had some magic for output File *'s on OS X that made:

SBDebugger.GetOutputFileHandle()

actually work.  That was protected by a "#ifdef __MACOSX__", but the corresponding define
got lost going from the Darwin shell scripts to the python scripts for running
swig, so the code was elided.  I need to pass the define to SWIG, but only when
targetting Darwin.

So I added a target-platform argument to prepare_bindings, and if that
is Darwin, I pass -D__APPLE__ to swig, and that activates this code again, and
GetOutputFileHandle works again.  Note, I only pass that argument for the Xcode
build.  I'm sure it is possible to do that for cmake, but my cmake-foo is weak.

I should have been able to write a test for this by creating a debugger, setting the
output file handle to something file, writing to it, getting the output file handle
and reading it.  But SetOutputFileHandle doesn't seem to work from Python, so I'd
have to write a pexpect test to test this, which I'd rather not do.

llvm-svn: 263183

8 years ago[lto] Add a useful test case.
Sean Silva [Fri, 11 Mar 2016 01:10:37 +0000 (01:10 +0000)]
[lto] Add a useful test case.

This is reduced from an issue found in practice.
The original version of D18012 needed another patch to handle this, but
it now works since we are using a more correct GV->hasAppendingLinkage()
check that Rafael suggested.

This is what remains of that other patch.

llvm-svn: 263181

8 years ago[gold] Fix common symbols handling.
Evgeniy Stepanov [Fri, 11 Mar 2016 00:51:57 +0000 (00:51 +0000)]
[gold] Fix common symbols handling.

LLVM Gold plugin decides which instance of a common symbol it wants
based on the symbol size in claim_file_hook. If the file that
contains the chosen instance is later dropped from the link, we end
up with an undefined reference.

This change delays this decision until the set of the included files
is known.

llvm-svn: 263180

8 years ago[lto] Make sure that ctors are added to the combined module.
Sean Silva [Fri, 11 Mar 2016 00:50:05 +0000 (00:50 +0000)]
[lto] Make sure that ctors are added to the combined module.

Summary:
More generally, appending linkage is a special case that we don't want
to create a SymbolBody for.

Reviewers: rafael, ruiu

Subscribers: Bigcheese, llvm-commits, joker.eph

Differential Revision: http://reviews.llvm.org/D18012

llvm-svn: 263179

8 years agoTighten up this test a bit.
Sean Silva [Fri, 11 Mar 2016 00:48:36 +0000 (00:48 +0000)]
Tighten up this test a bit.

Thanks to Rafael to spotting this in the post-commit review of r263070.

llvm-svn: 263178

8 years ago[sanitizer] Add strlen to the common interceptors
Alexey Samsonov [Fri, 11 Mar 2016 00:45:49 +0000 (00:45 +0000)]
[sanitizer] Add strlen to the common interceptors

Summary:
Adds strlen to the common interceptors, under a new common flag
intercept_strlen.  This provides better sharing of interception code among
sanitizers and cleans up the inconsistent type declarations of the
previously duplicated interceptors.

Removes the now-duplicate strlen interceptor from asan, msan, and tsan.
The entry check semantics are normalized now for msan and asan, whose
private strlen interceptors contained multiple layers of checks that
included impossible-to-reach code.  The new semantics are identical to the
old: bypass interception if in the middle of init or if both on Mac and not
initialized; else, call the init routine and proceed.

Patch by Derek Bruening!

Reviewers: samsonov, vitalybuka

Subscribers: llvm-commits, kcc, zhaoqin

Differential Revision: http://reviews.llvm.org/D18020

llvm-svn: 263177

8 years ago[UBSan] Improve bufferization of UBSan error reports.
Alexey Samsonov [Fri, 11 Mar 2016 00:37:02 +0000 (00:37 +0000)]
[UBSan] Improve bufferization of UBSan error reports.

Summary:
Use InternalScopedString more extensively. This reduces the number of
write() syscalls, and reduces the chance that UBSan output will be
mixed with program output.

Reviewers: vitalybuka

Subscribers: kcc, llvm-commits

Differential Revision: http://reviews.llvm.org/D18068

llvm-svn: 263176

8 years agoAdd doxygen comments to avxintrin.h's intrinsics.
Ekaterina Romanova [Fri, 11 Mar 2016 00:05:54 +0000 (00:05 +0000)]
Add doxygen comments to avxintrin.h's intrinsics.
Only around 25% of the intrinsics in this file are documented here. The patches for the other half will be sent out later.

The doxygen comments are automatically generated based on Sony's intrinsics document.

I got an OK from Eric Christopher to commit doxygen comments without prior code review upstream.

llvm-svn: 263175

8 years agoFix Clang-tidy modernize-use-nullptr warnings in some files in source/Core; other...
Eugene Zelenko [Thu, 10 Mar 2016 23:57:12 +0000 (23:57 +0000)]
Fix Clang-tidy modernize-use-nullptr warnings in some files in source/Core; other minor fixes.

llvm-svn: 263174

8 years ago[LLE] Add missed LoopSimplify dependence
Adam Nemet [Thu, 10 Mar 2016 23:54:39 +0000 (23:54 +0000)]
[LLE] Add missed LoopSimplify dependence

The code assumed that we always had a preheader without making the pass
dependent on LoopSimplify.

Thanks to Mattias Eriksson V for reporting this.

llvm-svn: 263173

8 years agoPrint strict in Availability attribute when it is on.
Manman Ren [Thu, 10 Mar 2016 23:54:12 +0000 (23:54 +0000)]
Print strict in Availability attribute when it is on.

llvm-svn: 263172

8 years agoAdd has_feature objc_class_property.
Manman Ren [Thu, 10 Mar 2016 23:51:03 +0000 (23:51 +0000)]
Add has_feature objc_class_property.

rdar://23891898

llvm-svn: 263171

8 years agolibclang python bindings: Fix for bug 26394
Jonathan Coe [Thu, 10 Mar 2016 23:29:45 +0000 (23:29 +0000)]
libclang python bindings: Fix for bug 26394

Summary:
https://llvm.org/bugs/show_bug.cgi?id=26394 reports that clang's python bindings tests are failing.

I can confirm that the bug exists and that the proposed fix is good.

Differential Revision: http://reviews.llvm.org/D17226

llvm-svn: 263170

8 years agoAArch64: only try to use scaled fcvt ops on legal vector types.
Tim Northover [Thu, 10 Mar 2016 23:02:21 +0000 (23:02 +0000)]
AArch64: only try to use scaled fcvt ops on legal vector types.

Before we ended up calling getSimpleVectorType on a <3 x float>, which
asserted.

llvm-svn: 263169

8 years agoReenable asm-errors.c
Nico Weber [Thu, 10 Mar 2016 22:40:02 +0000 (22:40 +0000)]
Reenable asm-errors.c

r134811 made the test pass and reenabled it, but r134831
accidentally disabled it again due to a bad merge.

llvm-svn: 263168

8 years ago[x86] don't use a shuffle when a vselect will do; NFCI
Sanjay Patel [Thu, 10 Mar 2016 22:35:33 +0000 (22:35 +0000)]
[x86] don't use a shuffle when a vselect will do; NFCI

Looking at the IR definition of a masked load made me realize
there was no reason to use a shuffle here, so we don't need
to convert the format of the mask at all.

llvm-svn: 263167

8 years agoFixed ValueObject::GetExpressionPath() for paths including anonymous struct/union
Marianne Mailhot-Sarrasin [Thu, 10 Mar 2016 22:10:59 +0000 (22:10 +0000)]
Fixed ValueObject::GetExpressionPath() for paths including anonymous struct/union

When the parent of an expression is anonymous, skip adding '.' or '->' before the expression name.

Differential Revision: http://reviews.llvm.org/D18005

llvm-svn: 263166

8 years agoTest commit access
Marianne Mailhot-Sarrasin [Thu, 10 Mar 2016 21:54:25 +0000 (21:54 +0000)]
Test commit access

llvm-svn: 263165

8 years agoStrip trailing whitespace.
Simon Pilgrim [Thu, 10 Mar 2016 20:58:11 +0000 (20:58 +0000)]
Strip trailing whitespace.

llvm-svn: 263162

8 years agoFixed the python interpreter so that it correctly inherits the top IOHandler's files...
Greg Clayton [Thu, 10 Mar 2016 20:49:32 +0000 (20:49 +0000)]
Fixed the python interpreter so that it correctly inherits the top IOHandler's files instead of always using stdin/out/err.

Removed lldb_private::File::Duplicate() and the copy constructor and the assignment operator that used to duplicate the file handles and made them private so no one uses them. Previously the lldb_private::File::Duplicate() function duplicated files that used file descriptors, (int) but not file streams (FILE *), so the lldb_private::File::Duplicate() function only worked some of the time. No one else excep thee ScriptInterpreterPython was using these functions, so that aren't needed nor desired. Previously every time you would drop into the python interpreter we would duplicate files, and now we avoid this file churn.

<rdar://problem/24877720>

llvm-svn: 263161

8 years ago[Windows] Fix UnmapOrDie and MmapAlignedOrDie
Reid Kleckner [Thu, 10 Mar 2016 20:47:26 +0000 (20:47 +0000)]
[Windows] Fix UnmapOrDie and MmapAlignedOrDie

Now ASan can return virtual memory to the underlying OS. Portable
sanitizer runtime code needs to be aware that UnmapOrDie cannot unmap
part of previous mapping.

In particular, this required changing how we implement MmapAlignedOrDie
on Windows, which is what Allocator32 uses.

The new code first attempts to allocate memory of the given size, and if
it is appropriately aligned, returns early. If not, it frees the memory
and attempts to reserve size + alignment bytes. In this region there
must be an aligned address. We then free the oversized mapping and
request a new mapping at the aligned address immediately after. However,
a thread could allocate that virtual address in between our free and
allocation, so we have to retry if that allocation fails. The existing
thread creation stress test managed to trigger this condition, so the
code isn't totally untested.

Reviewers: samsonov

Differential Revision: http://reviews.llvm.org/D17431

llvm-svn: 263160

8 years ago[X86][SSE] Reapplied: Improve vector ZERO_EXTEND by combining to ZERO_EXTEND_VECTOR_INREG
Simon Pilgrim [Thu, 10 Mar 2016 20:40:26 +0000 (20:40 +0000)]
[X86][SSE] Reapplied: Improve vector ZERO_EXTEND by combining to ZERO_EXTEND_VECTOR_INREG

Generalise the existing SIGN_EXTEND to SIGN_EXTEND_VECTOR_INREG combine to support zero extension as well and get rid of a lot of unnecessary ANY_EXTEND + mask patterns.

Reapplied with a fix for PR26870 (avoid premature use of TargetConstant in ZERO_EXTEND_VECTOR_INREG expansion).

Differential Revision: http://reviews.llvm.org/D17691

llvm-svn: 263159

8 years agoSupport arbitrary addrspace pointers in masked load/store intrinsics
Artur Pilipenko [Thu, 10 Mar 2016 20:39:22 +0000 (20:39 +0000)]
Support arbitrary addrspace pointers in masked load/store intrinsics

This patch fixes the problem which occurs when loop-vectorize tries to use @llvm.masked.load/store intrinsic for a non-default addrspace pointer. It fails with "Calling a function with a bad signature!" assertion in CallInst constructor because it tries to pass a non-default addrspace pointer to the pointer argument which has default addrspace.

The fix is to add pointer type as another overloaded type to @llvm.masked.load/store intrinsics.

Reviewed By: reames

Differential Revision: http://reviews.llvm.org/D17270

llvm-svn: 263158

8 years agoRetrieve command line arguments and environment correctly on FreeBSD
Dimitry Andric [Thu, 10 Mar 2016 20:22:02 +0000 (20:22 +0000)]
Retrieve command line arguments and environment correctly on FreeBSD

Summary:
Recently I saw the test `TestCases/Posix/print_cmdline.cc` failing on
FreeBSD, with "expected string not found in input".  This is because
asan could not retrieve the command line arguments properly.

In `lib/sanitizer_common/sanitizer_linux.cc`, this is taken care of by
the `GetArgsAndEnv()` function, but it uses `__libc_stack_end` to get at
the required data.  This variable does not exist on BSDs; the regular
way to retrieve the arguments and environment information is via the
`kern.ps_strings` sysctl.

I added this functionality in sanitizer_linux.cc, as a separate #ifdef
block in `GetArgsAndEnv()`.  Also, `ReadNullSepFileToArray()` becomes
unused due to this change.  (It won't work on FreeBSD anyway, since
`/proc` is not mounted by default.)

Reviewers: kcc, emaste, joerg, davide

Subscribers: llvm-commits, emaste

Differential Revision: http://reviews.llvm.org/D17832

llvm-svn: 263157

8 years agoARM: Support relative references using the PREL31 symbol variant.
Peter Collingbourne [Thu, 10 Mar 2016 19:30:18 +0000 (19:30 +0000)]
ARM: Support relative references using the PREL31 symbol variant.

Differential Revision: http://reviews.llvm.org/D17937

llvm-svn: 263156

8 years agoAdd test for r263138.
Richard Smith [Thu, 10 Mar 2016 19:22:21 +0000 (19:22 +0000)]
Add test for r263138.

llvm-svn: 263155

8 years agoFix testicase to turn buildbot green. NFC.
Balaram Makam [Thu, 10 Mar 2016 19:07:50 +0000 (19:07 +0000)]
Fix testicase to turn buildbot green. NFC.

llvm-svn: 263154

8 years agoMove getLocalRelTarget to the file where it is used.
Rafael Espindola [Thu, 10 Mar 2016 19:00:22 +0000 (19:00 +0000)]
Move getLocalRelTarget to the file where it is used.

llvm-svn: 263152

8 years agoRename MaxAlignment -> Alignment.
Rui Ueyama [Thu, 10 Mar 2016 18:58:53 +0000 (18:58 +0000)]
Rename MaxAlignment -> Alignment.

We can argue about a maximum alignment of a group of symbols,
but for each symbol, there is only one alignment.
So it is a bit weird that each symbol has a "maximum alignment".

llvm-svn: 263151

8 years ago[ELF] - Fixed handling R_X86_64_DTPOFF64 relocation relaxation
George Rimar [Thu, 10 Mar 2016 18:57:17 +0000 (18:57 +0000)]
[ELF] - Fixed handling R_X86_64_DTPOFF64 relocation relaxation

R_X86_64_DTPOFF64 was not handled properly.
Next sample app was impossible to link before this patch:

~/pg/release/bin/clang -target x86_64-pc-linux testthread.cpp -c -g
~/pg/d+a/bin/ld.lld testthread.o
"Unknown TLS optimization" (value was 17)

__thread int x = 0;
void _start() {
}

It works fine now.

Differential revision: http://reviews.llvm.org/D18039

llvm-svn: 263150

8 years agoAdd TreatUnavailableAsInvalid for the verification-only mode in InitListChecker.
Manman Ren [Thu, 10 Mar 2016 18:53:19 +0000 (18:53 +0000)]
Add TreatUnavailableAsInvalid for the verification-only mode in InitListChecker.

Given the following test case:
typedef struct {
  const char *name;
  id field;
} Test9;
extern void doSomething(Test9 arg);
void test9() {
  Test9 foo2 = {0, 0};
  doSomething(foo2);
}
With a release compiler, we don't emit any message and silently ignore the
variable "foo2". With an assert compiler, we get an assertion failure.

The root cause —————————————
Back in r140457 we gave InitListChecker a verification-only mode, and will use
CanUseDecl instead of DiagnoseUseOfDecl for verification-only mode.

These two functions handle unavailable issues differently:
In Sema::CanUseDecl, we say the decl is invalid when the Decl is unavailable and
the current context is available.

In Sema::DiagnoseUseOfDecl, we say the decl is usable by ignoring the return
code of DiagnoseAvailabilityOfDecl

So with an assert build, we will hit an assertion in diagnoseListInit
assert(DiagnoseInitList.HadError() &&
       "Inconsistent init list check result.");

The fix -------------------
If we follow what is implemented in CanUseDecl and treat Decls with
unavailable issues as invalid, the variable decl of “foo2” will be marked as
invalid. Since unavailable checking is processed in delayed diagnostics
(r197627), we will silently ignore the diagnostics when we find out that
the variable decl is invalid.

We add a flag "TreatUnavailableAsInvalid" for the verification-only mode.
For overload resolution, we want to say decls with unavailable issues are
invalid; but for everything else, we should say they are valid and
emit diagnostics. Depending on the value of the flag, CanUseDecl
can return different values for unavailable issues.

rdar://23557300
Differential Revision: http://reviews.llvm.org/D15314

llvm-svn: 263149

8 years ago[TableGen] more helpful error message in MapTableEmitter
Nicolai Haehnle [Thu, 10 Mar 2016 18:51:58 +0000 (18:51 +0000)]
[TableGen] more helpful error message in MapTableEmitter

Differential Revision: http://reviews.llvm.org/D17275

llvm-svn: 263148

8 years ago[ELF] - Refactor of SymbolBody::compare()
George Rimar [Thu, 10 Mar 2016 18:49:24 +0000 (18:49 +0000)]
[ELF] - Refactor of SymbolBody::compare()

That makes it a bit shorter.

Differential revision: http://reviews.llvm.org/D18004

llvm-svn: 263144

8 years agoMaterialize metadata in IRLinker before value mapping
Teresa Johnson [Thu, 10 Mar 2016 18:47:03 +0000 (18:47 +0000)]
Materialize metadata in IRLinker before value mapping

Summary:
Unless we plan to do later postpass metadata linking (ThinLTO special mode),
always invoke metadata materialization at the start of IRLinker::run().
This avoids the need for clients who use lazy metadata loading to
explicitly invoke materializeMetadata before the IRMover, which in
turn invokes IRLinker::run and needs materialized metadata for mapping.

Came up in the context of an LLD issue (D17982).

Reviewers: rafael

Subscribers: silvas, llvm-commits

Differential Revision: http://reviews.llvm.org/D17992

llvm-svn: 263143

8 years ago[sanitizer_common tests] Make Darwin a Posix system and bring the stable-runtime...
Filipe Cabecinhas [Thu, 10 Mar 2016 18:46:23 +0000 (18:46 +0000)]
[sanitizer_common tests] Make Darwin a Posix system and bring the stable-runtime definition from ASan tests.

Summary: This is an initial setup in order to move some additional tests from Linux onto Posix.
I also moved decorate_proc_maps onto the Linux directory

Finally added msan's definition for "stable-runtime".
Only a test requires it, and its commit message (r248014) seems to imply
that AArch64 is problematic with MSan.

Reviewers: samsonov, rengolin, t.p.northover, eugenis

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D17928

llvm-svn: 263142

8 years agoAArch64: remove pseudo-instructions used only for their patterns.
Tim Northover [Thu, 10 Mar 2016 18:46:12 +0000 (18:46 +0000)]
AArch64: remove pseudo-instructions used only for their patterns.

There's no real reason for these pseudos to exist, we should be writing real
patterns even if it is slightly less convenient. NFC.

llvm-svn: 263141

8 years agoAMDGPU/SI: add llvm.amdgcn.buffer.load/store.format intrinsics
Nicolai Haehnle [Thu, 10 Mar 2016 18:43:50 +0000 (18:43 +0000)]
AMDGPU/SI: add llvm.amdgcn.buffer.load/store.format intrinsics

Summary:
They correspond to BUFFER_LOAD/STORE_FORMAT_XYZW and will be used by Mesa
to implement the GL_ARB_shader_image_load_store extension.

The intention is that for llvm.amdgcn.buffer.load.format, LLVM will decide
whether one of the _X/_XY/_XYZ opcodes can be used (similar to image sampling
and loads). However, this is not currently implemented.

For llvm.amdgcn.buffer.store, LLVM cannot decide to use one of the "smaller"
opcodes and therefore the intrinsic is overloaded. Currently, only the v4f32
is actually implemented since GLSL also only has a vec4 variant of the store
instructions, although it's conceivable that Mesa will want to be smarter
about this in the future.

BUFFER_LOAD_FORMAT_XYZW is already exposed via llvm.SI.vs.load.input, which
has a legacy name, pretends not to access memory, and does not capture the
full flexibility of the instruction.

Reviewers: arsenm, tstellarAMD, mareko

Subscribers: arsenm, llvm-commits

Differential Revision: http://reviews.llvm.org/D17277

llvm-svn: 263140

8 years ago[X86] Correctly select registers to pop into for x86_64
Michael Kuperstein [Thu, 10 Mar 2016 18:43:21 +0000 (18:43 +0000)]
[X86] Correctly select registers to pop into for x86_64

When trying to replace an add to esp with pops, we need to choose dead
registers to pop into. Registers clobbered by the call and not imp-def'd
by it should be safe. Except that it's not enough to check the register
itself isn't defined, we also need to make sure no overlapping registers
are defined either.

This fixes PR26711.

Differential Revision: http://reviews.llvm.org/D18029

llvm-svn: 263139

8 years agoMake remaining ImplicitFallthrough warning DefaultIgnore.
Nico Weber [Thu, 10 Mar 2016 18:42:37 +0000 (18:42 +0000)]
Make remaining ImplicitFallthrough warning DefaultIgnore.

Follow-up to r262881, which caused this to fire more often.

llvm-svn: 263138

8 years agoFollow-up fix for r263126. Apparently `printf("%p", NULL)` can output 0x0, (nil...
Kuba Brecka [Thu, 10 Mar 2016 18:09:57 +0000 (18:09 +0000)]
Follow-up fix for r263126.  Apparently `printf("%p", NULL)` can output 0x0, (nil) or (null) on different platforms.

llvm-svn: 263137

8 years ago [AArch64] Optimize compare and branch sequence when the compare's constant operand...
Balaram Makam [Thu, 10 Mar 2016 17:54:55 +0000 (17:54 +0000)]
 [AArch64] Optimize compare and branch sequence when the compare's constant operand is power of 2

Summary:
Peephole optimization that generates a single TBZ/TBNZ instruction
for test and branch sequences like in the example below. This handles
the cases that miss folding of AND into TBZ/TBNZ during ISelLowering of BR_CC

Examples:
   and  w8, w8, #0x400
   cbnz w8, L1
 to
   tbnz w8, #10, L1

Reviewers: MatzeB, jmolloy, mcrosier, t.p.northover

Subscribers: aemerson, rengolin, mcrosier, llvm-commits

Differential Revision: http://reviews.llvm.org/D17942

llvm-svn: 263136

8 years agogive regression test a meaningful name
Sanjay Patel [Thu, 10 Mar 2016 17:52:19 +0000 (17:52 +0000)]
give regression test a meaningful name

llvm-svn: 263135

8 years ago[Renderscript] Add stack argument reading code for Mipsel 3
Aidan Dodds [Thu, 10 Mar 2016 17:50:01 +0000 (17:50 +0000)]
[Renderscript] Add stack argument reading code for Mipsel 3

Fix a problem raised with the previous patches being applied in the wrong order.

Committed on behalf of: Dean De Leo <dean@codeplay.com>

llvm-svn: 263134

8 years ago[ELF] - Do not call doInitSymbols for all ELFTs
George Rimar [Thu, 10 Mar 2016 17:38:49 +0000 (17:38 +0000)]
[ELF] - Do not call doInitSymbols for all ELFTs

It looks a bit wierd that we have to initialize symbols for all ELFT
types when we use only one ELFT for link. We can only init those
that we need. Patch fixes it.

Differential revision: http://reviews.llvm.org/D18047

llvm-svn: 263133

8 years ago[ARM] Cortex-R8 support
Alexandros Lamprineas [Thu, 10 Mar 2016 17:38:41 +0000 (17:38 +0000)]
[ARM] Cortex-R8 support

This patch adds Cortex-R8 to Target Parser and TableGen.
It also adds CodeGen tests for the build attributes.

Patch by Pablo Barrio.

Differential Revision: http://reviews.llvm.org/D17925

llvm-svn: 263132

8 years ago[Renderscript] Add stack argument reading code for Mipsel 2
Aidan Dodds [Thu, 10 Mar 2016 17:37:02 +0000 (17:37 +0000)]
[Renderscript] Add stack argument reading code for Mipsel 2

This commit implements the reading of stack spilled function arguments for little endian MIPS targets.

Committed on behalf of: Dean De Leo <dean@codeplay.com>

llvm-svn: 263131

8 years ago[Renderscript] Add stack argument reading code for Mipsel
Aidan Dodds [Thu, 10 Mar 2016 17:27:41 +0000 (17:27 +0000)]
[Renderscript] Add stack argument reading code for Mipsel

This commit implements the reading of stack spilled function arguments for little endian MIPS targets.

Committed on behalf of: Dean De Leo <dean@codeplay.com>

llvm-svn: 263130

8 years ago[Renderscript] Explicitly set the language to evaluate allocations
Aidan Dodds [Thu, 10 Mar 2016 17:23:33 +0000 (17:23 +0000)]
[Renderscript] Explicitly set the language to evaluate allocations

Currently it is not specified, and since allocations are usually
requested once we hit a renderscript breakpoint, the language will be
inferred being as renderscript by the ExpressionParser.
Actually allocations attempt to invoke functions part of the RS runtime,
written in C/C++, so evaluating the calls in RenderScript could be
misleading.

In particular, in MIPS, the ABI between C/C++ (mips o32) and
renderscript (arm) might introduce subtle bugs when evaluating such
expressions.

This change explicitly sets the language used to evaluate the allocations
as C++.

Committed on behalf of: Dean De Leo <dean@codeplay.com>

llvm-svn: 263129

8 years agoAttemp to fix linux build bot fail after r263125
George Rimar [Thu, 10 Mar 2016 17:13:20 +0000 (17:13 +0000)]
Attemp to fix linux build bot fail after r263125
(http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/8662).
Test fails on linux only.

Original commit message:
[ELF] - Consistent spelling for error/warning messages

Previously error and warnings were not consistent in lld.
Some of them started from lowercase letter, others from
uppercase. Also there was one or two which had a dot at the end.
This patch changes all messages to start from uppercase letter if
they were not before.

Differential revision: http://reviews.llvm.org/D18045

llvm-svn: 263128

8 years agoRename -discard-value-names into -lto-discard-value-names in libLLVMLTO
Mehdi Amini [Thu, 10 Mar 2016 17:06:52 +0000 (17:06 +0000)]
Rename -discard-value-names into -lto-discard-value-names in libLLVMLTO

This is avoiding a naming conflict with opt and llc.
While opt and llc don't link to LTO usually, users that are building a
monolithic libLLVM.dylib and linking the tools to it would have a
runtime error because of the duplicate cl::opt registration.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 263127

8 years ago[tsan] Add TSan debugger APIs
Kuba Brecka [Thu, 10 Mar 2016 17:00:29 +0000 (17:00 +0000)]
[tsan] Add TSan debugger APIs

Currently, TSan only reports everything in a formatted textual form. The idea behind this patch is to provide a consistent API that can be used to query information contained in a TSan-produced report. User can use these APIs either in a debugger (via a script or directly), or they can use it directly from the process (e.g. in the __tsan_on_report callback). ASan already has a similar API, see http://reviews.llvm.org/D4466.

Differential Revision: http://reviews.llvm.org/D16191

llvm-svn: 263126

8 years ago[ELF] - Consistent spelling for error/warning messages
George Rimar [Thu, 10 Mar 2016 16:58:34 +0000 (16:58 +0000)]
[ELF] - Consistent spelling for error/warning messages

Previously error and warnings were not consistent in lld.
Some of them started from lowercase letter, others from
uppercase. Also there was one or two which had a dot at the end.
This patch changes all messages to start from uppercase letter if
they were not before.

Differential revision: http://reviews.llvm.org/D18045

llvm-svn: 263125

8 years agoAMDGPU/SI: Define S_GETREG Intrinsic
Changpeng Fang [Thu, 10 Mar 2016 16:47:15 +0000 (16:47 +0000)]
AMDGPU/SI: Define S_GETREG Intrinsic

Summary:
 Define s_getreg intrinsic to generate s_getreg instruction to read
hardware registers.

Reviewers: tstellarAMD, arsenm

Subscribers: llvm-commits, arsenm

Differential Revision: http://reviews.llvm.org/D17892

llvm-svn: 263124

8 years agoARM: follow up improvements for SVN r263118
Saleem Abdulrasool [Thu, 10 Mar 2016 16:26:37 +0000 (16:26 +0000)]
ARM: follow up improvements for SVN r263118

The initial change was insufficiently complete for always getting the semantics
of __builtin_longjmp correct.  The builtin is translated into a
`tInt_eh_sjlj_longjmp` DAG node.  This node set R7 as clobbered.  However, the
code would then follow up with a clobber of R11.  I had failed to notice the
imp-def,kill on R7 in the isel.  Unfortunately, it seems that it is not possible
to conditionalise the Defs list via an !if.  Instead, construct a new parallel
WIN node and prefer that when targeting windows.  This ensures that we now both
correctly model the __builtin_longjmp as well as construct the frame in a more
ABI conformant manner.

llvm-svn: 263123

8 years agoEliminate the TestStarted-XXX and TestFinished-XXX files from check-lldb runs.
Adrian McCarthy [Thu, 10 Mar 2016 15:41:11 +0000 (15:41 +0000)]
Eliminate the TestStarted-XXX and TestFinished-XXX files from check-lldb runs.

Nobody seems to know what purpose these files serve, yet they were accumulating by the thousands in the test traces directory.  I'm proposing we delete them.

Creating these files accounted for about 2.5% of the time to run ninja check-lldb on my machine, which isn't a lot, but it's something.

llvm-svn: 263122

8 years ago[SROA] Fix PR25873, which Andrea Di Biagio analyzed the daylights out
Chandler Carruth [Thu, 10 Mar 2016 15:31:17 +0000 (15:31 +0000)]
[SROA] Fix PR25873, which Andrea Di Biagio analyzed the daylights out
of, and I misdiagnosed for months and months.

Andrea has had a patch for this forever, but I just couldn't see how
it was fixing the root cause of the problem. It didn't make sense to me,
even though the patch was perfectly good and the analysis of the actual
failure event was *fantastic*.

Well, I came back to it today because the patch has sat for *far* too
long and needs attention and decided I wouldn't let it go until I really
understood what was going on. After quite some time in the debugger,
I finally realized that in fact I had just missed an important case with
my previous attempt to fix PR22093 in r225149. Not only do we need to
handle loads that won't be split, but stores-of-loads that we won't
split. We *do* actually have enough logic in the presplitting to form
new slices for split stores.... *unless* we decided not to split them!

I'm so sorry that it took me this long to come to the realization that
this is the issue. It seems so obvious in hind sight (of course).
Anyways, the fix becomes *much* smaller and more focused. The fact that
we're left doing integer smashing is related to the FIXME in my original
commit: fundamentally, we're not aggressive about pre-splitting for
loads and stores to the same alloca. If we want to get aggressive about
this, it'll need both what Andrea had put into the proposed fix, but
also a *lot* more logic to essentially iteratively pre-split the alloca
until we can't do any more. As I said in that commit log, its really
unclear that this is the right call. Instead, the integer blending and
letting targets lower this to narrower stores seems slightly better. But
we definitely shouldn't really go down that path just to fix this bug.

Again, tons of thanks are owed to Andrea and others at Sony for working
on this bug. I really should have seen what was going on here and
re-directed them sooner. =////

llvm-svn: 263121

8 years agoUnified the handling of returns in the X87 stackifier so that the stackifier
David L Kreitzer [Thu, 10 Mar 2016 15:14:02 +0000 (15:14 +0000)]
Unified the handling of returns in the X87 stackifier so that the stackifier
runs successfully on routines containing IRETs. This fixes PR26410.

Differential Revision: http://reviews.llvm.org/D17643

llvm-svn: 263120

8 years agoFixup for r263114. llvm::AnalysisBase<CallGraphAnalysis> should be declared as extern.
NAKAMURA Takumi [Thu, 10 Mar 2016 15:13:00 +0000 (15:13 +0000)]
Fixup for r263114. llvm::AnalysisBase<CallGraphAnalysis> should be declared as extern.

llvm-svn: 263119