Commit Graph

142611 Commits

Author SHA1 Message Date
Michael J. Spencer 08b49bf27e [ELF][x86-64] Fix ifunc and add test.
In an previous commit I managed to completely disable the IRELATIVE relocation
writing code. I also used the wrong addend for the static relocation. Fix both
these issues and add a test. This test is quite brittle because there's no way
to do arithmetic on variables in FileCheck.

llvm-svn: 174161
2013-02-01 09:14:21 +00:00
Richard Smith 9eaab4be04 Fix diagnostic for bad alignas use: it can't be applied to functions.
llvm-svn: 174160
2013-02-01 08:25:07 +00:00
Nick Lewycky 9c7eb1d887 Add a new -Wundefined-inline warning for inline functions which are used but not
defined. Fixes PR14993!

llvm-svn: 174158
2013-02-01 08:13:20 +00:00
Richard Smith 848e1f1960 Implement [dcl.align]p5 and C11 6.7.5/4: alignas cannot underalign.
Also support alignas(0), which C++11 and C11 require us to ignore.

llvm-svn: 174157
2013-02-01 08:12:08 +00:00
Nadav Rotem 4349f6963e Revert r174152. The shift amount may overflow and in that case this transformation is illegal.
llvm-svn: 174156
2013-02-01 07:59:33 +00:00
Michael J. Spencer b5d6f5e988 [ELF][x86-64] Implement static relocation model for TLS.
This implements the static relocation model for GOT accesses to TLS.

llvm-svn: 174155
2013-02-01 07:14:14 +00:00
Michael J. Spencer b0ed8e80d8 [ELF][x86-84] Add static TLS support.
llvm-svn: 174154
2013-02-01 07:13:49 +00:00
Sean Callanan fa4fab77d4 Modified the expression parser's class wrapper to
support reporting "this" as a templated class.  The
expression parser wraps expressions in C++ methods
as methods with the signature

$__lldb_class::$__lldb_expr(...)

and previously responded to clang's queries about
$__lldb_class with the type of *this.  This didn't
work if *this was a ClassTemplateSpecializationDecl
because ClassTemplateSpecializationDecls can't be
the result of simple name queries.

Instead what we do now is respond that $__lldb_class
is a typedef and that the target of the typedef is
the (potentially templated) type of *this.  That is
much more robust.

Thanks to John McCall for key insights.

<rdar://problem/10987183>

llvm-svn: 174153
2013-02-01 06:55:48 +00:00
Nadav Rotem 1d584029ae Optimize shift lefts of a constant by a value plus constant into a single shift.
llvm-svn: 174152
2013-02-01 06:45:40 +00:00
Hal Finkel df1e4bfcb2 Add PPC A2Q core and BG/Q preprocessor definitions
The a2q core is the variant of the a2 core used on the BG/Q supercomputers.

llvm-svn: 174151
2013-02-01 05:53:33 +00:00
Michael J. Spencer 3c75665fdd [ELF][x86-64] Add the _GLOBAL_OFFSET_TABLE_ Atom in the correct location.
Now we link against glibc without --noinhibit-exec.

llvm-svn: 174150
2013-02-01 05:36:14 +00:00
Michael J. Spencer c8803d27aa [ELF] Add more absolute atoms. Simplify how they are resolved.
llvm-svn: 174149
2013-02-01 05:36:00 +00:00
Shankar Easwaran 73ef70b50f add hexagon scatter bits and split hexgontargethandler to hexagonrelocationhander
llvm-svn: 174148
2013-02-01 05:26:02 +00:00
John McCall 12cc42aa1b Destroy arrays and ARC fields when throwing out of ctors.
Previously we were only handling non-array fields of class type.

Testcases derived from a patch by WenHan Gu.

llvm-svn: 174146
2013-02-01 05:11:40 +00:00
Douglas Gregor bc0e5c0114 Don't do delayed exception-specification checking on an invalid
class. Fixes <rdar://problem/13017229>.

llvm-svn: 174145
2013-02-01 04:49:10 +00:00
Sean Silva 59e7bd5b5e [docs] Fixup fallout from other grammar fixup.
My "excuse" for not refactoring the grammar here is to not diverge too
far from the grammar in the comments of TGParser.cpp, since I'm not
taking on the quest of majorly refactoring TGParser.cpp at the moment.

One benefit of doing this is that Ideas for refactoring and clarifying
the grammar in this document should translate almost immediately to
beneficial refactorings that can be made to TGParser.cpp.

llvm-svn: 174144
2013-02-01 03:50:20 +00:00
Sean Silva 6868ac4c9c [docs] Add missing colon to TableGen grammar.
Spotted by Eli Bendersky.

llvm-svn: 174143
2013-02-01 03:32:38 +00:00
Andrew Trick 4fe440d45c MachineModel: Inconsequential TableGen SubtargetEmitter fix.
Drive by fix. I noticed some missing logic that might bite future
users. This shouldn't affect the final output on currently modeled
targets.

llvm-svn: 174142
2013-02-01 03:19:54 +00:00
Greg Clayton abb487f57a Make sure a value is returned for Thread::ReturnFromFrame().
llvm-svn: 174141
2013-02-01 02:52:31 +00:00
Bill Schmidt 2fe4c67374 Enable -fno-altivec, -mno-altivec for PowerPC.
Introduces these negation forms explicitly and uses them to control a new
"altivec" target feature for PowerPC.  This allows avoiding generating
Altivec instructions on processors that support Altivec.

The new test case verifies that the Altivec "lvx" instruction is not
used when -fno-altivec is present on the command line.

llvm-svn: 174140
2013-02-01 02:14:03 +00:00
Michael Han af02bbe84f [Sema][Attr]Fix alignment attribute printing.
Remove "IsMSDeclspec" argument from Align attribute since the arguments in Attr.td should
only model those appear in source code. Introduce attribute Accessor, and teach TableGen
to generate syntax kind accessors for Align attribute, and use those accessors to decide
if an alignment attribute is a declspec attribute.

llvm-svn: 174133
2013-02-01 01:19:17 +00:00
Bill Wendling c79cdff195 Remove some dead code, improve some asserts, and other assorted changes. No functionality change.
llvm-svn: 174132
2013-02-01 01:04:27 +00:00
Dan Gohman 9631d908b0 Add a comment explaining an unavailable optimization.
llvm-svn: 174131
2013-02-01 00:49:06 +00:00
Bill Wendling 3f9fcd48a4 Remove one of the odious 'Raw' methods.
llvm-svn: 174130
2013-02-01 00:48:14 +00:00
Greg Clayton 13fbb99107 Allow the target to give out the size of the red zone for given ABIs.
A bit of cleanup in the heap module. 

llvm-svn: 174129
2013-02-01 00:47:49 +00:00
Greg Clayton 3dcaa2c8c8 Get rid for switch statement warning for unhandled cases.
llvm-svn: 174128
2013-02-01 00:46:49 +00:00
Greg Clayton 4959b7b8f5 Fixed register dumping for contained-regs.
llvm-svn: 174127
2013-02-01 00:45:52 +00:00
Richard Smith 4e483edaf9 Consistently format sample diagnostics on this page.
llvm-svn: 174126
2013-02-01 00:45:12 +00:00
NAKAMURA Takumi 524bed1467 clang/test/Index/headerfile-comment-to-html.m: Try to unbreak libxml2-less hosts to eliminate "CommentXMLValid".
llvm-svn: 174124
2013-02-01 00:17:45 +00:00
Bill Wendling f1c94e3241 Use iterators instead of relying upon a bitmask of attributes to remove attributes from an AttrBuilder.
llvm-svn: 174123
2013-02-01 00:13:50 +00:00
Dan Gohman b3e2d3a638 Rewrite instsimplify's handling if icmp on pointer values to remove the
remaining use of AliasAnalysis concepts such as isIdentifiedObject to
prove pointer inequality.

@external_compare in test/Transforms/InstSimplify/compare.ll shows a simple
case where a noalias argument can be equal to a global variable address, and
while AliasAnalysis can get away with saying that these pointers don't alias,
instsimplify cannot say that they are not equal.

llvm-svn: 174122
2013-02-01 00:11:13 +00:00
Chandler Carruth 339468ece6 Fix another typo in the classof definitions that doesn't (currently)
have any effect. Spotted by Eli in review, thanks!!!

llvm-svn: 174121
2013-02-01 00:04:33 +00:00
Bill Wendling a91748602a Add iterators to the AttributeSet class so that we can access the Attributes in a nice way.
llvm-svn: 174120
2013-01-31 23:53:05 +00:00
Dan Gohman 995d40e1e2 An alloca can be equal to an argument. It can't *alias* an alloca, but it could
be equal, since there's nothing preventing a caller from correctly predicting
the stack location of an alloca.

llvm-svn: 174119
2013-01-31 23:49:33 +00:00
Chandler Carruth e5d8d0d64b Switch the code added in r173885 to use the new, shiny RTTI
infrastructure on MCStreamer to test for whether there is an
MCELFStreamer object available.

This is just a cleanup on the AsmPrinter side of things, moving ad-hoc
tests of random APIs to a direct type query. But the AsmParser
completely broken. There were no tests, it just blindly cast its
streamer to an MCELFStreamer and started manipulating it.

I don't have a test case -- this actually failed on LLVM's own
regression test suite. Unfortunately the failure only appears when the
stars, compilers, and runtime align to misbehave when we read a pointer
to a formatted_raw_ostream as-if it were an MCAssembler. =/

UBSan would catch this immediately.

Many thanks to Matt for doing about 80% of the debugging work here in
GDB, Jim for helping to explain how exactly to fix this, and others for
putting up with the hair pulling that ensued during debugging it.

llvm-svn: 174118
2013-01-31 23:43:14 +00:00
Chandler Carruth a983b4de7a Fix a think-o in the condition here. =[ I would commit the test that
caught this, but I want that in a separate commit in case there is
a need to revert the actual functional bit as part of reverting other
patches. This way, the commits relating to just getting the RTTI bits in
place are separate from the functional changes that start using them.

llvm-svn: 174117
2013-01-31 23:43:12 +00:00
Bill Wendling 23804daad9 s/AttrBuilder::addAttributes/AttrBuilder::addAttribute/g because that's more descriptive of what it actually is.
llvm-svn: 174116
2013-01-31 23:38:01 +00:00
Chandler Carruth 30cfaa2578 Fix a copy/paste-o that got missed because 'check' doesn't build lto.
llvm-svn: 174115
2013-01-31 23:34:47 +00:00
Dmitri Gribenko e40292ae62 Comment parsing: add more comments to CommentCommands.td
I hope the ASCII art delimiters are OK, since they group *groups* of commands --
that is really helpful.

llvm-svn: 174114
2013-01-31 23:31:14 +00:00
Chandler Carruth de093ef8d6 Give the MCStreamer class hierarchy LLVM RTTI facilities for use with
isa<> and dyn_cast<>. In several places, code is already hacking around
the absence of this, and there seem to be several interfaces that might
be lifted and/or devirtualized using this.

This change was based on a discussion with Jim Grosbach about how best
to handle testing for specific MCStreamer subclasses. He said that this
was the correct end state, and everything else was too hacky so
I decided to just make it so.

No functionality should be changed here, this is just threading the kind
through all the constructors and setting up the classof overloads.

llvm-svn: 174113
2013-01-31 23:29:57 +00:00
Dmitri Gribenko b7d4392bee Escape backslash in the comment.
llvm-svn: 174112
2013-01-31 23:20:06 +00:00
Bill Wendling 85ab57ac5d Update the tests.
This update coincides with r174110. That change ordered the attributes
alphabetically.

llvm-svn: 174111
2013-01-31 23:17:12 +00:00
Bill Wendling 1c7cc8ae90 Remove the AttrBuilder form of the Attribute::get creators.
The AttrBuilder is for building a collection of attributes. The Attribute object
holds only one attribute. So it's not really useful for the Attribute object to
have a creator which takes an AttrBuilder.

This has two fallouts:

1. The AttrBuilder no longer holds its internal attributes in a bit-mask form.
2. The attributes are now ordered alphabetically (hence why the tests have changed).

llvm-svn: 174110
2013-01-31 23:16:25 +00:00
Fariborz Jahanian 1a0cf80533 [Comment parsing] Add support for recognizing
\headerfile command and representing it in an xml
document. Patch reviewed by Dmitri Gribenko.
// rdar://12397511

llvm-svn: 174109
2013-01-31 23:12:39 +00:00
Richard Smith f47dc0ba93 Regenerate configure to hopefully fix buildbot breakage. Oh how I love autoconf.
llvm-svn: 174108
2013-01-31 23:02:23 +00:00
Michael J. Spencer 280dadbbaf [Core] Only complain about undefined symbols if they are marked as canBeNullNever.
llvm-svn: 174107
2013-01-31 22:56:13 +00:00
NAKAMURA Takumi e1137a2058 Update AMDGPURegisterInfo::eliminateFrameIndex() corresponding to r174083.
llvm-svn: 174106
2013-01-31 22:55:51 +00:00
Anna Zaks a8bcc65819 [analyzer]RetainCount: Fix an autorelease related false positive.
The Cnt variable is adjusted (incremented) for simplification of
checking logic. The increment should not be stored in the state.

llvm-svn: 174104
2013-01-31 22:36:17 +00:00
Richard Smith 6c26e74781 Add -Wno-nested-anon-types to -pedantic builds of LLVM. This Clang warning
catches uses of an extremely minor and widely-available C++ extension (which
every C++ compiler I could find supports, but EDG and Clang reject in strict
mode).

The diagnosed code pattern looks like this:

struct X {
  union {
    struct {
      int a;
      int b;
    } S;
  };
};

llvm-svn: 174103
2013-01-31 22:19:12 +00:00
Daniel Dunbar 38d3798b94 [lit] Add a test for internal shell execution behaviors.
llvm-svn: 174102
2013-01-31 22:15:20 +00:00