platform/upstream/llvm.git
11 years agoRevert r190366. It was breaking build bots.
Bill Wendling [Tue, 10 Sep 2013 00:20:27 +0000 (00:20 +0000)]
Revert r190366. It was breaking build bots.

llvm-svn: 190373

11 years agoObjectiveC migrator. Do not infer NS_RETURNS_INNER_POINTER
Fariborz Jahanian [Mon, 9 Sep 2013 23:56:14 +0000 (23:56 +0000)]
ObjectiveC migrator. Do not infer NS_RETURNS_INNER_POINTER
annotation on methods which return typedef of pointer to
an incomplete struct type.

llvm-svn: 190372

11 years agoAdd ability to set OPTIONS for compile
Marshall Clow [Mon, 9 Sep 2013 23:53:08 +0000 (23:53 +0000)]
Add ability to set OPTIONS for compile

llvm-svn: 190371

11 years agoAttempting to unbreak the makefile-base builds.
Aaron Ballman [Mon, 9 Sep 2013 23:50:01 +0000 (23:50 +0000)]
Attempting to unbreak the makefile-base builds.

llvm-svn: 190370

11 years agoAdding a FIXME based on feedback from Richard Smith.
Aaron Ballman [Mon, 9 Sep 2013 23:40:31 +0000 (23:40 +0000)]
Adding a FIXME based on feedback from Richard Smith.

llvm-svn: 190369

11 years agoAttribute tablegen now understands that attribute arguments can be optional. This...
Aaron Ballman [Mon, 9 Sep 2013 23:33:17 +0000 (23:33 +0000)]
Attribute tablegen now understands that attribute arguments can be optional.  This allows for automated checking of the number of arguments expected vs number of arguments given for attributes.  Greatly reduces the amount of manual checking required.

llvm-svn: 190368

11 years agoEnable -misched-cyclicpath by default.
Andrew Trick [Mon, 9 Sep 2013 23:31:14 +0000 (23:31 +0000)]
Enable -misched-cyclicpath by default.

llvm-svn: 190367

11 years agoUse a default value for the prologue's debug location.
Bill Wendling [Mon, 9 Sep 2013 23:28:15 +0000 (23:28 +0000)]
Use a default value for the prologue's debug location.

llvm-svn: 190366

11 years agoFixed parsing of the .debug_aranges section so that LLDB will still work correctly...
Richard Mitton [Mon, 9 Sep 2013 23:17:40 +0000 (23:17 +0000)]
Fixed parsing of the .debug_aranges section so that LLDB will still work correctly even if arange data is not available for every object file in the program.

llvm-svn: 190365

11 years agoDebug Info: In DIBuilder, the context fields of a TAG_inheritance and a
Manman Ren [Mon, 9 Sep 2013 23:07:58 +0000 (23:07 +0000)]
Debug Info: In DIBuilder, the context fields of a TAG_inheritance and a
TAG_friend are updated to use scope reference.

Added testing cases to verify that class with inheritance can be uniqued.

llvm-svn: 190364

11 years agoDebug Info: move DIScope::getContext back from DwarfDebug.
Manman Ren [Mon, 9 Sep 2013 22:35:23 +0000 (22:35 +0000)]
Debug Info: move DIScope::getContext back from DwarfDebug.

This partially reverts r190330. DIScope::getContext now returns DIScopeRef
instead of DIScope. We construct a DIScopeRef from DIScope when we are
dealing with subprogram, lexical block or name space.

llvm-svn: 190362

11 years ago<rdar://problem/14728845>
Enrico Granata [Mon, 9 Sep 2013 22:35:18 +0000 (22:35 +0000)]
<rdar://problem/14728845>

Making the --timeout (-t) option to "platform shell" work for real

llvm-svn: 190361

11 years agomi-sched: smooth out the cyclicpath heuristic.
Andrew Trick [Mon, 9 Sep 2013 22:28:08 +0000 (22:28 +0000)]
mi-sched: smooth out the cyclicpath heuristic.

Arnold's idea.

I generally try to avoid stateful heuristics because it can make
debugging harder. However, we need a way to prevent the latency
priority from dominating, and it somewhat makes sense to schedule
aggressively for latency only within an issue group.

Swift in particular likes this, and it doesn't hurt anyone else:
| Benchmarks/MiBench/consumer-lame              |  10.39% |
| Benchmarks/Misc/himenobmtxpa                  |   9.63% |

llvm-svn: 190360

11 years agoDon't allow a NULL-length file. Try to revert to the buffered version.
Bill Wendling [Mon, 9 Sep 2013 22:25:46 +0000 (22:25 +0000)]
Don't allow a NULL-length file. Try to revert to the buffered version.

llvm-svn: 190359

11 years agowhite spaces and long lines
Jack Carter [Mon, 9 Sep 2013 22:02:08 +0000 (22:02 +0000)]
white spaces and long lines

llvm-svn: 190358

11 years agoDon't shrink atomic ops to bool in GlobalOpt.
Eli Friedman [Mon, 9 Sep 2013 22:00:13 +0000 (22:00 +0000)]
Don't shrink atomic ops to bool in GlobalOpt.

LLVM IR doesn't currently allow atomic bool load/store operations, and the
transformation is dubious anyway because it isn't profitable on all platforms.

PR17163.

llvm-svn: 190357

11 years agoDisabling tests affected by llvm.org/pr16170 on Linux
Daniel Malea [Mon, 9 Sep 2013 21:28:44 +0000 (21:28 +0000)]
Disabling tests affected by llvm.org/pr16170 on Linux
- occasional lldb hangs are causing noisy buildbots and trouble in the (Debian/Ubuntu) package builder

llvm-svn: 190355

11 years agoSet the encoding to '0' if we don't have an MAB.
Bill Wendling [Mon, 9 Sep 2013 21:22:44 +0000 (21:22 +0000)]
Set the encoding to '0' if we don't have an MAB.

llvm-svn: 190354

11 years agoFix a crash introduced in r189828.
Matt Beaumont-Gay [Mon, 9 Sep 2013 21:07:58 +0000 (21:07 +0000)]
Fix a crash introduced in r189828.

The predicates in CXXRecordDecl which test various properties of special
members can't be called on incomplete decls.

llvm-svn: 190353

11 years ago[InstCombiner] Expose opportunities to merge subtract and comparison.
Quentin Colombet [Mon, 9 Sep 2013 20:56:48 +0000 (20:56 +0000)]
[InstCombiner] Expose opportunities to merge subtract and comparison.

Several architectures use the same instruction to perform both a comparison and
a subtract. The instruction selection framework does not allow to consider
different basic blocks to expose such fusion opportunities.

Therefore, these instructions are “merged” by CSE at MI IR level.

To increase the likelihood of CSE to apply in such situation, we reorder the
operands of the comparison, when they have the same complexity, so that they
matches the order of the most frequent subtract.
E.g.,

icmp A, B
...
sub B, A

<rdar://problem/14514580>

llvm-svn: 190352

11 years agoDebug Info Testing: remove a commented out line.
Manman Ren [Mon, 9 Sep 2013 20:45:34 +0000 (20:45 +0000)]
Debug Info Testing: remove a commented out line.

llvm-svn: 190351

11 years agoAnother attempt to fix windows buildbots.
Bill Wendling [Mon, 9 Sep 2013 20:29:32 +0000 (20:29 +0000)]
Another attempt to fix windows buildbots.

llvm-svn: 190350

11 years agoAttempt to fix buildbots by giving an explicit output to the llvm-mc command.
Bill Wendling [Mon, 9 Sep 2013 20:22:38 +0000 (20:22 +0000)]
Attempt to fix buildbots by giving an explicit output to the llvm-mc command.

llvm-svn: 190349

11 years agoExpand test to make sure that we can generate compact unwind from an ASM file.
Bill Wendling [Mon, 9 Sep 2013 20:12:36 +0000 (20:12 +0000)]
Expand test to make sure that we can generate compact unwind from an ASM file.

llvm-svn: 190348

11 years agoExpand test to make sure that we can generate compact unwind from an ASM file.
Bill Wendling [Mon, 9 Sep 2013 20:10:54 +0000 (20:10 +0000)]
Expand test to make sure that we can generate compact unwind from an ASM file.

llvm-svn: 190347

11 years agoAlways add global names. We're adding them in the rest of the code
Eric Christopher [Mon, 9 Sep 2013 20:03:20 +0000 (20:03 +0000)]
Always add global names. We're adding them in the rest of the code
as well as types.

No functional change as they're not emitted unless the option
is true anyhow.

llvm-svn: 190346

11 years agoRename for consistency.
Eric Christopher [Mon, 9 Sep 2013 20:03:17 +0000 (20:03 +0000)]
Rename for consistency.

llvm-svn: 190345

11 years agoAdd the gnu pubnames and pubtypes sections to the mc object file
Eric Christopher [Mon, 9 Sep 2013 20:03:14 +0000 (20:03 +0000)]
Add the gnu pubnames and pubtypes sections to the mc object file
handling.

llvm-svn: 190344

11 years agoAdd constant defines for gnu pubnames and gnu pubtypes - they're used
Eric Christopher [Mon, 9 Sep 2013 20:03:11 +0000 (20:03 +0000)]
Add constant defines for gnu pubnames and gnu pubtypes - they're used
for the gdb index as the names convey.

llvm-svn: 190343

11 years agoFormatting.
Eric Christopher [Mon, 9 Sep 2013 20:03:08 +0000 (20:03 +0000)]
Formatting.

llvm-svn: 190342

11 years agoModern ObjectiveC translator. Fix translation of
Fariborz Jahanian [Mon, 9 Sep 2013 19:59:59 +0000 (19:59 +0000)]
Modern ObjectiveC translator. Fix translation of
message sent to aggregate-valued methods. Fix
visibility of trampoline type used in translation
of such expressions.  // rdar://14932320

llvm-svn: 190341

11 years ago[docs] Prominently note modules are experimental.
Sean Silva [Mon, 9 Sep 2013 19:57:49 +0000 (19:57 +0000)]
[docs] Prominently note modules are experimental.

It was really hard to tell that modules are experimental. This makes it
really clear by

* Noting the experimental status in the title.
* Moving the "warning" above the table of contents.

llvm-svn: 190340

11 years ago[docs] End users should see just "Clang"
Sean Silva [Mon, 9 Sep 2013 19:50:47 +0000 (19:50 +0000)]
[docs] End users should see just "Clang"

Half the internet has wildly incorrect ideas about what LLVM is (in
particular, many get the impression that LLVM is some magical
cross-platform runtime), so saying "LLVM" near "cross-compilation" in a
user-facing doc might provoke confusion.

llvm-svn: 190338

11 years ago[docs] Fix Sphinx toctree warning.
Sean Silva [Mon, 9 Sep 2013 19:50:46 +0000 (19:50 +0000)]
[docs] Fix Sphinx toctree warning.

Last I heard LSan is getting close to prime-time, but for now keep
LeakSanitizer.rst hidden (especially since it contains so little
content).

llvm-svn: 190337

11 years ago[docs] Fix some finicky Sphinx warnings.
Sean Silva [Mon, 9 Sep 2013 19:50:40 +0000 (19:50 +0000)]
[docs] Fix some finicky Sphinx warnings.

llvm-svn: 190336

11 years agoCall generateCompactUnwindEncodings() right before we need to output the frame inform...
Bill Wendling [Mon, 9 Sep 2013 19:48:37 +0000 (19:48 +0000)]
Call generateCompactUnwindEncodings() right before we need to output the frame information.

There are more than one paths to where the frame information is emitted. Place
the call to generateCompactUnwindEncodings() into the method which outputs the
frame information, thus ensuring that the encoding is there for every path. This
involved threading the MCAsmBackend object through to this method.

<rdar://problem/13623355>

llvm-svn: 190335

11 years agoDebug Info: Use DIScopeRef for DIType::getContext.
Manman Ren [Mon, 9 Sep 2013 19:47:11 +0000 (19:47 +0000)]
Debug Info: Use DIScopeRef for DIType::getContext.

In DIBuilder, the context field of a TAG_member is updated to use the
scope reference. Verifier is updated accordingly.

DebugInfoFinder now needs to generate a type identifier map to have
access to the actual scope. Same applies for BreakpointPrinter.

processModule of DebugInfoFinder is called during initialization phase
of the verifier to make sure the type identifier map is constructed early
enough.

We are now able to unique a simple class as demonstrated by the added
testing case.

llvm-svn: 190334

11 years ago[docs] Typographical and rewording fixes.
Sean Silva [Mon, 9 Sep 2013 19:30:44 +0000 (19:30 +0000)]
[docs] Typographical and rewording fixes.

llvm-svn: 190333

11 years agoRename GnuLDInputGraph.h -> GnuLdInputGraph.h for consistency with other files.
Rui Ueyama [Mon, 9 Sep 2013 19:30:23 +0000 (19:30 +0000)]
Rename GnuLDInputGraph.h -> GnuLdInputGraph.h for consistency with other files.

llvm-svn: 190332

11 years agoUpdate CMake file to fix buildbots.
Bob Wilson [Mon, 9 Sep 2013 19:25:11 +0000 (19:25 +0000)]
Update CMake file to fix buildbots.

llvm-svn: 190331

11 years agoDebug Info: move DIScope::getContext to DwarfDebug.
Manman Ren [Mon, 9 Sep 2013 19:23:58 +0000 (19:23 +0000)]
Debug Info: move DIScope::getContext to DwarfDebug.

DIScope::getContext is a wrapper function that calls the specific getContext
method on each subclass. When we switch DIType::getContext to return DIScopeRef
instead of DIScope, DIScope::getContext can no longer return a DIScope without
a type identifier map.

DIScope::getContext is only used by DwarfDebug, so we move it to DwarfDebug
to have easy access to the type identifier map.

llvm-svn: 190330

11 years agoUse _isWholeArchive to silence -Wunused-private-field warning.
Rui Ueyama [Mon, 9 Sep 2013 19:21:06 +0000 (19:21 +0000)]
Use _isWholeArchive to silence -Wunused-private-field warning.

llvm-svn: 190329

11 years agoRevert patches to add case-range support for PR1255.
Bob Wilson [Mon, 9 Sep 2013 19:14:35 +0000 (19:14 +0000)]
Revert patches to add case-range support for PR1255.

The work on this project was left in an unfinished and inconsistent state.
Hopefully someone will eventually get a chance to implement this feature, but
in the meantime, it is better to put things back the way the were.  I have
left support in the bitcode reader to handle the case-range bitcode format,
so that we do not lose bitcode compatibility with the llvm 3.3 release.

This reverts the following commits: 155464, 156374, 156377, 156613, 156704,
156757, 156804 156808, 156985, 157046, 157112, 157183, 157315, 157384, 157575,
157576, 157586, 157612, 157810, 157814, 157815, 157880, 157881, 157882, 157884,
157887, 157901, 158979, 157987, 157989, 158986, 158997, 159076, 159101, 159100,
159200, 159201, 159207, 159527, 159532, 159540, 159583, 159618, 159658, 159659,
159660, 159661, 159703, 159704, 160076, 167356, 172025, 186736

llvm-svn: 190328

11 years ago[docs] Fix Sphinx warning.
Sean Silva [Mon, 9 Sep 2013 19:13:28 +0000 (19:13 +0000)]
[docs] Fix Sphinx warning.

Adornments need to be at least as long as the thing they adorn.

llvm-svn: 190327

11 years ago[docs] Fix some Sphinx toctree warnings.
Sean Silva [Mon, 9 Sep 2013 19:09:00 +0000 (19:09 +0000)]
[docs] Fix some Sphinx toctree warnings.

llvm-svn: 190326

11 years agoDebug Info: Move isSubprogramContext from DebugInfo to DwarfDebug.
Manman Ren [Mon, 9 Sep 2013 19:05:21 +0000 (19:05 +0000)]
Debug Info: Move isSubprogramContext from DebugInfo to DwarfDebug.

This helper function needs the type identifier map when we switch
DIType::getContext to return DIScopeRef instead of DIScope.

Since isSubprogramContext is used by DwarfDebug only, We move it to DwarfDebug
to have easy access to the map.

llvm-svn: 190325

11 years ago[docs] Some typographical fixes.
Sean Silva [Mon, 9 Sep 2013 19:05:03 +0000 (19:05 +0000)]
[docs] Some typographical fixes.

llvm-svn: 190324

11 years agoclang-cl: parse (but don't support) the /o flag
Hans Wennborg [Mon, 9 Sep 2013 19:04:49 +0000 (19:04 +0000)]
clang-cl: parse (but don't support) the /o flag

Apparently folks run into this (PR17097). The flag is not supported by
MSVC either, but we should parse it so we don't get confused when it occurs.

This changes the clang-cl output for "clang-cl /c /o foo.obj" from:

  clang-cl.exe: error: no such file or directory: '/o'
  clang-cl.exe: error: no such file or directory: 'foo.obj'

to:

  clang-cl.exe: warning: argument unused during compilation: '/o bajs.obj'

llvm-svn: 190323

11 years agoDebug Info: Rename DITypeRef to DIScopeRef.
Manman Ren [Mon, 9 Sep 2013 19:03:51 +0000 (19:03 +0000)]
Debug Info: Rename DITypeRef to DIScopeRef.

A reference to a scope is more general than a reference to a type since
DIType is a subclass of DIScope.

A reference to a type can be either an identifier for the type or
the DIType itself, while a reference to a scope can be either an
identifier for the type (when the scope is indeed a type) or the
DIScope itself. A reference to a type and a reference to a scope
will be resolved in the same way. The only difference is in the
verifier when a field is a reference to a type (i.e. the containing
type field of a DICompositeType) or a field is a reference to a scope
(i.e. the context field of a DIType).

This is to get ready for switching DIType::getContext to return
DIScopeRef instead of DIScope.

Tighten up isTypeRef and isScopeRef to make sure the identifier is not
empty and the MDNode is DIType for TypeRef and DIScope for ScopeRef.

llvm-svn: 190322

11 years agoDebug Info: Update isScope to make sure DIType is a scope and
Manman Ren [Mon, 9 Sep 2013 19:00:55 +0000 (19:00 +0000)]
Debug Info: Update isScope to make sure DIType is a scope and
TAG_file_type is also a scope.

llvm-svn: 190321

11 years agoUpdate synopsis for list/forward_list/deque to match the allocator style of existing...
Marshall Clow [Mon, 9 Sep 2013 18:19:45 +0000 (18:19 +0000)]
Update synopsis for list/forward_list/deque to match the allocator style of existing comment. No code change

llvm-svn: 190320

11 years agoApply Linux C++ global/anonymous function call workound to FreeBSD as well
Ed Maste [Mon, 9 Sep 2013 18:00:45 +0000 (18:00 +0000)]
Apply Linux C++ global/anonymous function call workound to FreeBSD as well

The workaround was introduced in SVN r181613, for http://llvm.org/pr15854

llvm-svn: 190319

11 years ago[mips] When double precision loads and stores are split into two i32 loads and
Akira Hatanaka [Mon, 9 Sep 2013 17:59:32 +0000 (17:59 +0000)]
[mips] When double precision loads and stores are split into two i32 loads and
stores, make sure the load or store that accesses the higher half does not have
an alignment that is larger than the offset from the original address.

llvm-svn: 190318

11 years ago[stackprotector] Modernize code with IRBuilder
Benjamin Kramer [Mon, 9 Sep 2013 17:38:01 +0000 (17:38 +0000)]
[stackprotector] Modernize code with IRBuilder

llvm-svn: 190317

11 years agoMove checker downloads to llvm.org.
Ted Kremenek [Mon, 9 Sep 2013 17:19:27 +0000 (17:19 +0000)]
Move checker downloads to llvm.org.

llvm-svn: 190316

11 years agoC++ modules: if a class is defined in multiple modules (for instance, because
Richard Smith [Mon, 9 Sep 2013 16:55:27 +0000 (16:55 +0000)]
C++ modules: if a class is defined in multiple modules (for instance, because
it is an implicit instantiation of a class template specialization), pick the
first-loaded definition to be the canonical definition, and merge all other
definitions into it.

This is still rather incomplete -- we need to extend every form of declaration
that can appear within a CXXRecordDecl to be redeclarable if it came from an
AST file (this includes fields, enumerators, ...).

llvm-svn: 190315

11 years agoCGDebugInfo: Hoist string allocation in a helper function. No functionality change.
Benjamin Kramer [Mon, 9 Sep 2013 16:39:06 +0000 (16:39 +0000)]
CGDebugInfo: Hoist string allocation in a helper function. No functionality change.

llvm-svn: 190314

11 years agoSema: Don't crash on visibility attributes with an identifier argument.
Benjamin Kramer [Mon, 9 Sep 2013 15:08:57 +0000 (15:08 +0000)]
Sema: Don't crash on visibility attributes with an identifier argument.

PR17105.

llvm-svn: 190312

11 years agoFix constructor-related typos.
Benjamin Kramer [Mon, 9 Sep 2013 14:48:42 +0000 (14:48 +0000)]
Fix constructor-related typos.

Noticed by Roman Divacky.

llvm-svn: 190311

11 years agoParenthesize arguments for mad_hi
Aaron Watry [Mon, 9 Sep 2013 14:36:21 +0000 (14:36 +0000)]
Parenthesize arguments for mad_hi

Thanks to Jordon Rose <jordan_rose@apple.com> for pointing this out.

llvm-svn: 190310

11 years ago[ARMv8] Prevent generation of deprecated IT blocks on ARMv8 in Thumb mode.
Joey Gouly [Mon, 9 Sep 2013 14:21:49 +0000 (14:21 +0000)]
[ARMv8] Prevent generation of deprecated IT blocks on ARMv8 in Thumb mode.
IT blocks can only be one instruction lonf, and can only contain a subset of
the 16 instructions.

Patch by Artyom Skrobov!

llvm-svn: 190309

11 years agoA better way to silence the warning in MSVC (replaces r190304).
Aaron Ballman [Mon, 9 Sep 2013 14:17:30 +0000 (14:17 +0000)]
A better way to silence the warning in MSVC (replaces r190304).

llvm-svn: 190308

11 years agotest: Handle libc++ shared lib name on FreeBSD
Ed Maste [Mon, 9 Sep 2013 14:04:04 +0000 (14:04 +0000)]
test: Handle libc++ shared lib name on FreeBSD

(I didn't take a guess at the Linux names, as these tests are currently
skipped with the comment "No standard locations for libc++ on Linux.")

llvm-svn: 190307

11 years ago[msan] Intercept fstatat / fstatat64.
Evgeniy Stepanov [Mon, 9 Sep 2013 13:40:41 +0000 (13:40 +0000)]
[msan] Intercept fstatat / fstatat64.

llvm-svn: 190306

11 years agoSilencing an MSVC warning about an empty control statement (it dislikes ; but is...
Aaron Ballman [Mon, 9 Sep 2013 13:29:38 +0000 (13:29 +0000)]
Silencing an MSVC warning about an empty control statement (it dislikes ; but is fine with {}).

llvm-svn: 190305

11 years agoSilencing a warning about control flow reaching the end of a non-void function.
Aaron Ballman [Mon, 9 Sep 2013 13:22:45 +0000 (13:22 +0000)]
Silencing a warning about control flow reaching the end of a non-void function.

llvm-svn: 190304

11 years agoRemoving the endian attribute and updating associated test cases. This functionality...
Aaron Ballman [Mon, 9 Sep 2013 12:57:20 +0000 (12:57 +0000)]
Removing the endian attribute and updating associated test cases.  This functionality was never completely implemented, and this is an improvement over silently eating the attribute.

llvm-svn: 190303

11 years agoHandle _DYNAMIC correctly in the x86_64 backend.
Joerg Sonnenberger [Mon, 9 Sep 2013 12:19:28 +0000 (12:19 +0000)]
Handle _DYNAMIC correctly in the x86_64 backend.

llvm-svn: 190302

11 years agoRecognize -Bstatic as alias for -static, clang uses it.
Joerg Sonnenberger [Mon, 9 Sep 2013 11:48:43 +0000 (11:48 +0000)]
Recognize -Bstatic as alias for -static, clang uses it.

llvm-svn: 190301

11 years agoXCore handling of thread local lowering
Robert Lytton [Mon, 9 Sep 2013 10:42:11 +0000 (10:42 +0000)]
XCore handling of thread local lowering

Fix XCoreLowerThreadLocal trying to initialise globals
which have no initializer.

Add handling of const expressions containing thread local variables.
These need to be replaced with instructions, as the thread ID is
used to access the thread local variable.

llvm-svn: 190300

11 years agoXCore target: change to Sched::Source
Robert Lytton [Mon, 9 Sep 2013 10:42:05 +0000 (10:42 +0000)]
XCore target: change to Sched::Source

This sidesteps a bug in PrescheduleNodesWithMultipleUses() which
does not check if callResources will be affected by the transformation.

llvm-svn: 190299

11 years agoXCore target: fix weak linkage attribute handling
Robert Lytton [Mon, 9 Sep 2013 10:41:57 +0000 (10:41 +0000)]
XCore target: fix weak linkage attribute handling

llvm-svn: 190298

11 years agoCommit 190296 missed out the tests; add them now. Note that it actually tests
David Tweed [Mon, 9 Sep 2013 09:55:07 +0000 (09:55 +0000)]
Commit 190296 missed out the tests; add them now. Note that it actually tests
"long long" which is currently technically only "reserved for future" use in OpenCL, but
since clang in OpenCL mode supports it we may as well test the modifications to
the settings made for that type.

llvm-svn: 190297

11 years agoThe OpenCL standard specifies the sizes and alignments of various types than other...
David Tweed [Mon, 9 Sep 2013 09:17:24 +0000 (09:17 +0000)]
The OpenCL standard specifies the sizes and alignments of various types than other C-family
languages, as well as specifying errno is not set by the math functions. Make the
clang front-end set those appropriately when the OpenCL language option is set.

Patch by Erik Schnetter!

llvm-svn: 190296

11 years ago[sanitizer] Fix PR17138.
Evgeniy Stepanov [Mon, 9 Sep 2013 08:58:54 +0000 (08:58 +0000)]
[sanitizer] Fix PR17138.

strerror_r on OSX returns a positive error code when the errno value is
unknown. Buffer contents are initialized in any case.

llvm-svn: 190295

11 years agoAdditional fix for PR16752 and for commit 190044:
Stepan Dyatkovskiy [Mon, 9 Sep 2013 07:46:54 +0000 (07:46 +0000)]
Additional fix for PR16752 and for commit 190044:
-- For TargetInfo::getRealTypeByWidth also added support for IEEEQuad float type.

llvm-svn: 190294

11 years agoC++ modules: fix a bug where loading a declaration with some name would prevent
Richard Smith [Mon, 9 Sep 2013 07:34:56 +0000 (07:34 +0000)]
C++ modules: fix a bug where loading a declaration with some name would prevent
name lookup from lazily deserializing the other declarations with the same
name, by tracking a bit to indicate whether a name in a DeclContext might have
additional external results. This also allows lazier reconciling of the lookup
table if a module import adds decls to a pre-existing DC.

However, this exposes a pre-existing bug, which causes a regression in
test/Modules/decldef.mm: if we have a reference to a declaration, and a
later-imported module adds a redeclaration, nothing causes us to load that
redeclaration when we use or emit the reference (which can manifest as a
reference to an undefined inline function, a use of an incomplete type, and so
on). decldef.mm has been extended with an additional testcase which fails with
or without this change.

llvm-svn: 190293

11 years ago[sanitizer] Delete extra whitespace.
Evgeniy Stepanov [Mon, 9 Sep 2013 06:18:07 +0000 (06:18 +0000)]
[sanitizer] Delete extra whitespace.

llvm-svn: 190292

11 years agoUpdate to the new API interface which requires the MCRegisterInfo object. <rdar:...
Bill Wendling [Mon, 9 Sep 2013 02:37:56 +0000 (02:37 +0000)]
Update to the new API interface which requires the MCRegisterInfo object. <rdar://problem/13623355>

llvm-svn: 190291

11 years agoGenerate compact unwind encoding from CFI directives.
Bill Wendling [Mon, 9 Sep 2013 02:37:14 +0000 (02:37 +0000)]
Generate compact unwind encoding from CFI directives.

We used to generate the compact unwind encoding from the machine
instructions. However, this had the problem that if the user used `-save-temps'
or compiled their hand-written `.s' file (with CFI directives), we wouldn't
generate the compact unwind encoding.

Move the algorithm that generates the compact unwind encoding into the
MCAsmBackend. This way we can generate the encoding whether the code is from a
`.ll' or `.s' file.

<rdar://problem/13623355>

llvm-svn: 190290

11 years agoImplement aarch64 neon instruction set AdvSIMD (3V Diff), covering the following...
Jiangning Liu [Mon, 9 Sep 2013 02:21:08 +0000 (02:21 +0000)]
Implement aarch64 neon instruction set AdvSIMD (3V Diff), covering the following 26 instructions,

SADDL, UADDL, SADDW, UADDW, SSUBL, USUBL, SSUBW, USUBW, ADDHN, RADDHN, SABAL, UABAL, SUBHN, RSUBHN, SABDL, UABDL, SMLAL, UMLAL, SMLSL, UMLSL, SQDMLAL, SQDMLSL, SMULL, UMULL, SQDMULL, PMULL

llvm-svn: 190289

11 years agoImplement aarch64 neon instruction set AdvSIMD (3V Diff), covering the following...
Jiangning Liu [Mon, 9 Sep 2013 02:20:27 +0000 (02:20 +0000)]
Implement aarch64 neon instruction set AdvSIMD (3V Diff), covering the following 26 instructions,

SADDL, UADDL, SADDW, UADDW, SSUBL, USUBL, SSUBW, USUBW, ADDHN, RADDHN, SABAL, UABAL, SUBHN, RSUBHN, SABDL, UABDL, SMLAL, UMLAL, SMLSL, UMLSL, SQDMLAL, SQDMLSL, SMULL, UMULL, SQDMULL, PMULL

llvm-svn: 190288

11 years agoEnable register log for FreeBSD tests
Ed Maste [Mon, 9 Sep 2013 01:19:22 +0000 (01:19 +0000)]
Enable register log for FreeBSD tests

llvm-svn: 190287

11 years agoSet shared library path on FreeBSD as on Linux for tests
Ed Maste [Mon, 9 Sep 2013 01:16:43 +0000 (01:16 +0000)]
Set shared library path on FreeBSD as on Linux for tests

llvm-svn: 190286

11 years agoSet shared library path on FreeBSD as on Linux for tests
Ed Maste [Mon, 9 Sep 2013 00:40:46 +0000 (00:40 +0000)]
Set shared library path on FreeBSD as on Linux for tests

llvm-svn: 190285

11 years agoDebug Info Testing: use null instead of an empty string in context field.
Manman Ren [Mon, 9 Sep 2013 00:12:17 +0000 (00:12 +0000)]
Debug Info Testing: use null instead of an empty string in context field.

llvm-svn: 190284

11 years agoRemove a tab that snuck in
Marshall Clow [Sun, 8 Sep 2013 21:13:57 +0000 (21:13 +0000)]
Remove a tab that snuck in

llvm-svn: 190283

11 years agoCross-compilation doc
Renato Golin [Sun, 8 Sep 2013 20:44:48 +0000 (20:44 +0000)]
Cross-compilation doc

llvm-svn: 190282

11 years agoAdding cross-compilation instructions to Clang
Renato Golin [Sun, 8 Sep 2013 20:44:39 +0000 (20:44 +0000)]
Adding cross-compilation instructions to Clang

llvm-svn: 190281

11 years agoFix minor type-o in tests.
Howard Hinnant [Sun, 8 Sep 2013 19:28:51 +0000 (19:28 +0000)]
Fix minor type-o in tests.

llvm-svn: 190280

11 years agoLWG Issue 2210 (Part #2 & #3): list and forward_list
Marshall Clow [Sun, 8 Sep 2013 19:11:51 +0000 (19:11 +0000)]
LWG Issue 2210 (Part #2 & #3): list and forward_list

llvm-svn: 190279

11 years agoclang-format: Keep empty lines and format 1-line nested blocks.
Daniel Jasper [Sun, 8 Sep 2013 14:07:57 +0000 (14:07 +0000)]
clang-format: Keep empty lines and format 1-line nested blocks.

Let clang-format consistently keep up to one empty line (configured via
FormatStyle::MaxEmptyLinesToKeep) in nested blocks, e.g. lambdas. Also,
actually format single statements in nested blocks.

Before:
  DEBUG({ int     i; });
  DEBUG({
    int i;
    // an empty line here would just be removed.
    int j;
  });

After:
  DEBUG({ int i; });
  DEBUG({
    int i;

    int j;
  });

llvm-svn: 190278

11 years ago[ASan] fix one more memory leak in test case
Alexey Samsonov [Sun, 8 Sep 2013 14:01:07 +0000 (14:01 +0000)]
[ASan] fix one more memory leak in test case

llvm-svn: 190277

11 years ago[Sanitizer] Use generic configs for running sanitizer_common unit tests
Alexey Samsonov [Sun, 8 Sep 2013 13:52:07 +0000 (13:52 +0000)]
[Sanitizer] Use generic configs for running sanitizer_common unit tests

llvm-svn: 190276

11 years agoDrop the context forceLoadAllArchives() support. Rename the isForceLoad
Joerg Sonnenberger [Sun, 8 Sep 2013 13:30:14 +0000 (13:30 +0000)]
Drop the context forceLoadAllArchives() support. Rename the isForceLoad
attribute in LinkerInput to isWholeArchive and use that for deciding
whether library archives should be expanded. Implement the -all_load
option of the Darwin linker using this flag and drop the support for it
in GNU mode.

llvm-svn: 190275

11 years ago[ASan] turn on leak checking for ASan tests and fix a few discovered leaks
Alexey Samsonov [Sun, 8 Sep 2013 13:23:29 +0000 (13:23 +0000)]
[ASan] turn on leak checking for ASan tests and fix a few discovered leaks

llvm-svn: 190274

11 years agoBring back the build of libprofile_rt on Sparc. It is now working correctly. See:
Sylvestre Ledru [Sun, 8 Sep 2013 09:15:09 +0000 (09:15 +0000)]
Bring back the build of libprofile_rt on Sparc. It is now working correctly. See:
https://buildd.debian.org/status/fetch.php?pkg=llvm-toolchain-3.3&arch=sparc&ver=1%3A3.3-9&stamp=1378398308

Thanks to Luca Falavigna for the patch

llvm-svn: 190273

11 years agoRevert r190269 to fix dragonegg failures.
Manman Ren [Sun, 8 Sep 2013 06:02:56 +0000 (06:02 +0000)]
Revert r190269 to fix dragonegg failures.

llvm-svn: 190271

11 years agoDebug Info: use null instead of "i32 0" in DIBuilder.
Manman Ren [Sun, 8 Sep 2013 06:00:42 +0000 (06:00 +0000)]
Debug Info: use null instead of "i32 0" in DIBuilder.

For context field of subroutine_type and when creating artificial types.

llvm-svn: 190270

11 years agoDebug Info: pass in DIScope instead of DIDescriptor in createMemberType.
Manman Ren [Sun, 8 Sep 2013 04:07:59 +0000 (04:07 +0000)]
Debug Info: pass in DIScope instead of DIDescriptor in createMemberType.

Improve readability. No functionality change.

llvm-svn: 190269