Commit Graph

107365 Commits

Author SHA1 Message Date
Chandler Carruth 92c810be2c Restructure the API in Type based on a conversation with Richard Smith.
This makes 'isPointerLikeType' a little less confusing, and pulls the
decay check into a separate interface that is much more clear and
concrete. Also, just implement these as logical wrappers around other
predicates. Having a switch based implementation isn't likely to be
necessary. We can try to optimize them later if they show up on
a profile.

llvm-svn: 133405
2011-06-20 01:23:19 +00:00
Johnny Chen 4cfd07ef07 Add TestInlinedFrame.py to exercise the newly added SBFrame APIs: IsInlined() and GetFunctionName().
llvm-svn: 133404
2011-06-20 00:26:39 +00:00
Howard Hinnant a945a32981 More fixes: One of my fixes to type_traits earlier today was incorrect, so that is reverted. Recently clang appears to have tightened up its definition of is_convertible and that has caused some failures in [unordered_][multi]map. I've switched to using is_constructible to restablish the desired functionality in [unordered_][multi]map. Specifically, inserting rvalues of move-only types for the keys.
llvm-svn: 133402
2011-06-19 21:45:00 +00:00
Howard Hinnant 2d62821f98 Miscellaneous minor fixes in <type_traits>
llvm-svn: 133401
2011-06-19 19:12:59 +00:00
Jay Foad 6002068c13 Fix a FIXME by making GlobalVariable::getInitializer() return a
const Constant *.

llvm-svn: 133400
2011-06-19 18:37:11 +00:00
Benjamin Kramer f3c6d6def5 Update test.
llvm-svn: 133390
2011-06-19 12:14:34 +00:00
Nadav Rotem 94d67a02e0 Code cleanups: Remove duplicated logic in PromotInteRes_BITCAST, reserve vector space, reuse types.
llvm-svn: 133389
2011-06-19 10:49:57 +00:00
Nadav Rotem 35d600d9f4 Calls to AssertZext and getZeroExtendInReg must be made using scalar types.
llvm-svn: 133388
2011-06-19 10:22:39 +00:00
John McCall a994df5a02 More clarifications.
llvm-svn: 133387
2011-06-19 10:12:24 +00:00
John McCall fb414bc66d Improve the intro to the runtime-functions section.
llvm-svn: 133386
2011-06-19 09:59:33 +00:00
John McCall 092701c326 Describe the ARC runtime support calls.
llvm-svn: 133385
2011-06-19 09:36:02 +00:00
Chandler Carruth 3f3957ce04 Turn -Wnull-arithmetic back on by default -- we now have tests for the
false positives, including those in the GCC test suite, and don't warn
about them.

Let me know if this causes fallout, we can turn it back off if needed.

llvm-svn: 133384
2011-06-19 09:05:19 +00:00
Chandler Carruth e1db1cf0c3 Add test cases for false positives on -Wnull-arithmetic from Richard
Trieu, and fix them by checking for array and function types as well as
pointer types.

I've added a predicate method on Type to bundle together the logic we're
using here: isPointerLikeType(). I'd welcome better names for this
predicate, this is the best I came up with. It's implemented as a switch
to be a touch lighter weight than all the chained isa<...> casts that
would result otherwise.

llvm-svn: 133383
2011-06-19 09:05:14 +00:00
Nadav Rotem 36896bfd0c When promoting the vector elements in CopyToParts, use vector trunc
instead of scalarizing, and doing an element-by-element truncat.

llvm-svn: 133382
2011-06-19 08:49:38 +00:00
Nadav Rotem 6d0036e259 Reduce the runtime of the test. Keep only the interesting cases.
llvm-svn: 133381
2011-06-19 08:12:43 +00:00
Francois Pichet e878cb6bd1 Handle decltype keyword in Parser::isDeclarationSpecifier.
Fixes PR10154. Found by parsing MFC 2010 code with clang.

llvm-svn: 133380
2011-06-19 08:02:06 +00:00
Greg Clayton b537fd51d2 Bumping Xcode project version for lldb-63.
llvm-svn: 133378
2011-06-19 04:35:24 +00:00
Greg Clayton 5cf21f5f06 Fixed a crasher where we were accessing a symbol with a bad index.
llvm-svn: 133377
2011-06-19 04:26:01 +00:00
Greg Clayton 5861d3e6f0 Make sure we have a valid object file before we try getting the symbol table
so we avoid crashing.

llvm-svn: 133376
2011-06-19 04:02:02 +00:00
Greg Clayton 090d098fc2 Fixed a case where LLDB would crash if we get C++ operators with invalid
operator counts due to bad debug DWARF debug info. We now verify the operator
has a valid number of params using the clang operator tables.

llvm-svn: 133375
2011-06-19 03:43:27 +00:00
Nick Lewycky 1869aa35ca Revert r133373. I was going to use this to teach the Verifier to verify constant
expressions, but Chris wants to instead reduce the set of possible constant
expression types.

llvm-svn: 133374
2011-06-19 03:30:32 +00:00
Nick Lewycky 861f5b7344 Add the remaining instructions/constant expressions as Operators so that code
can manipulate instructions and constantexpr's uniformly. No users yet though.

llvm-svn: 133373
2011-06-19 02:26:33 +00:00
Francois Pichet f6d6808485 Add support for MSVC __debugbreak compiler intrinsic.
llvm-svn: 133372
2011-06-19 00:16:12 +00:00
Chris Lattner 8936d2bfbc Remove support for parsing the "type i32" syntax for defining a numbered
top level type without a specified number.  This syntax isn't documented
and blocks forward progress.

llvm-svn: 133371
2011-06-19 00:03:46 +00:00
Peter Collingbourne ba23ca085f Switch from USEC_PER_SEC/NSEC_PER_SEC/NSEC_PER_USEC to TimeValue constants
Fixes the Linux build.

llvm-svn: 133370
2011-06-18 23:52:14 +00:00
Chris Lattner 07037364cd revert r133368, apparently I missed the tests to be updated.
llvm-svn: 133369
2011-06-18 23:51:31 +00:00
Chris Lattner a7f74ad10e Remove support for parsing the "type i32" syntax for defining a numbered
top level type without a specified number.  This asmprinter has never
generated this, as you can tell by no tests being updated.  It also isn't
documented.

llvm-svn: 133368
2011-06-18 23:38:57 +00:00
Chris Lattner 845511fe1c update for api change.
llvm-svn: 133365
2011-06-18 22:49:11 +00:00
Chris Lattner f3f545ea8a fix the varargs version of StructType::get to not require an LLVMContext, making usage
much cleaner.

llvm-svn: 133364
2011-06-18 22:48:56 +00:00
Chris Lattner b97d926bce eliminate some pointless virtual methods.
llvm-svn: 133363
2011-06-18 22:15:47 +00:00
Chris Lattner 67733f6557 simplify some code.
llvm-svn: 133362
2011-06-18 21:46:23 +00:00
Chris Lattner 3a16c711bc now that Type::getDescription() is dead, the TypePrinting class can move from Assembly/Writer.h to being
a private class in AsmWriter.cpp.

llvm-svn: 133361
2011-06-18 21:23:04 +00:00
Chris Lattner 0f214ebe5a eliminate the Type::getDescription() method, using "<<" instead. This
removes some gunk from LLVMContext.

llvm-svn: 133360
2011-06-18 21:18:23 +00:00
Chris Lattner 8a05de5538 improve some comments.
llvm-svn: 133359
2011-06-18 21:02:49 +00:00
Greg Clayton 036ff1162f Don't print the baton when a breakpoint has a callback since it is pretty
useless to show.

llvm-svn: 133358
2011-06-18 20:12:02 +00:00
Greg Clayton 316d498baa Added two new API functions to SBFrame:
const char *
SBFrame::GetFunctionName();

bool
SBFrame::IsInlined();


The first one will return the correct name for a frame. The name of a frame is:
- the name of the inlined function (if there is one)
- the name of the concrete function (if there is one)
- the name of the symbol (if there is one)
- NULL

We also can now easily check if a frame is an inline function or not.

llvm-svn: 133357
2011-06-18 20:06:08 +00:00
Chris Lattner dc7f4ee382 remove an unreduced testcase.
llvm-svn: 133356
2011-06-18 19:12:59 +00:00
Chris Lattner b372f66b62 rework the remaining autoupgrade logic to use a StringRef instead of creating a
temporary std::string for every function being checked.

llvm-svn: 133355
2011-06-18 18:56:39 +00:00
Raghesh Aloor 49a3a7ba20 www: Adding webpage to track memory access transformation
llvm-svn: 133354
2011-06-18 17:17:16 +00:00
Raghesh Aloor 94085eaa83 www: Adding link to memaccess.html
llvm-svn: 133353
2011-06-18 17:09:33 +00:00
Benjamin Kramer f7cb7ef996 Directly print to a raw_ostream instead of printing to a buffer first.
llvm-svn: 133352
2011-06-18 14:42:47 +00:00
Benjamin Kramer 9319e9c5d8 Simplify code. No functionality change.
llvm-svn: 133351
2011-06-18 14:42:42 +00:00
Benjamin Kramer 0fb6db6442 Simplify code. No change in functionality.
llvm-svn: 133350
2011-06-18 13:53:47 +00:00
Hans Wennborg 3fefc65c1d MC: Allow .common as alias for .comm assembler directive. PR10116.
llvm-svn: 133349
2011-06-18 13:51:54 +00:00
Benjamin Kramer e1fc29b6ac Don't allocate empty read-only SmallVectors during SelectionDAG deallocation.
llvm-svn: 133348
2011-06-18 13:13:44 +00:00
Benjamin Kramer 25e17b0f89 Remove unused but set variables.
llvm-svn: 133347
2011-06-18 11:09:41 +00:00
Benjamin Kramer 8a9cc4fe28 Remove dead variables.
llvm-svn: 133346
2011-06-18 10:34:07 +00:00
Benjamin Kramer dd19c0114d 80 cols.
llvm-svn: 133345
2011-06-18 10:34:00 +00:00
Hans Wennborg 4ab4a8e63a Fix PR10103: Less code for enum type translation.
In cases such as the attached test, where the case value for a switch
destination is used in a phi node that follows the destination, it
might be better to replace that value with the condition value of the
switch, so that more blocks can be folded away with
TryToSimplifyUncondBranchFromEmptyBlock because there are less
conflicts in the phi node.

llvm-svn: 133344
2011-06-18 10:28:47 +00:00
Chandler Carruth 54a2c06cf2 Remove more unnecessary dependencies now that the Frontend -> ARCMigrate
edge has been broken.

llvm-svn: 133343
2011-06-18 09:07:35 +00:00