Commit Graph

108595 Commits

Author SHA1 Message Date
Alexis Hunt 8dfec1ac7d Make sure that __time_put constructors properly on non-Apple platforms.
llvm-svn: 134947
2011-07-12 00:55:04 +00:00
Bruno Cardoso Lopes 7a26681092 Fix one x86_64 abi issue and the test to actually look for the right thing,
which is: { <4 x float>, <4 x float> } should continue to go through memory.

llvm-svn: 134946
2011-07-12 00:30:27 +00:00
Nick Lewycky e9bb9a0baa TypeMap had a destructor that destroyed the types it held. DenseMap did not, so
destroy those types in ~LLVMContext.

llvm-svn: 134945
2011-07-12 00:26:08 +00:00
Enrico Granata d62e57fbe4 test case for the named summaries feature
llvm-svn: 134944
2011-07-12 00:19:00 +00:00
Enrico Granata f9fa6ee5e3 named summaries:
- a new --name option for "type summary add" lets you give a name to a summary
 - a new --summary option for "frame variable" lets you bind a named summary to one or more variables
${var%s} now works for printing the value of 0-terminated CStrings
type format test case now tests for cascading
 - this is disabled on GCC because GCC may end up stripping typedef chains, basically breaking cascading
new design for the FormatNavigator class
new template class CleanUp2 meant to support cleanup routines with 1 additional parameter beyond resource handle

llvm-svn: 134943
2011-07-12 00:18:11 +00:00
John McCall 5fcf8da33d Do full-expression cleanups in a much more sensible way that still lets
people write useful cleanup classes.

llvm-svn: 134942
2011-07-12 00:15:30 +00:00
Andrew Trick cdc2297ee1 indvars: Code reorganization in preparation for
LinearFunctionTestReplace rewrite. No functionality.

I've been wanting to group the indvar subphases into sections and
order them by their logical sequence. My next checkin adds functions
related to LFTR, and doing the reorg now should help reviewers. Since,
most of the code in IndVarSimplify.cpp has recently been replaced or
will be replaced soon, obscuring blame should not be an issue. This
seems like an ideal time to shuffle the code around.

I'm happy to take more suggestions for cleaning up the code. Or if
you've been wanting to cleanup anything in this file yourself, now is
a good time.

llvm-svn: 134941
2011-07-12 00:08:50 +00:00
Johnny Chen 1d3e880c2c Passing in os.ctermid() as the arg for SBTarget.Launch(...) for stdin_path, stdout_path, and stderr_path
is just wrong and resulted in the inferior's output getting mixed into the GDB remote communication's
log file.  Change all test cases to not pass os.ctermid() and either use SBTarget.LaunchSimple() or
SBTarget.Launch() and pass None as stdin_path/stdout_path/srderr_path to use a pseudo terminal.

rdar://problem/9716499 program output is getting mixed into the GDB remote communications

llvm-svn: 134940
2011-07-11 23:38:23 +00:00
Bruno Cardoso Lopes 3472838c7a Disable avx feature from corei7-avx, and use -mavx for now. Right now, if -mavx is
specified, 128 avx code is used and we're not sure yet if this the behavior
we want (and if it does, some improvements are needed before relying on it).

llvm-svn: 134939
2011-07-11 23:33:46 +00:00
Chandler Carruth 9312c6464d Style tweak to the more idiomatic 'assert(!bad_state())'.
Patch by Caitlin Sadowski.

llvm-svn: 134938
2011-07-11 23:33:05 +00:00
Chandler Carruth fcc48d9e71 Hoist the logic for checking the number of arguments to an attribute
into a static helper.

Original patch by Caitlin Sadowski, style tweaks by me.

llvm-svn: 134937
2011-07-11 23:30:35 +00:00
Eric Christopher 71520a867d Revert r134921, 134917, 134908 and 134907. They're causing failures
in multiple buildbots.

llvm-svn: 134936
2011-07-11 23:06:52 +00:00
Bruno Cardoso Lopes 571419bae6 Enable "avx" feature, so it can be seen by llvm
llvm-svn: 134935
2011-07-11 22:50:13 +00:00
Bruno Cardoso Lopes 21a41bb5ec Reapply r134754, which turns out to be working correctly and also
add one more testcase.

llvm-svn: 134934
2011-07-11 22:41:29 +00:00
John Wiegley 2a0177ba4c fix some examples
llvm-svn: 134933
2011-07-11 22:39:46 +00:00
Douglas Gregor 2e12550e37 Allow us to compute linkage et al for instantiation-dependent types.
llvm-svn: 134932
2011-07-11 22:38:07 +00:00
NAKAMURA Takumi 9a9ec73665 Revert r134898, "test/Frontend/dependency-gen.c: Mark XFAIL: mingw due to PR10331. to appease mingw-target (and non-mingw-host) builds.
PR10331 is still alive I suppose.

llvm-svn: 134931
2011-07-11 22:34:14 +00:00
Cameron Zwarich 4d4b022478 Fix LTO after the recent MC subtarget refactoring.
llvm-svn: 134930
2011-07-11 22:19:51 +00:00
Argyrios Kyrtzidis bf65d2d820 Reenable test.
llvm-svn: 134928
2011-07-11 21:58:47 +00:00
Argyrios Kyrtzidis c645d60f12 Add missing header file for the test.
llvm-svn: 134927
2011-07-11 21:58:44 +00:00
Eli Friedman 6290ae476e Add diagnostic for constructs like "va_arg(l, float)" which have undefined behavior. PR10201.
llvm-svn: 134926
2011-07-11 21:45:59 +00:00
Eli Friedman 8532db2ec4 Test is broken; XFAIL it until Argyrios gets a chance to look at it.
llvm-svn: 134925
2011-07-11 21:44:14 +00:00
Johnny Chen 928f4ee26f Add missing docstring for 'bool stop_at_endtry'.
llvm-svn: 134924
2011-07-11 21:41:05 +00:00
Evan Cheng 58a98141d9 Most MCCodeEmitter's don't meed MCContext.
llvm-svn: 134922
2011-07-11 21:24:15 +00:00
David Greene cf8a603a1b Use get(0 Instead of Create()
Respond to some feedback asking for a name change.

llvm-svn: 134921
2011-07-11 20:55:22 +00:00
Evan Cheng af645a2356 Disassembler doesn't need TargetMachine anymore.
llvm-svn: 134920
2011-07-11 20:40:56 +00:00
Argyrios Kyrtzidis 2299889f87 Don't warn for unused macro when undef'ing it, if it comes from an included file. rdar://9745065
llvm-svn: 134919
2011-07-11 20:39:47 +00:00
Argyrios Kyrtzidis a59dbea017 Fix CMake.
llvm-svn: 134918
2011-07-11 20:28:59 +00:00
Evan Cheng 4f6b5ca39d struct Init -> class Init.
llvm-svn: 134917
2011-07-11 20:23:13 +00:00
Argyrios Kyrtzidis f89cc69eac [arcmt] Move the remapping functions to clang-c/Index.h and change 'arcmt_' prefix to 'clang_'.
llvm-svn: 134916
2011-07-11 20:15:00 +00:00
Johnny Chen 9a07aba962 The lldbtest.TestBase.DebugSBValue(self, val) method call now does not need the frame argument.
Only the val (of SBValue type) argument is needed.

llvm-svn: 134915
2011-07-11 20:06:28 +00:00
Jim Ingham 54fcc89abd Mark the test with expectedFailure for now.
llvm-svn: 134914
2011-07-11 19:47:16 +00:00
John McCall 3b935d33a1 Emit partial destruction of structs with initializer lists.
llvm-svn: 134913
2011-07-11 19:35:02 +00:00
Enrico Granata e06e828d53 rolling back previous commit; double fix made it wrong again
llvm-svn: 134912
2011-07-11 19:34:11 +00:00
Enrico Granata 8b0d1777f5 Prevent the test suite from failing all the time until this bug is fixed
llvm-svn: 134911
2011-07-11 19:31:01 +00:00
Johnny Chen 38b5371184 Mark as expected failure.
rdar://problem/9745789 "expression" can't call functions in class methods

llvm-svn: 134910
2011-07-11 19:30:18 +00:00
Johnny Chen 56b92a7b04 Update the test scenario for find_global_variables() to now start the inferior process
before issuing API calls to find the global variable and to get its value.

rdar://problem/9700873 has been updated to reflect the latest status.  The dwarf case
now does not seg fault if the inferior is not started; instead, for dwarf case, the
value retrieved from the global variable is None.

llvm-svn: 134909
2011-07-11 19:15:11 +00:00
David Greene 39c0482680 Fix Build
Update the tag for Init to match how it's defined.

llvm-svn: 134908
2011-07-11 18:59:29 +00:00
David Greene af973b4f36 [AVX] Make Inits Foldable
Manage Inits in a FoldingSet.  This provides several benefits:

- Memory for Inits is properly managed

- Duplicate Inits are folded into Flyweights, saving memory

- It enforces const-correctness, protecting against certain classes
  of bugs

The above benefits allow Inits to be used in more contexts, which in
turn provides more dynamism to TableGen.  This enhanced capability
will be used by the AVX code generator to a fold common patterns
together.

llvm-svn: 134907
2011-07-11 18:25:51 +00:00
Fariborz Jahanian 256d39d47d objc-arc: Diagnose when captured variable in block literals
require destruction and there is possibility of that without
construction. Thanks Johnm for review and suggestions offline.
// rdar://9535237.

llvm-svn: 134906
2011-07-11 18:04:54 +00:00
Shantonu Sen 761feb85e1 Resynchronize EDInfo.h and EDEmitter.cpp.
The enum names as well as order (i.e. value)
had skewed, which means that consumers of the
tablegen-ed table would see different values than
intended. Make both files have a superset of enums,
and add classification as needed for numMCOperands.

Reviewed by Owen Anderson

llvm-svn: 134905
2011-07-11 17:57:30 +00:00
Chandler Carruth d517395248 Apply patch from Richard Trieu to fix PR9548:
When two different types has the same text representation in the same
diagnostic message, print an a.k.a. after the type if the a.k.a. gives extra
information about the type.

class versa_string;

typedef versa_string string;

namespace std {template <typename T> class vector;}

using std::vector;

void f(vector<string> v);

namespace std {
class basic_string;
typedef basic_string string;
template <typename T> class vector {};
void g() {
  vector<string> v;
  f(v);
}
}

Old message:
----------------
test.cc:15:3: error: no matching function for call to 'f'
  f(&v);
  ^
test.cc:7:6: note: candidate function not viable: no known conversion from
      'vector<string>' to 'vector<string>' for 1st argument
void f(vector<string> v);
     ^
1 error generated.

New message:
---------------
test.cc:15:3: error: no matching function for call to 'f'
  f(v);
  ^
test.cc:7:6: note: candidate function not viable: no known conversion from
      'vector<string>' (aka 'std::vector<std::basic_string>') to
      'vector<string>' (aka 'std::vector<versa_string>') for 1st argument
void f(vector<string> v);
     ^
1 error generated.

llvm-svn: 134904
2011-07-11 17:49:21 +00:00
Jim Grosbach a9a3f0a414 Fix recognition of ARM 'adcs' mnemonic.
The 'CS' is not a predication suffix in this case.

llvm-svn: 134903
2011-07-11 17:09:57 +00:00
Jim Grosbach 581da64241 Simplify printing of ARM shifted immediates.
Print shifted immediate values directly rather than as a payload+shifter
value pair. This makes for more readable output assembly code, simplifies
the instruction printer, and is consistent with how Thumb immediates are
 displayed.

llvm-svn: 134902
2011-07-11 16:48:36 +00:00
Garrison Venn 5fb3f66516 Modified demo to work with non const Type parameters as is required by new
type system. However most of these modifications were due to IRBuilder
(IRBuilderBase), not having been modified to NOT return such const qualified
free types. If IRBuilder does not change, as can also be seen in its 
instruction creation methods, to use const free types, it may be useful to have
ExceptionDemo drop IRBuilder usage. Modifying builder.getInt32Ty() to
llvm::Type::getInt32Ty(builder.getContext()) is pretty ugly.

llvm-svn: 134901
2011-07-11 16:31:53 +00:00
NAKAMURA Takumi 5b304432bb test/CodeGen/PowerPC/vector.ll: Tweak redirection >%t >%t to >%t >>%t. See also r134814 (test/CodeGen/X86/vector.ll).
llvm-svn: 134900
2011-07-11 16:21:52 +00:00
NAKAMURA Takumi c7ec4539ed Tweak two tests with MSYS-bash tolerant.
llvm-svn: 134899
2011-07-11 16:21:34 +00:00
NAKAMURA Takumi 7392a5f92f test/Frontend/dependency-gen.c: Mark XFAIL: mingw due to PR10331.
llvm-svn: 134898
2011-07-11 16:21:28 +00:00
Douglas Gregor 9824aec830 Don't complain about missing return statements for naked
functions. Fixes <rdar://problem/9731999>.

llvm-svn: 134897
2011-07-11 15:24:01 +00:00
NAKAMURA Takumi 1f2aacf276 test/Preprocessor/include-directive2.c: Get rid of using <float.h> to avoid #include_next on mingw.
llvm-svn: 134896
2011-07-11 14:53:27 +00:00