platform/upstream/llvm.git
11 years agoFix spelling error. s/Libary/Library/g.
Rui Ueyama [Fri, 9 Aug 2013 04:19:54 +0000 (04:19 +0000)]
Fix spelling error. s/Libary/Library/g.

llvm-svn: 188049

11 years agoSet ISD::FROUND to Expand by default for all types
Hal Finkel [Fri, 9 Aug 2013 04:13:44 +0000 (04:13 +0000)]
Set ISD::FROUND to Expand by default for all types

For most libm ISD nodes, TargetLoweringBase::initActions sets the default
scalar-type action to Expand, and leaves the vector-type action default as
Legal. This is not appropriate for the new ISD::FROUND node (which no backend
but PowerPC handles explicitly).

Fixes PR16842.

llvm-svn: 188048

11 years ago[CodeGen] prevent abnormal on invalid attributes
Saleem Abdulrasool [Fri, 9 Aug 2013 01:52:03 +0000 (01:52 +0000)]
[CodeGen] prevent abnormal on invalid attributes

Currently, when an invalid attribute is encountered on processing a .s file,
clang will abort due to llvm_unreachable.  Invalid user input should not cause
an abnormal termination of the compiler.  Change the interface to return a
boolean to indicate the failure as a first step towards improving hanlding of
malformed user input to clang.

Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org>
llvm-svn: 188047

11 years ago[PECOFF] Fully cover the switch for COMDAT attributes and add a comment.
Rui Ueyama [Fri, 9 Aug 2013 01:06:21 +0000 (01:06 +0000)]
[PECOFF] Fully cover the switch for COMDAT attributes and add a comment.

llvm-svn: 188046

11 years agoFix comment typo.
Rui Ueyama [Fri, 9 Aug 2013 01:06:19 +0000 (01:06 +0000)]
Fix comment typo.

llvm-svn: 188045

11 years agoOptimistically ignore scattered relocations in MachO in RuntimeDyld. This
Lang Hames [Fri, 9 Aug 2013 00:57:01 +0000 (00:57 +0000)]
Optimistically ignore scattered relocations in MachO in RuntimeDyld. This
un-breaks simple use cases while I work on more general support.

<rdar://problem/14487667>

llvm-svn: 188044

11 years ago[analyzer] Warn when using 'delete' on an uninitialized variable.
Jordan Rose [Fri, 9 Aug 2013 00:55:47 +0000 (00:55 +0000)]
[analyzer] Warn when using 'delete' on an uninitialized variable.

Patch by Karthik Bhat, modified slightly by me.

llvm-svn: 188043

11 years ago[tests] Make string encoding issues explicit.
Daniel Dunbar [Fri, 9 Aug 2013 00:45:18 +0000 (00:45 +0000)]
[tests] Make string encoding issues explicit.

llvm-svn: 188042

11 years ago[tests] Avoid deprecated except syntax.
Daniel Dunbar [Fri, 9 Aug 2013 00:44:59 +0000 (00:44 +0000)]
[tests] Avoid deprecated except syntax.

llvm-svn: 188041

11 years ago[lit] Rename lit.{TestFormats,Util} to their aliased names {formats,util}.
Daniel Dunbar [Fri, 9 Aug 2013 00:37:15 +0000 (00:37 +0000)]
[lit] Rename lit.{TestFormats,Util} to their aliased names {formats,util}.

 - With compatibility hack in lit.__init__, so this hopefully shouldn't break
   anything.

llvm-svn: 188040

11 years ago[lit] Inject the lit specific config object as 'lit_config' when loading config files.
Daniel Dunbar [Fri, 9 Aug 2013 00:37:05 +0000 (00:37 +0000)]
[lit] Inject the lit specific config object as 'lit_config' when loading config files.

 - Injecting it as 'lit' is gross, since that name should be used to refer to
   the actual package. For now both are available so it is possibly to cleanup
   test config files incrementally.

llvm-svn: 188039

11 years ago[lit] Split TestingConfig.frompath() into separate ctor and load methods.
Daniel Dunbar [Fri, 9 Aug 2013 00:36:58 +0000 (00:36 +0000)]
[lit] Split TestingConfig.frompath() into separate ctor and load methods.

llvm-svn: 188038

11 years agoclang-cl: Support /showIncludes
Hans Wennborg [Fri, 9 Aug 2013 00:32:23 +0000 (00:32 +0000)]
clang-cl: Support /showIncludes

This option prints information about #included files to stderr. Clang could
already do it, this patch just teaches the existing code about the /showIncludes
style and adds the flag.

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

llvm-svn: 188037

11 years agoFix false error message for function-style macro instance used as arguments in other...
John Thompson [Fri, 9 Aug 2013 00:22:20 +0000 (00:22 +0000)]
Fix false error message for function-style macro instance used as arguments in other function-style macros instances, and add test for it.

llvm-svn: 188036

11 years agoExtend comments for problems and future directions.
John Thompson [Fri, 9 Aug 2013 00:19:03 +0000 (00:19 +0000)]
Extend comments for problems and future directions.

llvm-svn: 188035

11 years ago[lit] Eliminate mustExist parameter from TestingConfig.frompath().
Daniel Dunbar [Fri, 9 Aug 2013 00:09:02 +0000 (00:09 +0000)]
[lit] Eliminate mustExist parameter from TestingConfig.frompath().

llvm-svn: 188034

11 years ago[lit] Only create config copies when a local config file is present.
Daniel Dunbar [Fri, 9 Aug 2013 00:08:56 +0000 (00:08 +0000)]
[lit] Only create config copies when a local config file is present.

llvm-svn: 188033

11 years ago[lit] Eliminate parent argument from TestingConfig.frompath(), which is effectively...
Daniel Dunbar [Fri, 9 Aug 2013 00:08:46 +0000 (00:08 +0000)]
[lit] Eliminate parent argument from TestingConfig.frompath(), which is effectively unused.

llvm-svn: 188032

11 years agoAdd missing PPC64 relocation types.
Michael J. Spencer [Thu, 8 Aug 2013 23:58:18 +0000 (23:58 +0000)]
Add missing PPC64 relocation types.

llvm-svn: 188031

11 years agoUpdate the CMake build files.
Eric Christopher [Thu, 8 Aug 2013 23:51:31 +0000 (23:51 +0000)]
Update the CMake build files.

llvm-svn: 188030

11 years agoRevert r185882. This is causing problems with the gold linker and might be better...
Bill Wendling [Thu, 8 Aug 2013 23:51:04 +0000 (23:51 +0000)]
Revert r185882. This is causing problems with the gold linker and might be better handled by the linker.

llvm-svn: 188029

11 years agoMove hash computation code into a separate class and file.
Eric Christopher [Thu, 8 Aug 2013 23:45:55 +0000 (23:45 +0000)]
Move hash computation code into a separate class and file.

No functional change intended.

llvm-svn: 188028

11 years agoclang-cl: Map /Oi[-] to -f[no-]builtin
Hans Wennborg [Thu, 8 Aug 2013 23:44:01 +0000 (23:44 +0000)]
clang-cl: Map /Oi[-] to -f[no-]builtin

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

llvm-svn: 188027

11 years ago[PECOFF] Support COMDAT section that contains mergeable atoms.
Rui Ueyama [Thu, 8 Aug 2013 23:31:50 +0000 (23:31 +0000)]
[PECOFF] Support COMDAT section that contains mergeable atoms.

The COMDAT section is a section with a special attribute to tell the linker
whether the symbols in the section are allowed to be merged or not. This patch
add a function to interpret the COMDAT data and set "merge" attribute to the
atoms accordingly.

LLD supports multiple policies to merge atoms; atoms can be merged by name or
by content. COFF supports them, and in addition to that, it supports
choose-the-largest-atom policy, which LLD currently does not support. I simply
mapped it to merge-by-name attribute for now, but we eventually have to support
that policy in the core linker.

llvm-svn: 188025

11 years agoMips ELF: MicroMips direct object Little endian support.
Jack Carter [Thu, 8 Aug 2013 23:30:40 +0000 (23:30 +0000)]
Mips ELF: MicroMips direct object Little endian support.

Test included.

Patch by Zoran Jovanovich

llvm-svn: 188024

11 years agollvm isn't C++11 yet :(
Michael J. Spencer [Thu, 8 Aug 2013 22:50:40 +0000 (22:50 +0000)]
llvm isn't C++11 yet :(

llvm-svn: 188023

11 years ago[Object] Split the ELF interface into 3 parts.
Michael J. Spencer [Thu, 8 Aug 2013 22:27:13 +0000 (22:27 +0000)]
[Object] Split the ELF interface into 3 parts.

* ELFTypes.h contains template magic for defining types based on endianess, size, and alignment.
* ELFFile.h defines the ELFFile class which provides low level ELF specific access.
* ELFObjectFile.h contains ELFObjectFile which uses ELFFile to implement the ObjectFile interface.

llvm-svn: 188022

11 years agoUpdate to llvm changes.
Michael J. Spencer [Thu, 8 Aug 2013 22:26:50 +0000 (22:26 +0000)]
Update to llvm changes.

llvm-svn: 188021

11 years ago[mips] Rename accumulator register classes and FP register operands.
Akira Hatanaka [Thu, 8 Aug 2013 21:54:26 +0000 (21:54 +0000)]
[mips] Rename accumulator register classes and FP register operands.

llvm-svn: 188020

11 years agoN3644 tests for map/multimap/set/multiset. Drive-by NOEXCEPT for __tree_const_iterato...
Marshall Clow [Thu, 8 Aug 2013 21:52:50 +0000 (21:52 +0000)]
N3644 tests for map/multimap/set/multiset. Drive-by NOEXCEPT for __tree_const_iterator constructor. Fix comment typos in other tests

llvm-svn: 188019

11 years agounbreak buildbot on Windows.
Fariborz Jahanian [Thu, 8 Aug 2013 21:51:06 +0000 (21:51 +0000)]
unbreak buildbot on Windows.

llvm-svn: 188018

11 years ago[mips] Mark pseudo instructions as code-gen only.
Akira Hatanaka [Thu, 8 Aug 2013 21:44:39 +0000 (21:44 +0000)]
[mips] Mark pseudo instructions as code-gen only.

llvm-svn: 188017

11 years ago[mips] Delete register class HWRegs64.
Akira Hatanaka [Thu, 8 Aug 2013 21:37:32 +0000 (21:37 +0000)]
[mips] Delete register class HWRegs64.

No functionality change.

llvm-svn: 188016

11 years agoEnsure that we don't build LLVM with a dependency
Sean Callanan [Thu, 8 Aug 2013 21:30:51 +0000 (21:30 +0000)]
Ensure that we don't build LLVM with a dependency
on curses.

llvm-svn: 188015

11 years agocast fix to appease buildbot
David Fang [Thu, 8 Aug 2013 21:29:30 +0000 (21:29 +0000)]
cast fix to appease buildbot

llvm-svn: 188014

11 years agoObjectiveC migrator: tighten rule about when to
Fariborz Jahanian [Thu, 8 Aug 2013 21:20:01 +0000 (21:20 +0000)]
ObjectiveC migrator: tighten rule about when to
migrate to @property with getter name starting with
'is'.

llvm-svn: 188013

11 years agoRevert "Reapply r185872 now that the address sanitizer has been changed to support...
Arnold Schwaighofer [Thu, 8 Aug 2013 21:04:16 +0000 (21:04 +0000)]
Revert "Reapply r185872 now that the address sanitizer has been changed to support this."

This reverts commit r187939. It broke an O0 build of a spec benchmark.

llvm-svn: 188012

11 years agoUpdate the .drectve section to remove reference to nonexistent files.
Rui Ueyama [Thu, 8 Aug 2013 21:04:09 +0000 (21:04 +0000)]
Update the .drectve section to remove reference to nonexistent files.

llvm-svn: 188011

11 years ago[tests] Remove dead VALGRIND and CLEANED_TESTSUITE makefile variables.
Daniel Dunbar [Thu, 8 Aug 2013 20:59:27 +0000 (20:59 +0000)]
[tests] Remove dead VALGRIND and CLEANED_TESTSUITE makefile variables.

llvm-svn: 188010

11 years ago[lit] Change --show-{tests,suites} to exit after printing.
Daniel Dunbar [Thu, 8 Aug 2013 20:59:25 +0000 (20:59 +0000)]
[lit] Change --show-{tests,suites} to exit after printing.

 - This is a more sensible behavior than printing and also running tests.

llvm-svn: 188009

11 years ago[lit] Remove --repeat option, which wasn't that useful.
Daniel Dunbar [Thu, 8 Aug 2013 20:59:20 +0000 (20:59 +0000)]
[lit] Remove --repeat option, which wasn't that useful.

llvm-svn: 188008

11 years ago[lit] Eliminate some nested imports.
Daniel Dunbar [Thu, 8 Aug 2013 20:59:16 +0000 (20:59 +0000)]
[lit] Eliminate some nested imports.

llvm-svn: 188007

11 years ago[lit] Remove on_clone member, which is no longer used.
Daniel Dunbar [Thu, 8 Aug 2013 20:59:13 +0000 (20:59 +0000)]
[lit] Remove on_clone member, which is no longer used.

llvm-svn: 188006

11 years agoObjectiveC migration: Handle another special case of
Fariborz Jahanian [Thu, 8 Aug 2013 20:51:58 +0000 (20:51 +0000)]
ObjectiveC migration: Handle another special case of
setter/getter methods which can be migrated to
a @property.

llvm-svn: 188005

11 years agoinitial draft of PPCMachObjectWriter.cpp
David Fang [Thu, 8 Aug 2013 20:14:40 +0000 (20:14 +0000)]
initial draft of PPCMachObjectWriter.cpp
this records relocation entries in the mach-o object file
for PIC code generation.
tested on powerpc-darwin8, validated against darwin otool -rvV

llvm-svn: 188004

11 years agoclang-cl: use MS C++ ABI
Hans Wennborg [Thu, 8 Aug 2013 19:54:30 +0000 (19:54 +0000)]
clang-cl: use MS C++ ABI

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

llvm-svn: 188000

11 years agoFix alignof computation of large arrays on x86_64.
Rafael Espindola [Thu, 8 Aug 2013 19:53:46 +0000 (19:53 +0000)]
Fix alignof computation of large arrays on x86_64.

We were exposing the extra alignment given to large arrays. The new behavior
matches gcc, which is a good thing since this is a gcc extension.

Thanks to Joerg Sonnenberger for noticing it.

While at it, centralize the method description in the .h file.

llvm-svn: 187999

11 years agoRevert "clang-cl: Hook up /Za to prevent adding oldnames.lib dependency"
Reid Kleckner [Thu, 8 Aug 2013 19:33:10 +0000 (19:33 +0000)]
Revert "clang-cl: Hook up /Za to prevent adding oldnames.lib dependency"

This reverts commit r187991 and adjusts the comment.  /Za is much more
involved, and we don't want to give anyone the impression we actually
support it.

llvm-svn: 187998

11 years agoMy previous reorganization of addressof broke -std=c++03. Thanks much to Arnold...
Howard Hinnant [Thu, 8 Aug 2013 18:38:55 +0000 (18:38 +0000)]
My previous reorganization of addressof broke -std=c++03.  Thanks much to Arnold Schwaighofer for catching this.  This patch also catches a few more missing addressof in <future>, thanks go to Zhihao Yuan for catching these.

llvm-svn: 187997

11 years agoCheck for division by zero when performing modulus
Sean Callanan [Thu, 8 Aug 2013 17:57:00 +0000 (17:57 +0000)]
Check for division by zero when performing modulus
operations.

<rdar://problem/14656908>

llvm-svn: 187996

11 years agoRemove unreachable code when thread exits on Linux.
Matt Kopec [Thu, 8 Aug 2013 17:55:16 +0000 (17:55 +0000)]
Remove unreachable code when thread exits on Linux.

llvm-svn: 187995

11 years agoAdd clang_Location_isFromMainFile() to libclang.
Stefanus Du Toit [Thu, 8 Aug 2013 17:48:14 +0000 (17:48 +0000)]
Add clang_Location_isFromMainFile() to libclang.

Also bump the minor version number and update libclang.exports.

Reviewed by: Dmitri Gribenko, Doug Gregor

llvm-svn: 187994

11 years agoRemove misleading comment about using cc1 option table.
Hans Wennborg [Thu, 8 Aug 2013 17:34:27 +0000 (17:34 +0000)]
Remove misleading comment about using cc1 option table.

There hasn't been a separate cc1 option table since r155916.

llvm-svn: 187993

11 years agoFix off-by-one error in Regex::isValid
Alexey Samsonov [Thu, 8 Aug 2013 17:32:45 +0000 (17:32 +0000)]
Fix off-by-one error in Regex::isValid

llvm-svn: 187992

11 years agoclang-cl: Hook up /Za to prevent adding oldnames.lib dependency
Hans Wennborg [Thu, 8 Aug 2013 16:54:31 +0000 (16:54 +0000)]
clang-cl: Hook up /Za to prevent adding oldnames.lib dependency

The /Za flag should probably do more, but let's start with this.

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

llvm-svn: 187991

11 years agoFix speling.
David Blaikie [Thu, 8 Aug 2013 16:49:52 +0000 (16:49 +0000)]
Fix speling.

Patch by Richard (legalize@xmission.com)

llvm-svn: 187990

11 years agoscan-build: pass -target through to analyzer
Jordan Rose [Thu, 8 Aug 2013 16:06:26 +0000 (16:06 +0000)]
scan-build: pass -target through to analyzer

llvm-svn: 187989

11 years agoR600/SI: Implement fp32<->fp64 conversions
Niels Ole Salscheider [Thu, 8 Aug 2013 16:06:15 +0000 (16:06 +0000)]
R600/SI: Implement fp32<->fp64 conversions

llvm-svn: 187988

11 years agoR600/SI: Implement sint<->fp64 conversions
Niels Ole Salscheider [Thu, 8 Aug 2013 16:06:08 +0000 (16:06 +0000)]
R600/SI: Implement sint<->fp64 conversions

llvm-svn: 187987

11 years agoUse pop_back() instead of pop_back_val() when the returned value is not used.
Jakub Staszak [Thu, 8 Aug 2013 15:48:46 +0000 (15:48 +0000)]
Use pop_back() instead of pop_back_val() when the returned value is not used.

llvm-svn: 187986

11 years agoRemove the now redundant FeatureFP16 from the Cortex-A15 feature list. It was made...
Silviu Baranga [Thu, 8 Aug 2013 15:47:33 +0000 (15:47 +0000)]
Remove the now redundant FeatureFP16 from the Cortex-A15 feature list. It was made redundant when FeatureVFP4 was added which implies FP16.

llvm-svn: 187985

11 years agoFix the comment.
Jakub Staszak [Thu, 8 Aug 2013 15:19:25 +0000 (15:19 +0000)]
Fix the comment.

llvm-svn: 187984

11 years ago[sanitizer] Limit scandir interceptor to Linux.
Evgeniy Stepanov [Thu, 8 Aug 2013 14:04:36 +0000 (14:04 +0000)]
[sanitizer] Limit scandir interceptor to Linux.

Implementation uses __thread not available on certain platforms.

llvm-svn: 187983

11 years ago[sanitizer] Intercept scandir/scandir64.
Evgeniy Stepanov [Thu, 8 Aug 2013 13:57:15 +0000 (13:57 +0000)]
[sanitizer] Intercept scandir/scandir64.

llvm-svn: 187982

11 years agoPollyDependence: Simplify Read/Write/MayWrite before feeding them into ISL.
Tobias Grosser [Thu, 8 Aug 2013 13:55:45 +0000 (13:55 +0000)]
PollyDependence: Simplify Read/Write/MayWrite before feeding them into ISL.

Contributed-by: Star Tan <tanmx_star@yeah.net>
llvm-svn: 187981

11 years agotsan: better diagnostics for invalid addresses passed to free()
Dmitry Vyukov [Thu, 8 Aug 2013 13:47:50 +0000 (13:47 +0000)]
tsan: better  diagnostics for invalid addresses passed to free()

llvm-svn: 187980

11 years agoIntroduce Replacement deduplication and conflict detection function
Edwin Vane [Thu, 8 Aug 2013 13:31:14 +0000 (13:31 +0000)]
Introduce Replacement deduplication and conflict detection function

Summary:
This patch adds tooling::deduplicate() which removes duplicates from and
looks for conflicts in a vector of Replacements.

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

llvm-svn: 187979

11 years ago[sanitizer] Intercept strerror and strerror_r.
Evgeniy Stepanov [Thu, 8 Aug 2013 11:44:05 +0000 (11:44 +0000)]
[sanitizer] Intercept strerror and strerror_r.

llvm-svn: 187978

11 years agoFactor out parsing sanitizer arguments to a separate function
Alexey Samsonov [Thu, 8 Aug 2013 11:32:17 +0000 (11:32 +0000)]
Factor out parsing sanitizer arguments to a separate function

llvm-svn: 187977

11 years agoUse EXPECT_TRUE/EXPECT_FALSE to avoid bogus warnings from the guts of gtest.
Benjamin Kramer [Thu, 8 Aug 2013 11:17:39 +0000 (11:17 +0000)]
Use EXPECT_TRUE/EXPECT_FALSE to avoid bogus warnings from the guts of gtest.

llvm-svn: 187976

11 years agoRemove unused variable. No functionality change.
Benjamin Kramer [Thu, 8 Aug 2013 11:08:26 +0000 (11:08 +0000)]
Remove unused variable. No functionality change.

llvm-svn: 187975

11 years agotest commit.
Andrea Di Biagio [Thu, 8 Aug 2013 10:46:36 +0000 (10:46 +0000)]
test commit.

llvm-svn: 187974

11 years agoThe name "tCDP" isn't used anywhere else in the source code, so renaming it for consi...
Mihai Popa [Thu, 8 Aug 2013 10:20:41 +0000 (10:20 +0000)]
The name "tCDP" isn't used anywhere else in the source code, so renaming it for consistency doesn't cause any problems.
This is the only Thumb2 instruction defined with "t" prefix; all other Thumb2 instructions have "t2" prefix (e.g. "t2CDP2" which is defined immediately afterwards).

Patch by Artyom Skrobov.

llvm-svn: 187973

11 years agoMove SanitizerArgs implementation from .h to .cpp
Alexey Samsonov [Thu, 8 Aug 2013 10:11:02 +0000 (10:11 +0000)]
Move SanitizerArgs implementation from .h to .cpp

llvm-svn: 187972

11 years ago[sanitizer] ASan/MSan tests for r187967.
Evgeniy Stepanov [Thu, 8 Aug 2013 09:23:19 +0000 (09:23 +0000)]
[sanitizer] ASan/MSan tests for r187967.

r187967: Disable inlining between sanitized and non-sanitized functions.
llvm-svn: 187971

11 years agoDISubprogram metadata have an MDNode representing which base type
Eric Christopher [Thu, 8 Aug 2013 08:35:37 +0000 (08:35 +0000)]
DISubprogram metadata have an MDNode representing which base type
contains the vtable pointer for the class as the operand at index
12. Replace the i32 0 with a null MDNode.

llvm-svn: 187970

11 years agoThe only useful loop unrolling flag to give realistically is
Chandler Carruth [Thu, 8 Aug 2013 08:34:35 +0000 (08:34 +0000)]
The only useful loop unrolling flag to give realistically is
'-fno-unroll-loops'. The option to the backend is even called
'DisableUnrollLoops'. This is precisely the form that Clang *didn't*
support. We didn't recognize the flag, we didn't pass it to the CC1
layer, and even if we did we wouldn't use it. Clang only inspected the
positive form of the flag, and only did so to enable loop unrolling when
the optimization level wasn't high enough. This only occurs for an
optimization level that even has a chance of running the loop unroller
when optimizing for size.

This commit wires up the 'no' variant, and switches the code to actually
follow the standard flag pattern of using the last flag and allowing
a flag in either direction to override the default.

I think this is still wrong. I don't know why we disable the loop
unroller entirely *from Clang* when optimizing for size, as the loop
unrolling pass *already has special logic* for the case where the
function is attributed as optimized for size! We should really be
trusting that. Maybe in a follow-up patch, I don't really want to change
behavior here.

llvm-svn: 187969

11 years agoSimplify (and fix) check-dfsan configs
Alexey Samsonov [Thu, 8 Aug 2013 08:26:39 +0000 (08:26 +0000)]
Simplify (and fix) check-dfsan configs

llvm-svn: 187968

11 years agoDisable inlining between sanitized and non-sanitized functions.
Evgeniy Stepanov [Thu, 8 Aug 2013 08:22:39 +0000 (08:22 +0000)]
Disable inlining between sanitized and non-sanitized functions.

Inlining between functions with different values of sanitize_* attributes
leads to over- or under-sanitizing, which is always bad.

llvm-svn: 187967

11 years agoFor DW_TAG_template_type_parameter the actual passed in type could
Eric Christopher [Thu, 8 Aug 2013 08:09:43 +0000 (08:09 +0000)]
For DW_TAG_template_type_parameter the actual passed in type could
be void and therefore not have a type entry. Only add the type if
it is non-void and provide a testcase.

llvm-svn: 187966

11 years agoRemove AllUndef check from one of the loops in getVectorShuffle. It was already handl...
Craig Topper [Thu, 8 Aug 2013 08:03:12 +0000 (08:03 +0000)]
Remove AllUndef check from one of the loops in getVectorShuffle. It was already handled by the 'AllLHS && AllRHS' check after the previous loop.

llvm-svn: 187965

11 years agoThe conversion to bool is fine here, no need to check isType.
Eric Christopher [Thu, 8 Aug 2013 07:40:42 +0000 (07:40 +0000)]
The conversion to bool is fine here, no need to check isType.

llvm-svn: 187964

11 years agoMake sure that if we're going to attempt to add a type to a DIE that
Eric Christopher [Thu, 8 Aug 2013 07:40:37 +0000 (07:40 +0000)]
Make sure that if we're going to attempt to add a type to a DIE that
the type exists.

Fix up cases where we weren't checking for optional types and add
an assert to addType to make sure we catch this in the future.

Fix up a testcase that was using the tag for DW_TAG_array_type
when it meant DW_TAG_enumeration_type.

llvm-svn: 187963

11 years agoChange variable name and reflow formatting.
Eric Christopher [Thu, 8 Aug 2013 07:40:31 +0000 (07:40 +0000)]
Change variable name and reflow formatting.

llvm-svn: 187962

11 years agoOptimize mask generation for one of the DAG combiner shufflevector cases.
Craig Topper [Thu, 8 Aug 2013 07:38:55 +0000 (07:38 +0000)]
Optimize mask generation for one of the DAG combiner shufflevector cases.

llvm-svn: 187961

11 years agoPPC: Map frin to round() not nearbyint() and rint()
Hal Finkel [Thu, 8 Aug 2013 04:31:34 +0000 (04:31 +0000)]
PPC: Map frin to round() not nearbyint() and rint()

Making use of the recently-added ISD::FROUND, which allows for custom lowering
of round(), the PPC backend will now map frin to round(). Previously, we had
been using frin to lower nearbyint() (and rint() via some custom lowering to
handle the extra fenv flags requirements), but only in fast-math mode because
frin does not tie-to-even. Several users had complained about this behavior,
and this new mapping of frin to round is certainly more appropriate (and does
not require fast-math mode).

In effect, this reverts r178362 (and part of r178337, replacing the nearbyint
mapping with the round mapping).

llvm-svn: 187960

11 years agoRevert r187927.
Arnold Schwaighofer [Thu, 8 Aug 2013 03:06:24 +0000 (03:06 +0000)]
Revert r187927.

Zhihao Yuan: Replace operator& with addressof in reference_wrapper constructor.

It breaks a clang bootstrap.

llvm-svn: 187959

11 years agoSplit the deprecated increment bool warning into a sub-group of -Wdeprecated
Richard Trieu [Thu, 8 Aug 2013 03:05:52 +0000 (03:05 +0000)]
Split the deprecated increment bool warning into a sub-group of -Wdeprecated
so that it can be toggled independently of other deprecated warnings.

llvm-svn: 187958

11 years agoRevert r187935 "Support for double width characters."
Arnold Schwaighofer [Thu, 8 Aug 2013 02:19:56 +0000 (02:19 +0000)]
Revert r187935 "Support for double width characters."

It broke a public build bot.

llvm-svn: 187957

11 years agoRevert "coff also doesn't have a ReadOnlySection yet, (!)"
David Majnemer [Thu, 8 Aug 2013 01:50:52 +0000 (01:50 +0000)]
Revert "coff also doesn't have a ReadOnlySection yet, (!)"

This reverts commit r77814.

We were sticking global constants in the .data section instead of in the
.rdata section when emitting for COFF.

This fixes PR16831.

llvm-svn: 187956

11 years agoEmit an error for enum increments and decrements in C++ mode.
Richard Trieu [Thu, 8 Aug 2013 01:50:23 +0000 (01:50 +0000)]
Emit an error for enum increments and decrements in C++ mode.
Fixes PR16394.

llvm-svn: 187955

11 years agoReflow for loop.
Eric Christopher [Thu, 8 Aug 2013 01:41:05 +0000 (01:41 +0000)]
Reflow for loop.

llvm-svn: 187954

11 years agoBe more rigorous about the sizes of forms and attributes.
Eric Christopher [Thu, 8 Aug 2013 01:41:00 +0000 (01:41 +0000)]
Be more rigorous about the sizes of forms and attributes.

llvm-svn: 187953

11 years agocatch-undefined-behavior.cpp: Remove names that don't appear in every build.
Filipe Cabecinhas [Thu, 8 Aug 2013 01:24:29 +0000 (01:24 +0000)]
catch-undefined-behavior.cpp: Remove names that don't appear in every build.

llvm-svn: 187952

11 years agoUBSan: Fix naming for IR variables in catch-undef-behavior.cpp
Filipe Cabecinhas [Thu, 8 Aug 2013 01:18:31 +0000 (01:18 +0000)]
UBSan: Fix naming for IR variables in catch-undef-behavior.cpp

llvm-svn: 187951

11 years agoAdd three missing CMake variables that need to make it to the
Chandler Carruth [Thu, 8 Aug 2013 01:15:37 +0000 (01:15 +0000)]
Add three missing CMake variables that need to make it to the
LLVMConfig.cmake file that is (I think) used in the stand-alone Clang
build, and causing link errors there w.r.t. curses.

llvm-svn: 187950

11 years agoChanged isPrint for U+00AD SOFT HYPHEN to return true.
Alexander Kornienko [Thu, 8 Aug 2013 01:10:50 +0000 (01:10 +0000)]
Changed isPrint for U+00AD SOFT HYPHEN to return true.

Summary:
This is consistent with MacOSX implementation, and most terminals
actually display this character (checked on gnome-terminal, lxterminal, lxterm,
Terminal.app, iterm2). Actually, this is in line with the ISO Latin 1 standard
(ISO 8859-1), which defines it differently from the Unicode Standard. More
information here: http://www.cs.tut.fi/~jkorpela/shy.html

Reviewers: gribozavr, jordan_rose

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

llvm-svn: 187949

11 years agoUBSan: Fix alignment checks emitted in downcasts.
Filipe Cabecinhas [Thu, 8 Aug 2013 01:08:17 +0000 (01:08 +0000)]
UBSan: Fix alignment checks emitted in downcasts.

Summary:
UBSan was checking for alignment of the derived class on the pointer to
the base class, before converting. With some class hierarchies, this could
generate false positives.

Added test-case.

llvm-svn: 187948

11 years agoForward resetColor() et al to the underlying stream.
Ted Kremenek [Thu, 8 Aug 2013 00:43:30 +0000 (00:43 +0000)]
Forward resetColor() et al to the underlying stream.

llvm-svn: 187947

11 years agoRevert "[objc-arc] Track if we encountered an additive overflow while computing ...
Michael Gottesman [Thu, 8 Aug 2013 00:41:18 +0000 (00:41 +0000)]
Revert "[objc-arc] Track if we encountered an additive overflow while computing {TopDown,BottomUp}PathCounts and do nothing if it occured."

This reverts commit r187941.

The commit was passing on my os x box, but it is failing on some non-osx
platforms. I do not have time to look into it now, so I am reverting and will
recommit after I figure this out.

llvm-svn: 187946