Commit Graph

87344 Commits

Author SHA1 Message Date
Douglas Gregor 5692680e0e Suppress the "typedef requires a name" warning in Microsoft-extensions mode
llvm-svn: 108526
2010-07-16 15:18:19 +00:00
Douglas Gregor a279658672 Remove extraneous semicolons after member functions
llvm-svn: 108525
2010-07-16 15:03:23 +00:00
Benjamin Kramer 1ee0d4f7f3 Fix constructor initialization order. Patch by Bill Lynch.
llvm-svn: 108524
2010-07-16 12:32:33 +00:00
Benjamin Kramer 50729ad717 Feed the right output into FileCheck.
llvm-svn: 108523
2010-07-16 10:58:02 +00:00
Gabor Greif 6d673953e3 eliminate CallInst::ArgOffset
llvm-svn: 108522
2010-07-16 09:38:02 +00:00
John McCall 796c2a52a9 Treat template parameters as part of the declaration-specifiers for the
purpose of access control.  Fixes PR7644.

I can't actually find anything directly justifying this, but it seems obvious.

llvm-svn: 108521
2010-07-16 08:13:16 +00:00
Eli Friedman 17c5a23559 Get rid of a bunch of duplicated ELF enum values.
llvm-svn: 108520
2010-07-16 07:53:29 +00:00
Eli Friedman ad543ecaa9 A few more minor additions to ELF.h.
llvm-svn: 108519
2010-07-16 07:48:07 +00:00
Eric Christopher 08928d8e23 Remove bogus link.
llvm-svn: 108518
2010-07-16 06:33:36 +00:00
Nick Lewycky 375efe3157 Arrays and vectors with different numbers of elements are not equivalent.
llvm-svn: 108517
2010-07-16 06:31:12 +00:00
Eric Christopher 55f321426d Remove unnecessary conditional.
llvm-svn: 108516
2010-07-16 06:13:24 +00:00
Tobias Grosser 3d84c9c793 LoopSimplify does not update domfrontier correctly.
This fixes PR7649.

llvm-svn: 108513
2010-07-16 05:59:45 +00:00
Tobias Grosser bd7c9f701b Add dump() to DominanceFrontier
llvm-svn: 108512
2010-07-16 05:59:39 +00:00
Chandler Carruth eeb3c8419f Make this grossness default to the error it should always be.
llvm-svn: 108511
2010-07-16 05:46:45 +00:00
Daniel Dunbar 84336ba3f8 Sema: Fix a bug with #pragma options align=reset, reset against an empty stack
is well defined, it resets to the default alignment.

llvm-svn: 108508
2010-07-16 04:54:16 +00:00
Jakob Stoklund Olesen 37c42a3d02 Remove many calls to TII::isMoveInstr. Targets should be producing COPY anyway.
TII::isMoveInstr is going tobe completely removed.

llvm-svn: 108507
2010-07-16 04:45:42 +00:00
Jakob Stoklund Olesen b1671271ab Add forgotten test case.
llvm-svn: 108506
2010-07-16 04:45:35 +00:00
Chandler Carruth 9339605c35 Butcher a perfectly reasonable diagnostic to pacify old versions of SWIG.
llvm-svn: 108505
2010-07-16 04:32:28 +00:00
Ted Kremenek 5530131bb7 Add initial test cases for scanf format string checking.
llvm-svn: 108503
2010-07-16 02:11:34 +00:00
Ted Kremenek a1ef09407d Add the main scanf-parsing logic that I meant to include in my previous commit.
llvm-svn: 108502
2010-07-16 02:11:31 +00:00
Ted Kremenek 575e89dda1 Add missing header file.
llvm-svn: 108501
2010-07-16 02:11:26 +00:00
Ted Kremenek 0208793e41 Add most of the boilerplate support for scanf format string checking. This includes
handling the parsing of scanf format strings and hooking the checking into Sema.
Most of this checking logic piggybacks on what was already there for checking printf format
strings, but the checking logic has been refactored to support both.

What is left to be done is to support argument type checking in format strings and of course
fix the usual tail of bugs that will follow.

llvm-svn: 108500
2010-07-16 02:11:22 +00:00
Ted Kremenek 5932c35138 Add builtin definition for scanf, including extending the builtin encoding to
represent builtins that have the "scanf" attribution (via the format attribute) just
like we do with printf functions.  Follow-up work is needed to add similar support
for fscanf et al.

This is to support format-string checking for scanf functions.

llvm-svn: 108499
2010-07-16 02:11:15 +00:00
Dan Gohman 103c4ebea5 Use the source-order scheduler instead of the "fast" scheduler at -O0,
because it's more likely to keep debug line information in its original
order.

llvm-svn: 108496
2010-07-16 02:01:19 +00:00
Daniel Dunbar bdb298912b build/Darwin: Add an LLVM_LTO_VERSION_OFFSET make variable to allow offsetting
the libLTO library version from the actual build version.

llvm-svn: 108495
2010-07-16 01:41:38 +00:00
Eric Christopher 15a81cddb4 Also revert 108422, it's causing some test failures.
Working on testcases for Owen.

llvm-svn: 108494
2010-07-16 01:36:12 +00:00
Daniel Dunbar c88e2ccdd3 build/Clang: Build and install libLTO as part of clang-only/install-clang targets.
llvm-svn: 108493
2010-07-16 01:29:50 +00:00
Dan Gohman c6eefe4d4e Fix this test.
llvm-svn: 108491
2010-07-16 01:28:45 +00:00
Eli Friedman eca55afea3 Fix for PR3800: make sure not to evaluate the expression for a read-write
asm operand twice.

llvm-svn: 108489
2010-07-16 00:55:21 +00:00
Daniel Dunbar 999daa57c7 Builtins/ARM: __clear_cache doesn't seem to have a consistent prototype, declare
the builtin as void __clear_cache(...) to workaround this, which appears to
match what GCC does.

llvm-svn: 108487
2010-07-16 00:31:23 +00:00
Sean Callanan ea22d4288a Wrote the code that looks at a context to see
if the variables in that context allow a particular
JIT compiled expression to run in that context.

llvm-svn: 108485
2010-07-16 00:09:46 +00:00
Dale Johannesen bfd4fd7bb7 The SelectionDAGBuilder's handling of debug info, on rare
occasions, caused code to be generated in a different order.
All cases I've seen involved float softening in the type
legalizer, and this could be perhaps be fixed there, but
it's better not to generate things differently in the first
place.  7797940 (6/29/2010..7/15/2010).

llvm-svn: 108484
2010-07-16 00:02:08 +00:00
Sean Callanan 23a3027a67 Oops, didn't define AreTypesSame correctly.
llvm-svn: 108483
2010-07-16 00:00:27 +00:00
Daniel Dunbar 3348e2d175 IRgen: Support user defined attributes on block runtime functions.
- This issue here is that /usr/include/Blocks.h wants to define some of the
   block runtime globals as weak, depending on the target. This doesn't work in
   Clang because we aren't using the AST decl for these globals.

 - The fix is a pretty gross hack which just watches all the decls for the
   specific blocks globals we need to know about; if we see one we use it,
   otherwise we use the hand coded type.

   In time, I would like to clean this up by changing IRgen to ask Sema/AST for
   the decl, which would then be lazily loaded from the builtin table if
   necessary. This could be used in a whole host of places in IRgen and would
   get rid of a lot of grotty hand coding of LLVM IR; however, we need some
   extra Sema support for this as well as support for builtin global variables.

llvm-svn: 108482
2010-07-16 00:00:19 +00:00
Daniel Dunbar 900546d2e3 IRgen: Move blocks runtime interfaces to CodeGenModule.
llvm-svn: 108481
2010-07-16 00:00:15 +00:00
Daniel Dunbar 01ad0a78d0 Suppress !+Asserts warning.
llvm-svn: 108480
2010-07-16 00:00:11 +00:00
Bill Wendling 4bda1c8e68 Revert. This isn't the correct way to go.
llvm-svn: 108478
2010-07-15 23:42:21 +00:00
John McCall 70013b640f When deferring the emission of declarations with initializers in C++, remember
the order they appeared in the translation unit.  If they get emitted, put them
in their proper order.  Fixes rdar://problem/7458115

llvm-svn: 108477
2010-07-15 23:40:35 +00:00
Dan Gohman fbbdfcaea7 Fix the order that SCEVExpander considers add operands in so that
it doesn't miss an opportunity to form a GEP, regardless of the
relative loop depths of the operands. This fixes rdar://8197217.

llvm-svn: 108475
2010-07-15 23:38:13 +00:00
Bill Wendling 973dc3b1d8 Handle code gen for the unreachable instruction if it's the only instruction in
the function. We'll just turn it into a "trap" instruction instead.

The problem with not handling this is that it might generate a prologue without
the equivalent epilogue to go with it:

$ cat t.ll
define void @foo() {
entry:
  unreachable
}
$ llc -o - t.ll -relocation-model=pic -disable-fp-elim -unwind-tables
        .section        __TEXT,__text,regular,pure_instructions
        .globl  _foo
        .align  4, 0x90
_foo:                                   ## @foo
Leh_func_begin0:
## BB#0:                                ## %entry
        pushq   %rbp
Ltmp0:
        movq    %rsp, %rbp
Ltmp1:
Leh_func_end0:
...

The unwind tables then have bad data in them causing all sorts of problems.

Fixes <rdar://problem/8096481>.

llvm-svn: 108473
2010-07-15 23:32:40 +00:00
Devang Patel 8fd6499a97 Set "optimization is ON" and supply other optional parameters. This helps codegenerator preserve info in case the symbol is deleted.
llvm-svn: 108471
2010-07-15 23:09:46 +00:00
Douglas Gregor c5dded5f99 Improve test case. Thanks Eli
llvm-svn: 108470
2010-07-15 23:04:05 +00:00
Douglas Gregor 8997690ff1 Don't suppress the emission of available_externally functions marked
with always_inline attribute. Thanks to Howard for the tip.

llvm-svn: 108469
2010-07-15 22:58:18 +00:00
Devang Patel b3026df9fa Mark implementation generated methods as artificial.
Tested by namespace.exp and virtfunc.exp from gdb testsuite.

llvm-svn: 108468
2010-07-15 22:57:00 +00:00
Sean Callanan 4dcca262f4 Added a function to test whether two types are
the same.

llvm-svn: 108467
2010-07-15 22:30:52 +00:00
Evan Cheng 55f0c6b9fc Split -enable-finite-only-fp-math to two options:
-enable-no-nans-fp-math and -enable-no-infs-fp-math. All of the current codegen fp math optimizations only care whether the fp arithmetics arguments and results can never be NaN.

llvm-svn: 108465
2010-07-15 22:07:12 +00:00
John McCall ec624b2d19 After some discussion, the ABI list settled on a much more sensible mangling
for string literals.

llvm-svn: 108464
2010-07-15 21:53:03 +00:00
Daniel Dunbar 0a2f1bafb6 build/Darwin: Add a missing directory dependency.
llvm-svn: 108463
2010-07-15 21:51:52 +00:00
Chris Lattner f71de7f538 remove some unneeded overloads that were causing
ambiguity problems on some systems.

llvm-svn: 108462
2010-07-15 21:24:02 +00:00
Chris Lattner 60b131654b fix the definitions of ConstTextCoalSection/ConstDataCoalSection
to keep "Text" in sync with the "pure instructions" section attribute.
Lack of this attribute was preventing the assembler from emitting
multibyte noops instructions for templates (and inlines, and other
coalesced stuff) and was causing the assembler to mismatch .o files.

This fixes rdar://8018335

llvm-svn: 108461
2010-07-15 21:22:00 +00:00