Commit Graph

74366 Commits

Author SHA1 Message Date
Daniel Dunbar 8fbe78f6fc Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
- This is designed to make it obvious that %clang_cc1 is a "test variable"
   which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
   can be useful to redefine what gets run as 'clang -cc1' (for example, to set
   a default target).

llvm-svn: 91446
2009-12-15 20:14:24 +00:00
Chris Lattner a3aef788ec Fix GetConstantStringInfo to not look into MDString (it works on
real data, not metadata) and fix DbgInfoPrinter to not abuse
GetConstantStringInfo.

llvm-svn: 91444
2009-12-15 19:34:20 +00:00
Jim Grosbach 38c4f4b5d1 whitespace
llvm-svn: 91442
2009-12-15 19:28:13 +00:00
Devang Patel 1f4690c624 Add support to emit debug info for C++ namespaces.
llvm-svn: 91440
2009-12-15 19:16:48 +00:00
Anders Carlsson 714d0969b3 If a ParmVarDecl's default argument is a CXXExprWithTemporaries, return the underlying expr instead. Add getNumDefaultArgTemporaries and getDefaultArgTemporary which returns the temporaries a default arg creates.
llvm-svn: 91439
2009-12-15 19:16:31 +00:00
Chris Lattner 26ab363361 optimize strstr, PR5783
llvm-svn: 91438
2009-12-15 19:14:40 +00:00
Nate Begeman ac8183a830 Support OpenCL 1.1 odd-length vector component accessors.
For hi/odd of an odd-length vector, the last component is undefined.  Since
we shuffle with an undef vector, no CodeGen needs to change to support this.

llvm-svn: 91437
2009-12-15 18:13:04 +00:00
Mike Stump 4ec1237106 Add testcase for recent checkin.
Patch by Chip Davis.

llvm-svn: 91436
2009-12-15 18:02:45 +00:00
Fariborz Jahanian d1a2d5719a Implement conditional block invocation rewrite
and some clean up and a block rewriter test.

llvm-svn: 91435
2009-12-15 17:30:20 +00:00
Johnny Chen c28e629c2d Added encoding bits for the Thumb ISA. Initial checkin.
llvm-svn: 91434
2009-12-15 17:24:14 +00:00
Douglas Gregor 906db8a546 Fix some diagnostic-related FIXMEs, from Nicola Gigante
llvm-svn: 91433
2009-12-15 16:44:32 +00:00
Dan Gohman 265ce318b8 Delete an unused function.
llvm-svn: 91432
2009-12-15 16:30:09 +00:00
Douglas Gregor dce7d0e8d9 Elaborated types are specifier types, based on a patch from Cornelius
llvm-svn: 91431
2009-12-15 16:28:32 +00:00
Zhongxing Xu 765f3e4f35 Add comments.
llvm-svn: 91430
2009-12-15 09:32:42 +00:00
Zhongxing Xu 950978a44b Remove displayProgress parameter.
llvm-svn: 91429
2009-12-15 09:09:49 +00:00
Chris Lattner 24aba42d04 add some other xforms that should be done as part of PR5783
llvm-svn: 91428
2009-12-15 09:05:13 +00:00
Chris Lattner 4179fa0357 a few improvements:
1. Use std::equal instead of reinventing it.
2. don't run dtors in destroy_range if element is pod-like.
3. Use isPodLike to decide between memcpy/uninitialized_copy 
   instead of is_class.  isPodLike is more generous in some cases.

llvm-svn: 91427
2009-12-15 08:34:01 +00:00
Chris Lattner 6087a3e76b hoist the begin/end/capacity members and a few trivial methods
up into the non-templated SmallVectorBase class.

llvm-svn: 91426
2009-12-15 08:29:22 +00:00
Chris Lattner 62e04783c0 improve isPodLike to know that all non-class types are pod.
llvm-svn: 91425
2009-12-15 07:40:44 +00:00
Chris Lattner 13b3928d62 move isPodLike<clang::QualType> out to Type.h. We don't
want some clients of QualType to think it's a pod and some to 
not know it is.

llvm-svn: 91424
2009-12-15 07:30:12 +00:00
Chris Lattner 9c45e03664 Lang verified that SlotIndex is "pod like" even though it isn't a pod.
llvm-svn: 91423
2009-12-15 07:27:58 +00:00
Chris Lattner 2f3da9b205 update to match LLVM API change:
Remove isPod() from DenseMapInfo, splitting it out to its own
isPodLike type trait.  This is a generally useful type trait for
more than just DenseMap, and we really care about whether something
acts like a pod, not whether it really is a pod.

llvm-svn: 91422
2009-12-15 07:26:51 +00:00
Chris Lattner 45d040bd85 Remove isPod() from DenseMapInfo, splitting it out to its own
isPodLike type trait.  This is a generally useful type trait for
more than just DenseMap, and we really care about whether something
acts like a pod, not whether it really is a pod.

llvm-svn: 91421
2009-12-15 07:26:43 +00:00
Mikhail Glushenkov 66a664870b Convert llvmc tests to FileCheck.
llvm-svn: 91420
2009-12-15 07:21:14 +00:00
Mikhail Glushenkov 62b65ecf18 Support hook invocation from 'append_cmd'.
llvm-svn: 91419
2009-12-15 07:20:50 +00:00
Evan Cheng b3032962ef Fix an encoding bug.
llvm-svn: 91417
2009-12-15 06:49:02 +00:00
Chris Lattner a867a58a26 add an ALWAYS_INLINE macro, which does the obvious thing.
llvm-svn: 91416
2009-12-15 06:14:33 +00:00
Daniel Dunbar f6da2951b6 Add -W[no-]variadic-macros support.
llvm-svn: 91415
2009-12-15 05:29:09 +00:00
Daniel Dunbar 3031aea9cd Forward -isysroot to clang -cc1.
llvm-svn: 91414
2009-12-15 04:55:58 +00:00
Daniel Dunbar 95d40a6701 Fix a COVTCTII (crash-on-valid-that-clang-thinks-is-invalid, duh),
note_previous_decl was used where note_previous_declaration was intended. Better
names or PR5785 might be nice.

llvm-svn: 91413
2009-12-15 04:24:24 +00:00
Ted Kremenek 29f3808667 Until we can make the dead stores checker smarter, dont' emit dead store warnings for C++ objects (whose constructors/destructors have possible side-effects).
llvm-svn: 91412
2009-12-15 04:12:12 +00:00
Eli Friedman 2151725325 Fix a small bug in ComputeMethodVtableIndices.
llvm-svn: 91411
2009-12-15 03:31:17 +00:00
Kenneth Uildriks 792f0913ee For fastcc on x86, let ECX be used as a return register after EAX and EDX
llvm-svn: 91410
2009-12-15 03:27:52 +00:00
Eli Friedman 8d83842761 Really fix this test.
llvm-svn: 91409
2009-12-15 03:22:41 +00:00
Mike Stump feb1945fee This patch should fix PR2461. It allows clang to apply the noreturn
attribute to function pointers. It also fixes Sema to check function
pointers for the noreturn attribute when checking for fallthrough.

Patch by Chip Davis, with a slight fix to pass the testsuite.

llvm-svn: 91408
2009-12-15 03:11:10 +00:00
John McCall 106c10881e Names from dependent base classes are not found by unqualified lookup.
llvm-svn: 91407
2009-12-15 03:10:26 +00:00
Evan Cheng fcb5453dc7 Disable 91381 for now. It's miscompiling ARMISelDAG2DAG.cpp.
llvm-svn: 91405
2009-12-15 03:07:11 +00:00
Mikhail Glushenkov 096fc103fb Validate the generated C++ code in llvmc tests.
Checks that the code generated by 'tblgen --emit-llvmc' can be actually
compiled. Also fixes two bugs found in this way:

- forward_transformed_value didn't work with non-list arguments
- cl::ZeroOrOne is now called cl::Optional

llvm-svn: 91404
2009-12-15 03:04:52 +00:00
Mikhail Glushenkov cb0721e363 Pipe 'grep' output to 'count'.
llvm-svn: 91403
2009-12-15 03:04:14 +00:00
Mikhail Glushenkov 2cb65bd5ab Allow $CALL(Hook, '$INFILE') for non-join tools.
llvm-svn: 91402
2009-12-15 03:04:02 +00:00
Mikhail Glushenkov 53ec77972e Small documentation update.
llvm-svn: 91401
2009-12-15 03:03:37 +00:00
Evan Cheng 852c486946 Make 91378 more conservative.
1. Only perform (zext (shl (zext x), y)) -> (shl (zext x), y) when y is a constant. This makes sure it remove at least one zest.
2. If the shift is a left shift, make sure the original shift cannot shift out bits.

llvm-svn: 91399
2009-12-15 03:00:32 +00:00
Ted Kremenek f65a0c6768 scan-build/ccc-analyzer: start analyzing C++ FTW.
llvm-svn: 91398
2009-12-15 02:35:54 +00:00
John McCall 4ea24f19f5 You can't use typedefs to declare template member specializations, and
clang enforces it.

llvm-svn: 91397
2009-12-15 02:35:24 +00:00
Eli Friedman a2761ba52f Fix test broken by my last commit.
llvm-svn: 91396
2009-12-15 02:20:06 +00:00
John McCall 9003406096 Diagnose the use of typedefs for template specialization types in the scope
specifiers for out-of-line declarations, e.g.
  typedef Temp<int> MyTemp;
  template <> MyTemp::foo;

llvm-svn: 91395
2009-12-15 02:19:47 +00:00
Eli Friedman d777cccb47 Don't force the emission of destructor definitions.
llvm-svn: 91394
2009-12-15 02:06:15 +00:00
Bill Wendling 07beddceb7 Initial work on disabling the scheduler. This is a work in progress, and this
stuff isn't used just yet.

We want to model the GCC `-fno-schedule-insns' and `-fno-schedule-insns2'
flags. The hypothesis is that the people who use these flags know what they are
doing, and have hand-optimized the C code to reduce latencies and other
conflicts.

The idea behind our scheme to turn off scheduling is to create a map "on the
side" during DAG generation. It will order the nodes by how they appeared in the
code. This map is then used during scheduling to get the ordering.

llvm-svn: 91392
2009-12-15 01:54:51 +00:00
Chris Lattner d19564b109 set up the machinery for a MacroArgs cache hanging off Preprocessor.
We creating and free thousands of MacroArgs objects (and the related
std::vectors hanging off them) for the testcase in PR5610 even though
there are only ~20 live at a time.  This doesn't actually use the 
cache yet.

llvm-svn: 91391
2009-12-15 01:51:03 +00:00
Evan Cheng 45430bbfaa Tail duplication should zap a copy it inserted for SSA update if the copy is the only use of its source.
llvm-svn: 91390
2009-12-15 01:44:10 +00:00