platform/upstream/llvm.git
11 years agoInitialize hasQPX in PPCSubtarget
Hal Finkel [Wed, 30 Jan 2013 22:43:44 +0000 (22:43 +0000)]
Initialize hasQPX in PPCSubtarget

This should have gone in with r173973.

llvm-svn: 173984

11 years agoEncapsulate testing that we have an iOS Triple in Triple.h in the method isiOS
Michael Gottesman [Wed, 30 Jan 2013 22:38:19 +0000 (22:38 +0000)]
Encapsulate testing that we have an iOS Triple in Triple.h in the method isiOS
so we follow the convention that all other platforms follow by having an is*
test method.

llvm-svn: 173983

11 years agoVerified that the plugin.dynamic-loader.darwin-kernel.scan-type
Jason Molenda [Wed, 30 Jan 2013 22:19:51 +0000 (22:19 +0000)]
Verified that the plugin.dynamic-loader.darwin-kernel.scan-type
setting is working correctly now; remove the #if 0's around its
use.

llvm-svn: 173982

11 years agoDiagnostics: Clarify name of line-length-limiting constant in r173976.
Jordan Rose [Wed, 30 Jan 2013 22:14:15 +0000 (22:14 +0000)]
Diagnostics: Clarify name of line-length-limiting constant in r173976.

Thanks, Sean.

llvm-svn: 173981

11 years agoChanged to static_cast, due to post-commit review.
Filipe Cabecinhas [Wed, 30 Jan 2013 22:03:24 +0000 (22:03 +0000)]
Changed to static_cast, due to post-commit review.

llvm-svn: 173980

11 years agoTableGen backends: use emitSourceFileHeader() to emit the warning about
Dmitri Gribenko [Wed, 30 Jan 2013 21:54:20 +0000 (21:54 +0000)]
TableGen backends: use emitSourceFileHeader() to emit the warning about
file contents being autogenerated

llvm-svn: 173979

11 years agoCast to remove the narrowing conversion error in c++11.
Filipe Cabecinhas [Wed, 30 Jan 2013 21:50:21 +0000 (21:50 +0000)]
Cast to remove the narrowing conversion error in c++11.

llvm-svn: 173978

11 years ago[build/clang_darwin] Fix the case reversal in r173465.
Daniel Dunbar [Wed, 30 Jan 2013 21:45:35 +0000 (21:45 +0000)]
[build/clang_darwin] Fix the case reversal in r173465.

 - I got confused by the double negative, the test succends on 10.6, in which
   case we *do* want to perform the filter-out.

llvm-svn: 173977

11 years agoDiagnostics: if a line is longer than 4096 characters, don't print it.
Jordan Rose [Wed, 30 Jan 2013 21:41:07 +0000 (21:41 +0000)]
Diagnostics: if a line is longer than 4096 characters, don't print it.

Specifically, don't print snippets, caret diagnostics, or ranges for
lines over 4096 characters. We copy the line around a few times in our
diagnostics machinery, and we have to print a caret line that's just as
long. This uses a lot of memory just to create a poor user experience as
we print out a line much too long for anyone to read...or spend extra
energy trying to fit it to -fmessage-length.

<rdar://problem/13106850>

llvm-svn: 173976

11 years agoRemove redundant code.
Bill Wendling [Wed, 30 Jan 2013 21:22:59 +0000 (21:22 +0000)]
Remove redundant code.

It was creating a new AttrBuilder when we could just fill in the AttrBuilder
we're building.

llvm-svn: 173975

11 years ago...in light of recent activity related to llvm.memcpy flags. I want to
Andrew Trick [Wed, 30 Jan 2013 21:19:35 +0000 (21:19 +0000)]
...in light of recent activity related to llvm.memcpy flags. I want to
prevent an llvm developer from mistakenly thinking that just because the
intrinsic has volatile flags that volatile operations can be converted
to or folded into them.

Platforms may rely on volatile loads and stores of natively supported
data width to be executed as single instruction. When compiling
C, this expectation likely holds for l-values of volatile primitive
types with native hardware support, but not necessarily for aggregate
types. The frontend upholds these expectations, which are not
specified in the IR.

llvm-svn: 173974

11 years agoAdd definitions for the PPC a2q core marked as having QPX available
Hal Finkel [Wed, 30 Jan 2013 21:17:42 +0000 (21:17 +0000)]
Add definitions for the PPC a2q core marked as having QPX available

This is the first commit of a large series which will add support for the
QPX vector instruction set to the PowerPC backend. This instruction set is
used on the IBM Blue Gene/Q supercomputers.

llvm-svn: 173973

11 years agoRemove a mention of TargetInstrDescriptor, which no longer exists in the code
Eli Bendersky [Wed, 30 Jan 2013 20:54:21 +0000 (20:54 +0000)]
Remove a mention of TargetInstrDescriptor, which no longer exists in the code

llvm-svn: 173971

11 years agoRevert "[preprocessor] Don't warn about "disabled expansion of recursive macro""
Argyrios Kyrtzidis [Wed, 30 Jan 2013 20:42:17 +0000 (20:42 +0000)]
Revert "[preprocessor] Don't warn about "disabled expansion of recursive macro""

This reverts commit r173952

llvm-svn: 173970

11 years ago[docs] Guide prospective TableGen backend writers.
Sean Silva [Wed, 30 Jan 2013 20:39:46 +0000 (20:39 +0000)]
[docs] Guide prospective TableGen backend writers.

Boilerplate is often the hardest part of getting started with these
kinds of things, so throw them a bone.

llvm-svn: 173969

11 years ago[ELF] Fix circular initialization bug.
Michael J. Spencer [Wed, 30 Jan 2013 20:36:56 +0000 (20:36 +0000)]
[ELF] Fix circular initialization bug.

llvm-svn: 173968

11 years ago[ELF] Use the target's LayoutHandler.
Michael J. Spencer [Wed, 30 Jan 2013 20:05:27 +0000 (20:05 +0000)]
[ELF] Use the target's LayoutHandler.

llvm-svn: 173966

11 years agoHandle passing non-Qualtypes to %diff better. Instead of asserting, fall back
Richard Trieu [Wed, 30 Jan 2013 20:04:31 +0000 (20:04 +0000)]
Handle passing non-Qualtypes to %diff better.  Instead of asserting, fall back
to printing the default case.  This is a fix for PR15023.

llvm-svn: 173965

11 years agoAdd OpenCL error that a kernel function must have void return type. Includes a test...
Tanya Lattner [Wed, 30 Jan 2013 19:48:52 +0000 (19:48 +0000)]
Add OpenCL error that a kernel function must have void return type. Includes a test case.

llvm-svn: 173963

11 years agoUse the number of 'slots' in the AttributeSetImpl being 0 to indicate that the Attrib...
Bill Wendling [Wed, 30 Jan 2013 19:39:21 +0000 (19:39 +0000)]
Use the number of 'slots' in the AttributeSetImpl being 0 to indicate that the AttributeSet is empty.

llvm-svn: 173962

11 years agoFix comment in test/Lexer/utf8-invalid.c for updates in r173959.
Jordan Rose [Wed, 30 Jan 2013 19:29:14 +0000 (19:29 +0000)]
Fix comment in test/Lexer/utf8-invalid.c for updates in r173959.

llvm-svn: 173961

11 years agoClean up whitespace and indentation a bit
Eli Bendersky [Wed, 30 Jan 2013 19:24:23 +0000 (19:24 +0000)]
Clean up whitespace and indentation a bit

llvm-svn: 173960

11 years agoFix r173881 to properly skip invalid UTF-8 characters in raw lexing and -E.
Jordan Rose [Wed, 30 Jan 2013 19:21:12 +0000 (19:21 +0000)]
Fix r173881 to properly skip invalid UTF-8 characters in raw lexing and -E.

This caused hangs as we processed the same invalid byte over and over.

<rdar://problem/13115651>

llvm-svn: 173959

11 years ago[analyzer] Make shallow mode more shallow.
Anna Zaks [Wed, 30 Jan 2013 19:12:39 +0000 (19:12 +0000)]
[analyzer] Make shallow mode more shallow.

Redefine the shallow mode to inline all functions for which we have a
definite definition (ipa=inlining). However, only inline functions that
are up to 4 basic blocks large and cut the max exploded nodes generated
per top level function in half.

This makes shallow faster and allows us to keep inlining small
functions. For example, we would keep inlining wrapper functions and
constructors/destructors.

With the new shallow, it takes 104s to analyze sqlite3, whereas
the deep mode is 658s and previous shallow is 209s.

llvm-svn: 173958

11 years ago[analyzer] Use analyzer config for max-inlinable-size option.
Anna Zaks [Wed, 30 Jan 2013 19:12:36 +0000 (19:12 +0000)]
[analyzer] Use analyzer config for max-inlinable-size option.

llvm-svn: 173957

11 years ago[analyzer] Move report false positive suppression to report visitors.
Anna Zaks [Wed, 30 Jan 2013 19:12:34 +0000 (19:12 +0000)]
[analyzer] Move report false positive suppression to report visitors.

llvm-svn: 173956

11 years ago[analyzer] Remove further references to analyzer-ipa.
Anna Zaks [Wed, 30 Jan 2013 19:12:26 +0000 (19:12 +0000)]
[analyzer] Remove further references to analyzer-ipa.

Thanks Jordan!

llvm-svn: 173955

11 years agoscan-build: When using Xcode 4.6, use build settings for doing proper build interposi...
Ted Kremenek [Wed, 30 Jan 2013 19:10:24 +0000 (19:10 +0000)]
scan-build: When using Xcode 4.6, use build settings for doing proper build interposition.

llvm-svn: 173954

11 years agoHoist retrieval of Expr* into caller. No functionality change.
Ted Kremenek [Wed, 30 Jan 2013 19:10:21 +0000 (19:10 +0000)]
Hoist retrieval of Expr* into caller.  No functionality change.

Just makes the code a little cleaner, and easier to reason about.

llvm-svn: 173953

11 years ago[preprocessor] Don't warn about "disabled expansion of recursive macro"
Argyrios Kyrtzidis [Wed, 30 Jan 2013 18:55:52 +0000 (18:55 +0000)]
[preprocessor] Don't warn about "disabled expansion of recursive macro"
for "#define X X".

This is a pattern that, for example, stdbool.h uses.
rdar://12435773

llvm-svn: 173952

11 years ago[analyzer] Model trivial copy/move ctors with an aggregate bind.
Jordan Rose [Wed, 30 Jan 2013 18:16:06 +0000 (18:16 +0000)]
[analyzer] Model trivial copy/move ctors with an aggregate bind.

This is faster for the analyzer to process than inlining the constructor
and performing a member-wise copy, and it also solves the problem of
warning when a partially-initialized POD struct is copied.

Before:
  CGPoint p;
  p.x = 0;
  CGPoint p2 = p; <-- assigned value is garbage or undefined

After:
  CGPoint p;
  p.x = 0;
  CGPoint p2 = p; // no-warning

This matches our behavior in C, where we don't see a field-by-field copy.

<rdar://problem/12305288>

llvm-svn: 173951

11 years agoDocumentation: fix escaping in JSON example
Dmitri Gribenko [Wed, 30 Jan 2013 17:58:39 +0000 (17:58 +0000)]
Documentation: fix escaping in JSON example

llvm-svn: 173950

11 years agoDocumentation: add a link to Bear, a tool to help with JSON DB
Dmitri Gribenko [Wed, 30 Jan 2013 17:58:14 +0000 (17:58 +0000)]
Documentation: add a link to Bear, a tool to help with JSON DB

Patch by Laszlo Nagy

llvm-svn: 173949

11 years agoDocumentation: fix link to ExecuteAction(), which was previously typoed as
James Dennett [Wed, 30 Jan 2013 17:53:07 +0000 (17:53 +0000)]
Documentation: fix link to ExecuteAction(), which was previously typoed as
"ExecutionAction()".

llvm-svn: 173948

11 years ago<rdar://problem/12552374> & <rdar://problem/13100674>
Enrico Granata [Wed, 30 Jan 2013 17:44:16 +0000 (17:44 +0000)]
<rdar://problem/12552374> & <rdar://problem/13100674>

The vtable pointer field is not necessarily a pointer and hence cannot be used for validation

llvm-svn: 173947

11 years agoLinker: correctly link in dbg.declare
Manman Ren [Wed, 30 Jan 2013 17:42:15 +0000 (17:42 +0000)]
Linker: correctly link in dbg.declare

Given source IR:
call void @llvm.dbg.declare(metadata !{i32* %argc.addr}, metadata !14), !dbg !15
we used to generate
call void @llvm.dbg.declare(metadata !27, metadata !28), !dbg !29
!27 = metadata !{null}

With this patch, we will correctly generate
call void @llvm.dbg.declare(metadata !{i32* %argc.addr}, metadata !27), !dbg !28

Looking up %argc.addr in ValueMap will return null, since %argc.addr is already
correctly set up, we can use identity mapping.

llvm-svn: 173946

11 years agoAdd a special ARM trap encoding for NaCl.
Eli Bendersky [Wed, 30 Jan 2013 16:30:19 +0000 (16:30 +0000)]
Add a special ARM trap encoding for NaCl.
More details in this thread: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130128/163783.html

Patch by JF Bastien

llvm-svn: 173943

11 years agohexagon targetinfo changes for getting the relocation kind from string and vice versa
Shankar Easwaran [Wed, 30 Jan 2013 16:05:43 +0000 (16:05 +0000)]
hexagon targetinfo changes for getting the relocation kind from string and vice versa

llvm-svn: 173942

11 years agoAdd missing header and test cases for r173939.
Logan Chien [Wed, 30 Jan 2013 15:48:50 +0000 (15:48 +0000)]
Add missing header and test cases for r173939.

llvm-svn: 173941

11 years agoOverride virtual function for ARM EH directives.
Logan Chien [Wed, 30 Jan 2013 15:39:04 +0000 (15:39 +0000)]
Override virtual function for ARM EH directives.

llvm-svn: 173939

11 years agosimplify hexagon relocations handling
Shankar Easwaran [Wed, 30 Jan 2013 15:38:41 +0000 (15:38 +0000)]
simplify hexagon relocations handling

llvm-svn: 173938

11 years agollvm/Basic/ConvertUTF.h now exposes all functions without macro tricks
Dmitri Gribenko [Wed, 30 Jan 2013 15:12:30 +0000 (15:12 +0000)]
llvm/Basic/ConvertUTF.h now exposes all functions without macro tricks

llvm-svn: 173937

11 years agoLLDB uses ConvertUTF16toUTF8, remove #ifdef
Dmitri Gribenko [Wed, 30 Jan 2013 15:10:12 +0000 (15:10 +0000)]
LLDB uses ConvertUTF16toUTF8, remove #ifdef

llvm-svn: 173936

11 years agoUTF conversion routines were moved from clang/Basic to llvm/Support
Dmitri Gribenko [Wed, 30 Jan 2013 15:05:59 +0000 (15:05 +0000)]
UTF conversion routines were moved from clang/Basic to llvm/Support

llvm-svn: 173935

11 years agoComment parsing: fold named character references test into other HTML tests
Dmitri Gribenko [Wed, 30 Jan 2013 14:44:47 +0000 (14:44 +0000)]
Comment parsing: fold named character references test into other HTML tests

llvm-svn: 173934

11 years agoasan/tsan: manually define FUTEX constants, because <linux/futes.h> header is broken...
Dmitry Vyukov [Wed, 30 Jan 2013 14:39:27 +0000 (14:39 +0000)]
asan/tsan: manually define FUTEX constants, because <linux/futes.h> header is broken on some linux distributions

llvm-svn: 173933

11 years agotsan: fix CPP_WEAK definition (it must be the other way around)
Dmitry Vyukov [Wed, 30 Jan 2013 14:38:44 +0000 (14:38 +0000)]
tsan: fix CPP_WEAK definition (it must be the other way around)

llvm-svn: 173932

11 years agoComment parsing: resolve more named character references
Dmitri Gribenko [Wed, 30 Jan 2013 14:29:28 +0000 (14:29 +0000)]
Comment parsing: resolve more named character references

This reimplements r173850 with a better approach:
(1) use a TableGen-generated matcher instead of doing a linear search;
(2) avoid allocations for new strings by converting code points to string
    iterals with TableGen.

llvm-svn: 173931

11 years ago[Sanitizer] include sanitizer_common headers when building interception library
Alexey Samsonov [Wed, 30 Jan 2013 14:27:41 +0000 (14:27 +0000)]
[Sanitizer] include sanitizer_common headers when building interception library

llvm-svn: 173930

11 years ago[Sanitizer] Add change missed in r173926
Alexey Samsonov [Wed, 30 Jan 2013 13:19:15 +0000 (13:19 +0000)]
[Sanitizer] Add change missed in r173926

llvm-svn: 173929

11 years ago[sanitizer] Further split private and public sanitizer headers.
Evgeniy Stepanov [Wed, 30 Jan 2013 13:12:08 +0000 (13:12 +0000)]
[sanitizer] Further split private and public sanitizer headers.

And make msan_interface.h C-compatible.

llvm-svn: 173928

11 years agoRevert unintended change
Dmitri Gribenko [Wed, 30 Jan 2013 12:40:40 +0000 (12:40 +0000)]
Revert unintended change

llvm-svn: 173927

11 years agoUse LLVM_BUILD_TYPE instead of CMAKE_BUILD_TYPE in compiler-rt unit tests to match...
Alexey Samsonov [Wed, 30 Jan 2013 12:18:49 +0000 (12:18 +0000)]
Use LLVM_BUILD_TYPE instead of CMAKE_BUILD_TYPE in compiler-rt unit tests to match the behavior of llvm unittests

llvm-svn: 173926

11 years agoIndex/special-html-characters.m: mark this as XFAIL for valgrind
Dmitri Gribenko [Wed, 30 Jan 2013 12:17:33 +0000 (12:17 +0000)]
Index/special-html-characters.m: mark this as XFAIL for valgrind

Fix is being discussed on cfe-dev.

llvm-svn: 173925

11 years agoMove UTF conversion routines from clang/lib/Basic to llvm/lib/Support
Dmitri Gribenko [Wed, 30 Jan 2013 12:06:08 +0000 (12:06 +0000)]
Move UTF conversion routines from clang/lib/Basic to llvm/lib/Support

This is required to use them in TableGen.

llvm-svn: 173924

11 years agoMove UTF conversion routines from clang/lib/Basic to llvm/lib/Support
Dmitri Gribenko [Wed, 30 Jan 2013 12:05:05 +0000 (12:05 +0000)]
Move UTF conversion routines from clang/lib/Basic to llvm/lib/Support

This is required to use them in TableGen.

llvm-svn: 173923

11 years ago[ELF][x86-64] Add TargetLayout.
Michael J. Spencer [Wed, 30 Jan 2013 10:43:25 +0000 (10:43 +0000)]
[ELF][x86-64] Add TargetLayout.

llvm-svn: 173922

11 years agoWhitespace.
Michael J. Spencer [Wed, 30 Jan 2013 10:43:10 +0000 (10:43 +0000)]
Whitespace.

llvm-svn: 173921

11 years ago[msan] Remove an extra #ifdef.
Evgeniy Stepanov [Wed, 30 Jan 2013 09:56:11 +0000 (09:56 +0000)]
[msan] Remove an extra #ifdef.

__has_feature is always defined at this point.

llvm-svn: 173920

11 years agoDon't touch unchanged file for in-place edit.
Daniel Jasper [Wed, 30 Jan 2013 09:52:38 +0000 (09:52 +0000)]
Don't touch unchanged file for in-place edit.

This fixes llvm.org/PR15087.

llvm-svn: 173919

11 years agoAlso promote fp16 types to double when they're anonymous variadic arguments.
Tim Northover [Wed, 30 Jan 2013 09:46:55 +0000 (09:46 +0000)]
Also promote fp16 types to double when they're anonymous variadic arguments.

__fp16 isn't covered by the standard, but this resolves the oddity that float
gets promoted when passed variadically, but not the smaller type. This is
required by the AArch64 ABI, and a sane action elsewhere.

llvm-svn: 173918

11 years agotsan: introduce a helped macro CPP_WEAK (Go linker does not support weak symbols)
Dmitry Vyukov [Wed, 30 Jan 2013 09:46:53 +0000 (09:46 +0000)]
tsan: introduce a helped macro CPP_WEAK (Go linker does not support weak symbols)

llvm-svn: 173917

11 years agoDon't generate no-op replacements.
Daniel Jasper [Wed, 30 Jan 2013 09:46:12 +0000 (09:46 +0000)]
Don't generate no-op replacements.

No functional changes.

llvm-svn: 173916

11 years agotsan: add OnFinalize() callback for frontends
Dmitry Vyukov [Wed, 30 Jan 2013 09:24:00 +0000 (09:24 +0000)]
tsan: add OnFinalize() callback for frontends

llvm-svn: 173915

11 years agoDocumentation: Updating the data layout default specifications to
Patrik Hagglund [Wed, 30 Jan 2013 09:02:06 +0000 (09:02 +0000)]
Documentation: Updating the data layout default specifications to
correspond to the code.

Patch by Stephen McGruer.

llvm-svn: 173914

11 years ago[TSan] relax output tests a bit to make them pass in gcc build
Alexey Samsonov [Wed, 30 Jan 2013 08:41:57 +0000 (08:41 +0000)]
[TSan] relax output tests a bit to make them pass in gcc build

llvm-svn: 173913

11 years ago[ELF] Remove ReferenceKinds.
Michael J. Spencer [Wed, 30 Jan 2013 07:46:54 +0000 (07:46 +0000)]
[ELF] Remove ReferenceKinds.

llvm-svn: 173912

11 years ago[ELF] Use TargetRelocationHandler to apply relocations.
Michael J. Spencer [Wed, 30 Jan 2013 07:46:31 +0000 (07:46 +0000)]
[ELF] Use TargetRelocationHandler to apply relocations.

llvm-svn: 173911

11 years ago[Sanitizer] update style checker script and fix namespace style warnings
Alexey Samsonov [Wed, 30 Jan 2013 07:45:58 +0000 (07:45 +0000)]
[Sanitizer] update style checker script and fix namespace style warnings

llvm-svn: 173910

11 years ago[ELF] Add {Hexagon,PPC,X86}TargetHandler.
Michael J. Spencer [Wed, 30 Jan 2013 07:36:45 +0000 (07:36 +0000)]
[ELF] Add {Hexagon,PPC,X86}TargetHandler.

llvm-svn: 173909

11 years agochange the function names in RelocationHelper to adhere to convention
Shankar Easwaran [Wed, 30 Jan 2013 07:36:09 +0000 (07:36 +0000)]
change the function names in RelocationHelper to adhere to convention

llvm-svn: 173908

11 years ago[lit] Make GoogleTest test runner correctly discover tests in the source root
Alexey Samsonov [Wed, 30 Jan 2013 07:27:45 +0000 (07:27 +0000)]
[lit] Make GoogleTest test runner correctly discover tests in the source root

llvm-svn: 173907

11 years agochange DefaultLayout to TargetLayout inside member variables
Shankar Easwaran [Wed, 30 Jan 2013 07:19:57 +0000 (07:19 +0000)]
change DefaultLayout to TargetLayout inside member variables

llvm-svn: 173906

11 years agoAdd "instancetype" as a code completion result for the return type of
Douglas Gregor [Wed, 30 Jan 2013 07:11:43 +0000 (07:11 +0000)]
Add "instancetype" as a code completion result for the return type of
an Objective-C method. Fixes <rdar://problem/13069990>.

llvm-svn: 173905

11 years agoadd targethandler hooks from Writer and cleanup
Shankar Easwaran [Wed, 30 Jan 2013 07:11:43 +0000 (07:11 +0000)]
add targethandler hooks from Writer and cleanup

llvm-svn: 173904

11 years agoThe instance methods of the root class of an Objective-C hieararchy
Douglas Gregor [Wed, 30 Jan 2013 06:58:39 +0000 (06:58 +0000)]
The instance methods of the root class of an Objective-C hieararchy
can be messaged via the metaclass. Provide code completions for this
case. Fixes <rdar://problem/12560296>.

llvm-svn: 173903

11 years agoAttempt to fix dragonegg. Use the number of slots to determine if the AttributeSet...
Bill Wendling [Wed, 30 Jan 2013 06:54:41 +0000 (06:54 +0000)]
Attempt to fix dragonegg. Use the number of slots to determine if the AttributeSet has attributes or not.

llvm-svn: 173902

11 years agoInstCombine: canonicalize sext-and --> select
Nadav Rotem [Wed, 30 Jan 2013 06:35:22 +0000 (06:35 +0000)]
InstCombine: canonicalize sext-and --> select
                          sext-not-and --> select.

Patch by Muhammad Tauqir Ahmad.

llvm-svn: 173901

11 years agoC11: Provide the missing half of <stdalign.h>
Richard Smith [Wed, 30 Jan 2013 06:33:54 +0000 (06:33 +0000)]
C11: Provide the missing half of <stdalign.h>

llvm-svn: 173900

11 years agoFix test failure from previous change.
Richard Smith [Wed, 30 Jan 2013 06:27:44 +0000 (06:27 +0000)]
Fix test failure from previous change.

llvm-svn: 173899

11 years agoSemantic analysis and CodeGen support for C11's _Noreturn. This is modeled as
Richard Smith [Wed, 30 Jan 2013 05:45:05 +0000 (05:45 +0000)]
Semantic analysis and CodeGen support for C11's _Noreturn. This is modeled as
an attribute for consistency with our other noreturn mechanisms.

llvm-svn: 173898

11 years ago[ELF][x86-64] Add X86_64TargetRelocationHandler and friends.
Michael J. Spencer [Wed, 30 Jan 2013 05:26:03 +0000 (05:26 +0000)]
[ELF][x86-64] Add X86_64TargetRelocationHandler and friends.

llvm-svn: 173897

11 years ago[ELF] Add ELFTargetRelocationHandler.
Michael J. Spencer [Wed, 30 Jan 2013 05:25:44 +0000 (05:25 +0000)]
[ELF] Add ELFTargetRelocationHandler.

llvm-svn: 173896

11 years agoadd Relocation helper functions
Shankar Easwaran [Wed, 30 Jan 2013 04:49:54 +0000 (04:49 +0000)]
add Relocation helper functions

llvm-svn: 173895

11 years agoFix one obvious thinko with the plugin.dynamic-loader.darwin-kernel.scan-type setting
Jason Molenda [Wed, 30 Jan 2013 04:48:16 +0000 (04:48 +0000)]
Fix one obvious thinko with the plugin.dynamic-loader.darwin-kernel.scan-type setting
handling that was probably the source of the settings problem.  Need to verify that
it's working correctly tomorrow though.

llvm-svn: 173894

11 years agobuild: regenerate configure
Saleem Abdulrasool [Wed, 30 Jan 2013 04:44:17 +0000 (04:44 +0000)]
build: regenerate configure

Regenerate configure script for new option to make the buildbots happy.

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

11 years ago<rdar://problem/12491235>
Jason Molenda [Wed, 30 Jan 2013 04:39:32 +0000 (04:39 +0000)]
<rdar://problem/12491235>

Enhance lldb so it can search for a kernel in memory when attaching
to a remote system.  Remove some of the code that was doing this
from ProcessMachCore and ProcessGDBRemote and put it in
DynamicLoaderDarwinKernel.

I've added a new setting, plugin.dynamic-loader.darwin-kernel.scan-type
which can be set to

 none   - for environments where reading random memory can cause a
          device crash
 basic  - look at one fixed location in memory for a kernel load address,
          plus the contents of that address
 fast-scan - the default, tries "basic" and then looks for the kernel's
          mach header near the current pc value when lldb connects
 exhaustive-scan - on 32-bit targets, step through the entire range where
          the kernel can be loaded, looking for the kernel binary

I don't have the setting set up correctly right now, I'm getting back unexpected
values from the Property system, but I'll figure that out tomorrow and fix.
Besides that, all of the different communication methods / types of kernels
appear to be working correctly with these changes.

llvm-svn: 173891

11 years agobuild: add --with-python option
Saleem Abdulrasool [Wed, 30 Jan 2013 04:07:37 +0000 (04:07 +0000)]
build: add --with-python option

This adds a new --with-python option to allow configuration of the python binary
for building.  If not specified, $PATH will be searched for common python binary
names (python, python2, python3).  If specified, and the path is not executable,
it will attempt to search $PATH.

Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org>
Reviewed-by: Eric Christopher <echristo@gmail.com>, Daniel Dunbar <daniel@zuster.org>
llvm-svn: 173890

11 years agoDon't warn on fall-through from unreachable code.
Alexander Kornienko [Wed, 30 Jan 2013 03:49:44 +0000 (03:49 +0000)]
Don't warn on fall-through from unreachable code.

Summary:
A motivating example:
class ClassWithDtor {
public:
  ~ClassWithDtor() {}
};
void fallthrough3(int n) {
  switch (n) {
    case 2:
      do {
        ClassWithDtor temp;
        return;
      } while (0);  // This generates a chain of unreachable CFG blocks.
    case 3:
      break;
  }
}

Reviewers: rsmith, doug.gregor, alexfh

Reviewed By: alexfh

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

llvm-svn: 173889

11 years agoRemoving initializer for the field removed in r173887
David Blaikie [Wed, 30 Jan 2013 03:04:07 +0000 (03:04 +0000)]
Removing initializer for the field removed in r173887

llvm-svn: 173888

11 years agoRemove unused variable (introduced in r173884) to clear clang -Werror build
David Blaikie [Wed, 30 Jan 2013 02:56:02 +0000 (02:56 +0000)]
Remove unused variable (introduced in r173884) to clear clang -Werror build

llvm-svn: 173887

11 years agoForgot to add new file to CMakeLists
Jack Carter [Wed, 30 Jan 2013 02:32:36 +0000 (02:32 +0000)]
Forgot to add new file to CMakeLists

llvm-svn: 173886

11 years agoThis patch implements runtime ARM specific
Jack Carter [Wed, 30 Jan 2013 02:24:33 +0000 (02:24 +0000)]
This patch implements runtime ARM specific
setting of ELF header e_flags.

Contributer: Jack Carter

llvm-svn: 173885

11 years agoThis patch implements runtime Mips specific
Jack Carter [Wed, 30 Jan 2013 02:16:36 +0000 (02:16 +0000)]
This patch implements runtime Mips specific
setting of ELF header e_flags.

Contributer: Jack Carter

llvm-svn: 173884

11 years agoUnresolved lookups can have using declarations that refer to
Douglas Gregor [Wed, 30 Jan 2013 02:10:08 +0000 (02:10 +0000)]
Unresolved lookups can have using declarations that refer to
unresolved using declarations. Fixes PR14768 / <rdar://problem/13030296>.

llvm-svn: 173883

11 years agoThis patch reworks how llvm targets set
Jack Carter [Wed, 30 Jan 2013 02:09:52 +0000 (02:09 +0000)]
This patch reworks how llvm targets set
and update ELF header e_flags.

Currently gathering information such as symbol,
section and data is done by collecting it in an
MCAssembler object. From MCAssembler and MCAsmLayout
objects ELFObjectWriter::WriteObject() forms and
streams out the ELF object file.

This patch just adds a few members to the MCAssember
class to store and access the e_flag settings. It
allows for runtime additions to the e_flag by
assembler directives. The standalone assembler can
get to MCAssembler from getParser().getStreamer().getAssembler().

This patch is the generic infrastructure and will be
followed by patches for ARM and Mips for their target
specific use.

Contributer: Jack Carter

llvm-svn: 173882

11 years agoDon't warn about Unicode characters in -E mode.
Jordan Rose [Wed, 30 Jan 2013 01:52:57 +0000 (01:52 +0000)]
Don't warn about Unicode characters in -E mode.

People use the C preprocessor for things other than C files. Some of them
have Unicode characters. We shouldn't warn about Unicode characters
appearing outside of identifiers in this case.

There's not currently a way for the preprocessor to tell if it's in -E mode,
so I added a new flag, derived from the PreprocessorOutputOptions. This is
only used by the Unicode warnings for now, but could conceivably be used by
other warnings or even behavioral differences later.

<rdar://problem/13107323>

llvm-svn: 173881

11 years ago[Sema] Constrain test added in r173873 with expected-error-re
David Blaikie [Wed, 30 Jan 2013 01:43:36 +0000 (01:43 +0000)]
[Sema] Constrain test added in r173873 with expected-error-re

Suggested in post-commit review by Richard Smith.

llvm-svn: 173880

11 years ago[autoconf]: Fix description in HAVE_CRASHREPORTER_INFO.
NAKAMURA Takumi [Wed, 30 Jan 2013 01:38:03 +0000 (01:38 +0000)]
[autoconf]: Fix description in HAVE_CRASHREPORTER_INFO.

http://llvm-reviews.chandlerc.com/D332

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

11 years ago[autoconf] Fix m4 quoting for newer autotools
NAKAMURA Takumi [Wed, 30 Jan 2013 01:37:55 +0000 (01:37 +0000)]
[autoconf] Fix m4 quoting for newer autotools

This simply fixes up quoting of macro invocations to appease newer versions of autotools.

http://llvm-reviews.chandlerc.com/D332

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