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

11 years agoDebug Info: pass in DIScope instead of DIDescriptor in createFieldType.
Manman Ren [Sun, 8 Sep 2013 03:45:05 +0000 (03:45 +0000)]
Debug Info: pass in DIScope instead of DIDescriptor in createFieldType.

Improve readability. No functionality change.

llvm-svn: 190268

11 years agoDebug Info Testing: update context from empty string to null.
Manman Ren [Sun, 8 Sep 2013 03:11:54 +0000 (03:11 +0000)]
Debug Info Testing: update context from empty string to null.

Context should be either null or MDNode.

llvm-svn: 190267

11 years agoAdd neverHasSideEffects=1 on a couple move instructions.
Craig Topper [Sun, 8 Sep 2013 00:50:45 +0000 (00:50 +0000)]
Add neverHasSideEffects=1 on a couple move instructions.

llvm-svn: 190259

11 years agoUsing popcount should check the popcount feature flag not the SSE41 feature flag.
Craig Topper [Sun, 8 Sep 2013 00:47:31 +0000 (00:47 +0000)]
Using popcount should check the popcount feature flag not the SSE41 feature flag.

llvm-svn: 190258

11 years agoCorrect typo.
David Majnemer [Sat, 7 Sep 2013 20:21:47 +0000 (20:21 +0000)]
Correct typo.

llvm-svn: 190257

11 years agoAuto-detect the architecture of the executable instead of using the arch of
Adrian Prantl [Sat, 7 Sep 2013 20:04:29 +0000 (20:04 +0000)]
Auto-detect the architecture of the executable instead of using the arch of
the kernel.

llvm-svn: 190256

11 years agoUpdate documentation.
Joerg Sonnenberger [Sat, 7 Sep 2013 18:01:39 +0000 (18:01 +0000)]
Update documentation.

llvm-svn: 190255

11 years agoRun clang-format.
Joerg Sonnenberger [Sat, 7 Sep 2013 17:56:23 +0000 (17:56 +0000)]
Run clang-format.

llvm-svn: 190254

11 years agoChange the parseFile argument from MemoryBuffer pointer to LinkerInput
Joerg Sonnenberger [Sat, 7 Sep 2013 17:55:28 +0000 (17:55 +0000)]
Change the parseFile argument from MemoryBuffer pointer to LinkerInput
reference. Move readFile logic into FileNode::createLinkerInput.

llvm-svn: 190253

11 years agoSet the architecture when creating a target.
Adrian Prantl [Sat, 7 Sep 2013 17:14:37 +0000 (17:14 +0000)]
Set the architecture when creating a target.

llvm-svn: 190252

11 years agoLWG Issue 2210 (Part #1): deque
Marshall Clow [Sat, 7 Sep 2013 16:16:19 +0000 (16:16 +0000)]
LWG Issue 2210 (Part #1): deque

llvm-svn: 190251

11 years agoRun clang-format on these header files. Part of a WIP.
Bill Wendling [Sat, 7 Sep 2013 11:55:36 +0000 (11:55 +0000)]
Run clang-format on these header files. Part of a WIP.

llvm-svn: 190250

11 years agoFixed bug in call to CXXTemporaryObjectExpr ctor.
Enea Zaffanella [Sat, 7 Sep 2013 11:22:02 +0000 (11:22 +0000)]
Fixed bug in call to CXXTemporaryObjectExpr ctor.

llvm-svn: 190249

11 years agoadd OCLint to the list of projects based on clang
Sylvestre Ledru [Sat, 7 Sep 2013 07:59:01 +0000 (07:59 +0000)]
add OCLint to the list of projects based on clang

llvm-svn: 190248

11 years agoadd he 'include what you use' project
Sylvestre Ledru [Sat, 7 Sep 2013 07:56:03 +0000 (07:56 +0000)]
add he 'include what you use' project

llvm-svn: 190247

11 years agoremove the description about clang & llvm in the freebsd section (the reader probably...
Sylvestre Ledru [Sat, 7 Sep 2013 07:52:20 +0000 (07:52 +0000)]
remove the description about clang & llvm in the freebsd section (the reader probably know what are llvm and clang

llvm-svn: 190246

11 years agoabout the debian effort to rebuild the archive with clang
Sylvestre Ledru [Sat, 7 Sep 2013 07:51:23 +0000 (07:51 +0000)]
about the debian effort to rebuild the archive with clang

llvm-svn: 190245

11 years agoClang event are now part of the llvm events. Add a link to the LLVM events
Sylvestre Ledru [Sat, 7 Sep 2013 07:39:49 +0000 (07:39 +0000)]
Clang event are now part of the llvm events. Add a link to the LLVM events

llvm-svn: 190244

11 years agoUpdate the link to the current code coverage reports (the previous one has not been...
Sylvestre Ledru [Sat, 7 Sep 2013 07:37:18 +0000 (07:37 +0000)]
Update the link to the current code coverage reports (the previous one has not been updated since february 2010) + remove the spec references, not updated since May 2010

llvm-svn: 190243

11 years ago'return' before 'else' is bad style
David Majnemer [Sat, 7 Sep 2013 07:11:04 +0000 (07:11 +0000)]
'return' before 'else' is bad style

llvm-svn: 190241

11 years agoAST: __uuidof should leak through templated types
David Majnemer [Sat, 7 Sep 2013 06:59:46 +0000 (06:59 +0000)]
AST: __uuidof should leak through templated types

Summary:
__uuidof on templated types should exmaine if any of its template
parameters have a uuid declspec.  If exactly one does, then take it.
Otherwise, issue an appropriate error.

Reviewers: rsmith, thakis, rnk

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

llvm-svn: 190240

11 years agoFix missing source location in CXXTemporaryObjectExpr nodes.
Enea Zaffanella [Sat, 7 Sep 2013 05:49:53 +0000 (05:49 +0000)]
Fix missing source location in CXXTemporaryObjectExpr nodes.
For clarity, renamed (get/set)ParenRange as (get/set)ParenOrBraceRange
in CXXConstructExpr nodes.
Added testcase.

llvm-svn: 190239

11 years agoAdded some MSVC required functions in Windows.cpp. Moved MSVC specific getopt code...
Virgile Bello [Sat, 7 Sep 2013 05:05:49 +0000 (05:05 +0000)]
Added some MSVC required functions in Windows.cpp. Moved MSVC specific getopt code inside its own folder.

llvm-svn: 190238

11 years agoScopInfo: Correctly handle true/false conditions
Tobias Grosser [Sat, 7 Sep 2013 01:54:13 +0000 (01:54 +0000)]
ScopInfo: Correctly handle true/false conditions

This is a modified version of the orignally contributed patch.

Contributed-by: alexandre.isoard@gmail.com
llvm-svn: 190237

11 years ago[mips] Fix typos.
Akira Hatanaka [Sat, 7 Sep 2013 01:14:42 +0000 (01:14 +0000)]
[mips] Fix typos.

llvm-svn: 190236

11 years ago[mips] Enhance command line option "-mno-ldc1-sdc1" to expand base+index double
Akira Hatanaka [Sat, 7 Sep 2013 00:52:30 +0000 (00:52 +0000)]
[mips] Enhance command line option "-mno-ldc1-sdc1" to expand base+index double
precision loads and stores as well as reg+imm double precision loads and stores.

Previously, expansion of loads and stores was done after register allocation,
but now it takes place during legalization. As a result, users will see double
precision stores and loads being emitted to spill and restore 64-bit FP registers.

llvm-svn: 190235

11 years ago[mips] Place parentheses around && to silence warning.
Akira Hatanaka [Sat, 7 Sep 2013 00:26:26 +0000 (00:26 +0000)]
[mips] Place parentheses around && to silence warning.

llvm-svn: 190234

11 years agoRemove verifier check that attribute 'builtin' is only applied to calls to
Richard Smith [Sat, 7 Sep 2013 00:25:48 +0000 (00:25 +0000)]
Remove verifier check that attribute 'builtin' is only applied to calls to
functions marked 'nobuiltin'. That approach doesn't play well with LTO, and
there's no harm in marking a call as 'builtin' if it was going to be a builtin
regardless.

llvm-svn: 190233

11 years ago[mips] Add definition of instruction "drotr32" (double rotate right plus 32).
Akira Hatanaka [Sat, 7 Sep 2013 00:18:01 +0000 (00:18 +0000)]
[mips] Add definition of instruction "drotr32" (double rotate right plus 32).

llvm-svn: 190232

11 years agoDebug Info: Use identifier to reference DIType in containing type field of
Manman Ren [Sat, 7 Sep 2013 00:04:05 +0000 (00:04 +0000)]
Debug Info: Use identifier to reference DIType in containing type field of
a DISubprogram.

Verifier is updated accordingly.

llvm-svn: 190229

11 years ago[mips] Use uimm5 and uimm6 instead of shamt and imm, if the immediate has to fit
Akira Hatanaka [Sat, 7 Sep 2013 00:02:02 +0000 (00:02 +0000)]
[mips] Use uimm5 and uimm6 instead of shamt and imm, if the immediate has to fit
into a 5-bit or 6-bit field.

llvm-svn: 190226

11 years agoDebug Info: pass in VTableHolder as DIType instead of MDNode *.
Manman Ren [Fri, 6 Sep 2013 23:54:23 +0000 (23:54 +0000)]
Debug Info: pass in VTableHolder as DIType instead of MDNode *.

Remove one cast and improve readability. No functionality change.

llvm-svn: 190225

11 years ago[mips] Define "trap" as a pseudo instruction that turns into "break 0, 0".
Akira Hatanaka [Fri, 6 Sep 2013 23:52:46 +0000 (23:52 +0000)]
[mips] Define "trap" as a pseudo instruction that turns into "break 0, 0".

llvm-svn: 190224

11 years agoObjectiveC migrator: When inferring a property,
Fariborz Jahanian [Fri, 6 Sep 2013 23:45:20 +0000 (23:45 +0000)]
ObjectiveC migrator: When inferring a property,
preserve getter's attribute. Also, do not attach
an inferred NS_RETURNS_INNER_POINTER to the inferred
property (it is illegal).

llvm-svn: 190223

11 years agoReorder libm LIBBUILTIN definition groups
Hal Finkel [Fri, 6 Sep 2013 23:45:10 +0000 (23:45 +0000)]
Reorder libm LIBBUILTIN definition groups

The groups of libm LIBBUILTIN definitions are reordered to match the order of
the corresponding __builtin_* definitions (which occur earlier in the
Builtins.def file).

No functionality change intended.

llvm-svn: 190222

11 years ago[mips] Delete unused classes and defs.
Akira Hatanaka [Fri, 6 Sep 2013 23:42:58 +0000 (23:42 +0000)]
[mips] Delete unused classes and defs.

llvm-svn: 190221

11 years ago[mips] Make "b" (unconditional branch) a pseudo. "b" is an assembly idiom, which is
Akira Hatanaka [Fri, 6 Sep 2013 23:40:15 +0000 (23:40 +0000)]
[mips] Make "b" (unconditional branch) a pseudo. "b" is an assembly idiom, which is
equivalent to "beq $zero, $zero, offset".

llvm-svn: 190220

11 years ago[mips] Set instruction itineraries of loads, stores and conditional moves.
Akira Hatanaka [Fri, 6 Sep 2013 23:28:24 +0000 (23:28 +0000)]
[mips] Set instruction itineraries of loads, stores and conditional moves.

llvm-svn: 190219

11 years agoReorder libm LIBBUILTIN definitions
Hal Finkel [Fri, 6 Sep 2013 23:23:53 +0000 (23:23 +0000)]
Reorder libm LIBBUILTIN definitions

The libm LIBBUILTIN definitions are reordered to the canonical (and
alphabetical) double (''), float ('f'), long double ('l') ordering.

No functionality change intended.

llvm-svn: 190218

11 years agoAdd the missing "n" to libm LIBBUILTIN definitions
Hal Finkel [Fri, 6 Sep 2013 23:23:32 +0000 (23:23 +0000)]
Add the missing "n" to libm LIBBUILTIN definitions

The libm math functions should be marked with the "n" (nothrow) flag so that
the corresponding IR function declarations are tagged with the nounwind
attribute (this has been true in C mode, but not in C++ mode).

The test case has been updated to run in C++ mode in addition to in C mode.

llvm-svn: 190217

11 years agoTBAA: add isTBAAVtableAccess to MDNode so clients can call the function
Manman Ren [Fri, 6 Sep 2013 22:47:05 +0000 (22:47 +0000)]
TBAA: add isTBAAVtableAccess to MDNode so clients can call the function
instead of having its own implementation.

The implementation of isTBAAVtableAccess is in TypeBasedAliasAnalysis.cpp
since it is related to the format of TBAA metadata.

The path for struct-path tbaa will be exercised by
test/Instrumentation/ThreadSanitizer/read_from_global.ll, vptr_read.ll, and
vptr_update.ll when struct-path tbaa is on by default.

llvm-svn: 190216

11 years agoUse a more backwards-compatible method for evaluating expressions and add
Adrian Prantl [Fri, 6 Sep 2013 22:33:52 +0000 (22:33 +0000)]
Use a more backwards-compatible method for evaluating expressions and add
more explanatory error messages.

llvm-svn: 190215

11 years agoRe-enable some locally passing tests on Linux and see how they behave on the buildbots.
Matt Kopec [Fri, 6 Sep 2013 22:33:49 +0000 (22:33 +0000)]
Re-enable some locally passing tests on Linux and see how they behave on the buildbots.

llvm-svn: 190214

11 years agoRemove error-prone 'list initialization' flag from an implicit conversion
Richard Smith [Fri, 6 Sep 2013 22:30:28 +0000 (22:30 +0000)]
Remove error-prone 'list initialization' flag from an implicit conversion
sequence. All that matters here is whether we're doing the
std::initializer_list special case thing.

llvm-svn: 190213

11 years agoclang-modernize: Fix bugs in Pass-By-Value transform
Guillaume Papin [Fri, 6 Sep 2013 22:28:53 +0000 (22:28 +0000)]
clang-modernize: Fix bugs in Pass-By-Value transform

- Limit the transform to const-ref and non-const value parameters only.
- Do not generate a replacement when the type is already a value.

See CM-139 for the bugs corresponding to this issue.

llvm-svn: 190212

11 years agoImplement mad_hi built-in
Aaron Watry [Fri, 6 Sep 2013 22:09:51 +0000 (22:09 +0000)]
Implement mad_hi built-in

We already have a working mul_hi, and the spec gives us the implementation as:
Returns mul_hi(a,b)+c.

Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 190211

11 years ago[PECOFF] Don't add RVAs to base relocations table.
Rui Ueyama [Fri, 6 Sep 2013 22:09:02 +0000 (22:09 +0000)]
[PECOFF] Don't add RVAs to base relocations table.

Patch by Ron Ofir.

llvm-svn: 190210

11 years agoclang-format: Fix regression introduced by r190038.
Daniel Jasper [Fri, 6 Sep 2013 21:46:41 +0000 (21:46 +0000)]
clang-format: Fix regression introduced by r190038.

Before:
  Constructor()
      : aaaaaaaaaaaaaaaaaaaa(a), bbbbbbbbbbbbbbbbbbbbbbbb(b) {
                                 }
After:
  Constructor()
      : aaaaaaaaaaaaaaaaaaaa(a), bbbbbbbbbbbbbbbbbbbbbbbb(b) {
  }

llvm-svn: 190209

11 years agoclang-format: Format typed enums with nested names.
Daniel Jasper [Fri, 6 Sep 2013 21:32:35 +0000 (21:32 +0000)]
clang-format: Format typed enums with nested names.

The explicit type specified for an enum can actually have a nested name
specifier.

This fixes llvm.org/PR17125.

llvm-svn: 190208

11 years agoclang-format: Don't confuse operator[] with lambdas.
Daniel Jasper [Fri, 6 Sep 2013 21:25:51 +0000 (21:25 +0000)]
clang-format: Don't confuse operator[] with lambdas.

Before:
  double &operator[](int i) { return 0; } int i;

After:
  double &operator[](int i) { return 0; }
  int i;

This fixes llvm.org/PR17134.

llvm-svn: 190207

11 years agoPreserve exception specs in function decl merging.
Eli Friedman [Fri, 6 Sep 2013 21:09:09 +0000 (21:09 +0000)]
Preserve exception specs in function decl merging.

Exception specs are not part of the canonical type, but we shouldn't
drop them just because we merged a noreturn attribute.

Fixes PR17110.

llvm-svn: 190206

11 years agoDebug Info Testing: updated to use NULL instead of "i32 0" in a few fields.
Manman Ren [Fri, 6 Sep 2013 21:03:58 +0000 (21:03 +0000)]
Debug Info Testing: updated to use NULL instead of "i32 0" in a few fields.

Field 2 of DIType (Context), field 9 of DIDerivedType (TypeDerivedFrom),
field 12 of DICompositeType (ContainingType), fields 2, 7, 12 of DISubprogram
(Context, Type, ContainingType).

llvm-svn: 190205

11 years agoUnbreak the Clang -Werror build after r190183.
David Blaikie [Fri, 6 Sep 2013 20:58:25 +0000 (20:58 +0000)]
Unbreak the Clang -Werror build after r190183.

Best guess at the right answer here - no guarantees of fitness for any
particular purpose.

llvm-svn: 190203

11 years agoclang-cl: ignore /RTC options (PR17129)
Hans Wennborg [Fri, 6 Sep 2013 20:26:25 +0000 (20:26 +0000)]
clang-cl: ignore /RTC options (PR17129)

I don't think Clang intends to implement this functionality.
ASan should be used instead. Since /RTC is often passed by default
from MSBuild, ignore the option to avoid bloating the output.

llvm-svn: 190202

11 years agoAdd atomic_sub and atomic_dec builtin functions
Aaron Watry [Fri, 6 Sep 2013 20:20:21 +0000 (20:20 +0000)]
Add atomic_sub and atomic_dec builtin functions

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 190201

11 years agoR600: Add support for LDS atomic subtract
Aaron Watry [Fri, 6 Sep 2013 20:17:42 +0000 (20:17 +0000)]
R600: Add support for LDS atomic subtract

Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 190200