Commit Graph

74634 Commits

Author SHA1 Message Date
Daniel Dunbar c7a67b7877 Driver: When linking, don't warn about unused arguments which are obviously only
used during compilation.
 - There is no easy way to define this group properly, unfortunately, and maybe
   this is a losing strategy. For now this is unambiguous more friendly, though.

llvm-svn: 91940
2009-12-22 23:19:32 +00:00
Jeffrey Yasskin ad46e4416b Fix a crash in JIT::recompileAndRelinkFunction(). It doesn't pass the MCI
argument to runJITOnFunction(), which caused a null pointer dereference at
every call.

Patch by Gianluca Guida!

llvm-svn: 91939
2009-12-22 23:18:18 +00:00
Chris Lattner 801fda871b implement -W[no-]fatal-errors, patch by Christian Adåker!
llvm-svn: 91938
2009-12-22 23:12:53 +00:00
Ted Kremenek c0895eb730 Add c++-analyzer symlink (which is used by scan-build)
llvm-svn: 91937
2009-12-22 23:00:32 +00:00
Bill Wendling 70794596a8 Assign ordering to SDNodes in PromoteNode. Also fixing a subtle bug where BSWAP
was using "Tmp1" in the first getNode call instead of Node->getOperand(0).

llvm-svn: 91936
2009-12-22 22:53:39 +00:00
Sean Callanan 588785c781 Removed the "inline" keyword from the disassembler decoder,
because the Visual C++ build does not build .c files as C99

llvm-svn: 91935
2009-12-22 22:51:40 +00:00
Chris Lattner b257d24f62 rename HexDisassembler -> Disassembler, it works on any input
integer encoding (0123, 0b10101, 42, etc).

llvm-svn: 91934
2009-12-22 22:50:29 +00:00
Chris Lattner e3437b33f5 just discard the debug output from the disassembler.
llvm-svn: 91933
2009-12-22 22:47:43 +00:00
Douglas Gregor 19fc0b753a Make sure that reinterpret_cast gets a CastKind on all successful
paths. Fixes "cannot compile this unexpected cast lvalue yet" error in
llvm/lib/Analysis/IPA/GlobalsModRef.cpp.

llvm-svn: 91932
2009-12-22 22:47:22 +00:00
Anton Korobeynikov ef3fdc1cbd Add testcase for PR5703
llvm-svn: 91931
2009-12-22 22:37:23 +00:00
Douglas Gregor 39740dce30 Revert accidental commit
llvm-svn: 91930
2009-12-22 22:30:51 +00:00
Chris Lattner 261dd5ec06 accept -Wcomments as an alias for -Wcomment, PR5855
llvm-svn: 91929
2009-12-22 22:29:12 +00:00
John McCall a1d8550778 Add using shadow decls to the "instantiated locals" map, fixing PR5847.
llvm-svn: 91928
2009-12-22 22:26:37 +00:00
Douglas Gregor b6ea60872d Switch Sema::AddCXXDirectInitializerToDecl over to InitializationSequence
llvm-svn: 91927
2009-12-22 22:17:25 +00:00
Ted Kremenek e19711d223 Add transfer functions support for visiting an Objective-C message expression as an lvalue when the return type is a C++ reference.
llvm-svn: 91926
2009-12-22 22:13:46 +00:00
Daniel Dunbar 42fe663e3b ARM: Remove a FIXME, it's not actually more complicated than that.
llvm-svn: 91924
2009-12-22 21:59:17 +00:00
Jakob Stoklund Olesen 200f82c889 Remove minimal CFG sanity checks from verifier.
These checks would often trigger on unreachable statements inserted by
bugpoint, leading it astray.

It would be nice if we could distinguish unreachable blocks from errors.

llvm-svn: 91923
2009-12-22 21:52:27 +00:00
Jakob Stoklund Olesen 3db4952357 Allow explicit %reg0 operands beyond what the .td file describes.
ARM uses these to indicate predicates.

llvm-svn: 91922
2009-12-22 21:48:20 +00:00
Douglas Gregor 0a70c4d9a2 Switch parameter passing for overloaded binary operators to
InitializationSequence. Fixes the -fsyntax-only failure in
llvm/lib/Transforms/Scalar/InstructionCombining.cpp.

llvm-svn: 91921
2009-12-22 21:44:34 +00:00
Bill Wendling d85498132f Allow 0 as an order number. Don't assign an order to formal arguments.
llvm-svn: 91920
2009-12-22 21:35:02 +00:00
Sean Callanan 36eab80875 Fixes to the X86 disassembler:
Made LEA memory operands emit only 4 MCInst operands.
Made the scale operand equal 1 for instructions that have no
SIB byte.

llvm-svn: 91919
2009-12-22 21:12:55 +00:00
Anton Korobeynikov 3b8235bec3 Restore snprintf weirdness for VCPP only
llvm-svn: 91918
2009-12-22 20:11:00 +00:00
Chris Lattner c0f6402a94 Fix the Convert to scalar to not insert dead loads in the store case. The
load is needed when we have a small store into a large alloca (at which 
point we get a load/insert/store sequence), but when you do a full-sized
store, this load ends up being dead.

This dead load is bad in really large nasty testcases where the load ends
up causing mem2reg to insert large chains of dependent phi nodes which only
ADCE can delete.  Instead of doing this, just don't insert the dead load.

This fixes rdar://6864035

llvm-svn: 91917
2009-12-22 19:33:28 +00:00
Chris Lattner fda3b559e6 fix some fixme's by using twines
llvm-svn: 91916
2009-12-22 19:23:33 +00:00
Jakob Stoklund Olesen 6f579c12b1 Use proper move instructions. Make the verifier happy.
llvm-svn: 91914
2009-12-22 18:49:55 +00:00
Bob Wilson bac37abe73 Report an error for bad inline assembly, where the value passed for an
"indirect" operand is not a pointer.

llvm-svn: 91913
2009-12-22 18:34:19 +00:00
Douglas Gregor dc72875d25 Serialize the NoReturn bit on FunctionTypes for precompiled headers
llvm-svn: 91911
2009-12-22 18:11:50 +00:00
Evan Cheng 71d7eaa87e Remove target attribute break-sse-dep. Instead, do not fold load into sse partial update instructions unless optimizing for size.
llvm-svn: 91910
2009-12-22 17:47:23 +00:00
Douglas Gregor 613bf10470 Enter the scope of an initializer for direct-initialization as well as
for copy-initialization.

llvm-svn: 91909
2009-12-22 17:47:17 +00:00
Douglas Gregor 8b858396d4 Include based on the current path, since we already -I the X86 target's path. Fixes CMake build
llvm-svn: 91908
2009-12-22 17:25:11 +00:00
Douglas Gregor 2e9c795df0 When transforming a C++ "new" expression that was not explicitly given
a size, check whether the transformed type is itself an array type. If
so, take the major array bound as the size to allocate. Fixes PR5833.

llvm-svn: 91907
2009-12-22 17:13:37 +00:00
Douglas Gregor bbeb5c391c Switch parameter-passing for calls via function pointers (where we
don't have a FunctionDecl) over to InitializationSequence.

llvm-svn: 91906
2009-12-22 16:09:06 +00:00
Douglas Gregor 1b3039344b Switch InitializedEntity from TypeLoc down to just QualTypes, since we don't use the location information but we did spend a bunch of time building faked-up TypeLocs
llvm-svn: 91905
2009-12-22 15:35:07 +00:00
Sanjiv Gupta 8c5f05fcee While converting one of the operands to a memory operand, we need to check if it is Legal and does not result into a cyclic dep.
llvm-svn: 91904
2009-12-22 14:25:37 +00:00
Ken Dyck 8c89d59c82 Move the implementation of ASTContext::getTypeSizeInChars() to the .cpp file to
avoid #including CharUnits.h in ASTContext.h.

llvm-svn: 91903
2009-12-22 14:23:30 +00:00
Douglas Gregor 96596c98fb Switch initialization of parameters in a call over to
InitializationSequence (when a FunctionDecl is present). This required
a few small fixes to initialization sequences:

  - Make sure to use the adjusted parameter type for initialization of
  function parameters.
  - Implement transparent union calling semantics in C

llvm-svn: 91902
2009-12-22 07:24:36 +00:00
Chris Lattner 778f92ab02 specify what is invalid about it
llvm-svn: 91901
2009-12-22 07:03:21 +00:00
Chris Lattner f6d4129c76 specify a triple to use, fixing the test on non-x86-64 hosts.
llvm-svn: 91900
2009-12-22 07:01:12 +00:00
Chris Lattner 502f0f11e0 reject invalid input with a caret, e.g.:
simple-tests.txt:16:1: error: invalid instruction
0xff 0xff
^

llvm-svn: 91898
2009-12-22 06:58:29 +00:00
Bob Wilson 62a84ea8e3 Generalize SROA to allow the first index of a GEP to be non-zero. Add a
missing check that an array reference doesn't go past the end of the array,
and remove some redundant checks for in-bound array and vector references
that are no longer needed.

llvm-svn: 91897
2009-12-22 06:57:14 +00:00
Chris Lattner dd0c01b5de various cleanups, make the disassemble reject lines with too much
data on them, for example:

	addb	%al, (%rax)
simple-tests.txt:11:5: error: excess data detected in input
0 0 0 0 0 
    ^

llvm-svn: 91896
2009-12-22 06:56:51 +00:00
Chris Lattner 8879918722 If you thought that it didn't make sense for the disassembler
to not produce caret diagnostics, you were right!

llvm-svn: 91895
2009-12-22 06:45:48 +00:00
Chris Lattner dc9845b79a rewrite the file parser for the disassembler, implementing support for
comments.  Also, check in a simple testcase for the disassembler,
including a test for r91864

llvm-svn: 91894
2009-12-22 06:37:58 +00:00
Anders Carlsson 8a35c7982c Make sure that we mangle overloaded operators that are member functions correctly, giving them the correct arity.
With this seemingly insignificant fix, we are now able to build and link clang using clang itself! (LLVM still has to be built with gcc for the time being).

llvm-svn: 91893
2009-12-22 06:36:32 +00:00
Chris Lattner 72cbaa2ecb don't crash on blank lines, rename some variables.
llvm-svn: 91892
2009-12-22 06:24:00 +00:00
Anders Carlsson 3caa2b486d Work around PR5514.
llvm-svn: 91891
2009-12-22 06:13:42 +00:00
Chris Lattner f21a220bcd Implement PR5795 by merging duplicated return blocks. This could go further
by merging all returns in a function into a single one, but simplifycfg 
currently likes to duplicate the return (an unfortunate choice!)

llvm-svn: 91890
2009-12-22 06:07:30 +00:00
Chris Lattner 2b297ed9ee convert to filecheck
llvm-svn: 91889
2009-12-22 06:04:26 +00:00
Chris Lattner d806cbc98d fix a bug handling the gnu ?: extension. Patch by Storlek on IRC,
who prefers to be stealthy and mysterious.

llvm-svn: 91888
2009-12-22 06:00:13 +00:00
Anders Carlsson 9c45ad7a1b When we simply return a retained member expression when instantiating, we must also mark the member decl as referenced.
llvm-svn: 91887
2009-12-22 05:24:09 +00:00