Commit Graph

51352 Commits

Author SHA1 Message Date
Mikhail Glushenkov a6a9066848 Man page update.
llvm-svn: 60918
2008-12-12 02:34:56 +00:00
Douglas Gregor 1d248c53ab In C++, set the type of each of the enumerators in an enumeration to
the type of the enumeration once the enumeration has been defined.

Fix the overloading test-case to properly create enums that promote
the way we want them to.

Implement C++0x promotions from enumeration types to long
long/unsigned long long. We're using these promotions in Carbon.h
(since long long is a common extension).

Fixes PR clang/2954: http://llvm.org/bugs/show_bug.cgi?id=2954

llvm-svn: 60917
2008-12-12 02:00:36 +00:00
Mon P Wang 9c2d26d208 Added support for SELECT v8i8 v4i16 for X86 (MMX)
Added support for TRUNC v8i16 to v8i8 for X86 (MMX)

llvm-svn: 60916
2008-12-12 01:25:51 +00:00
Bill Wendling 1a317678bc Redo the arithmetic with overflow architecture. I was changing the semantics of
ISD::ADD to emit an implicit EFLAGS. This was horribly broken. Instead, replace
the intrinsic with an ISD::SADDO node. Then custom lower that into an
X86ISD::ADD node with a associated SETCC that checks the correct condition code
(overflow or carry). Then that gets lowered into the correct X86::ADDOvf
instruction.

Similar for SUB and MUL instructions.

llvm-svn: 60915
2008-12-12 00:56:36 +00:00
Mikhail Glushenkov 6932e2f368 Fix W3C validator errors.
llvm-svn: 60912
2008-12-11 23:43:14 +00:00
Ted Kremenek 864eb39233 PTH:
- Added a side-table per each token-cached file with the preprocessor conditional stack.  This tracks what #if's are matched with what #endifs and where their respective tokens are in the PTH file.  This will allow for quick skipping of excluded conditional branches in the Preprocessor.
- Performance testing shows the addition of this information (without actually utilizing it) leads to no performance regressions.

llvm-svn: 60911
2008-12-11 23:36:38 +00:00
Mikhail Glushenkov d9a7795abc Use correct file for the llvmc tutorial.
llvm-svn: 60910
2008-12-11 23:33:33 +00:00
Mikhail Glushenkov 6fd5513284 Update the auto-generated llvmc documentation.
llvm-svn: 60909
2008-12-11 23:24:40 +00:00
Chris Lattner ece9ae718b add annotation
llvm-svn: 60907
2008-12-11 23:11:52 +00:00
Sebastian Redl d65cea8dde Convert a big bunch of expression parsers to use smart pointers.
llvm-svn: 60906
2008-12-11 22:51:44 +00:00
Ted Kremenek ca153f7349 PTHLexer: Keep track of the location of the last '#' token and provide the means to jump ahead in the token stream.
llvm-svn: 60905
2008-12-11 22:41:47 +00:00
Sebastian Redl 90893187c4 Convert some more expression parsers to use smart pointers.
llvm-svn: 60904
2008-12-11 22:33:27 +00:00
Mikhail Glushenkov 4673023e71 Add a '-Wo,' option that passes options to opt.
llvm-svn: 60902
2008-12-11 22:19:14 +00:00
Evan Cheng a52c3b4b8b Fix a 80 col. violation.
llvm-svn: 60901
2008-12-11 22:02:02 +00:00
Sebastian Redl 59b5e517c7 Convert selected expression parsers to use smart pointers.
llvm-svn: 60900
2008-12-11 21:36:32 +00:00
Steve Naroff a5c0db8467 Rename a local predicate to avoid confusion with Type::isBlockPointerType().
llvm-svn: 60899
2008-12-11 21:05:33 +00:00
Steve Naroff 5ac4eac3b6 Fixup generated code for imported block decl refs.
Found while investigating <rdar://problem/6435837> clang ObjC rewriter: use Block_release instead of Block_destroy.

llvm-svn: 60898
2008-12-11 20:51:38 +00:00
Douglas Gregor 7a4fad1b0b Address some comments on the name lookup/DeclContext patch from Chris
llvm-svn: 60897
2008-12-11 20:41:00 +00:00
Ted Kremenek 67ab296d5c Remove unused ivar CurTokenIdx.
llvm-svn: 60896
2008-12-11 20:39:48 +00:00
Sebastian Redl bab9a4b5ea Convert the remaining statement parsers to smart pointers.
llvm-svn: 60895
2008-12-11 20:12:42 +00:00
Sebastian Redl b62406f6e4 Convert some more statement parsers to smart pointers.
llvm-svn: 60892
2008-12-11 19:48:14 +00:00
Misha Brukman 5039be7e27 * Removed stray </p> tag
* Whitespace cleanups

llvm-svn: 60891
2008-12-11 19:44:51 +00:00
Steve Naroff e4d722bf2f Fix <rdar://problem/6435842> clang ObjC rewriter: #include Block.h, Block_private.h or come up with #define to prevent double-definition
llvm-svn: 60890
2008-12-11 19:43:14 +00:00
Misha Brukman 586a15c995 * <div align=center> is not valid HTML 4.01 - removed alignment
* <sup> cannot appear inside a <pre> - replaced <pre> with <tt> and <br>
* Added standard "Notes" section
* Sprinkled fixed-width <tt> tags in a few places for consistency

llvm-svn: 60889
2008-12-11 19:37:04 +00:00
Sebastian Redl 042ad95d4e Convert a number of statement parsers to smart pointers.
llvm-svn: 60888
2008-12-11 19:30:53 +00:00
Steve Naroff 1fa7bd16c8 Fix <rdar://problem/6435382> clang ObjC rewriter: @property/@synthesize and blocks don't work together
llvm-svn: 60887
2008-12-11 19:29:16 +00:00
Misha Brukman 21a6370323 Removed warnings from HTML 4.01 validator: trailing slashes in <br> and <img>
tags are not needed in HTML, only XML.

llvm-svn: 60885
2008-12-11 18:23:24 +00:00
Misha Brukman 0091c26b2b Conform to the HTML 4.01 Strict specification.
llvm-svn: 60884
2008-12-11 18:14:06 +00:00
Douglas Gregor e029561346 Actually distinguish between RecordDecl::field_iterator and RecordDecl::field_const_iterator, propagating the constness down to the FieldDecls.
llvm-svn: 60883
2008-12-11 17:59:21 +00:00
Nick Lewycky 6a344e097c Sneaky, sneaky: move the -1 to the outside of the SMax. Reinstate the
optimization of SGE/SLE with unit stride, now that it works properly.

llvm-svn: 60881
2008-12-11 17:40:14 +00:00
Misha Brukman 86242e1990 Global replace of yellow W3C "valid HTML/CSS" icons with blue ones.
llvm-svn: 60880
2008-12-11 17:34:48 +00:00
Misha Brukman 4e71ec11b0 * Fixed formatting of command descriptions to be consistent:
- descriptions on new line
  - no terminating period
* Changed the W3C logos from yellow to blue to not stand out

llvm-svn: 60879
2008-12-11 17:12:52 +00:00
Douglas Gregor 91f84216f7 Unifies the name-lookup mechanisms used in various parts of the AST
and separates lexical name lookup from qualified name lookup. In
particular:
  * Make DeclContext the central data structure for storing and
    looking up declarations within existing declarations, e.g., members
    of structs/unions/classes, enumerators in C++0x enums, members of
    C++ namespaces, and (later) members of Objective-C
    interfaces/implementations. DeclContext uses a lazily-constructed
    data structure optimized for fast lookup (array for small contexts,
    hash table for larger contexts). 

  * Implement C++ qualified name lookup in terms of lookup into
    DeclContext.

  * Implement C++ unqualified name lookup in terms of
    qualified+unqualified name lookup (since unqualified lookup is not
    purely lexical in C++!)

  * Limit the use of the chains of declarations stored in
    IdentifierInfo to those names declared lexically.

  * Eliminate CXXFieldDecl, collapsing its behavior into
    FieldDecl. (FieldDecl is now a ScopedDecl).

  * Make RecordDecl into a DeclContext and eliminates its
    Members/NumMembers fields (since one can just iterate through the
    DeclContext to get the fields).

llvm-svn: 60878
2008-12-11 16:49:14 +00:00
Torok Edwin 32bfb5de34 fix grammar, thanks Duncan!
llvm-svn: 60875
2008-12-11 11:44:49 +00:00
Mikhail Glushenkov 8d84a7d3b7 Merge Base.td and Tools.td.
This stuff is not used outside Base.td, and with the conversion of the
compilation graph to string-based format became much less (if at all)
useful.

llvm-svn: 60873
2008-12-11 10:38:06 +00:00
Torok Edwin c808012918 introduce BasicBlock::getUniquePredecessor()
llvm-svn: 60872
2008-12-11 10:36:07 +00:00
Mikhail Glushenkov e30a2820f6 Put Edge* classes into anonymous namespace.
Prevents conflicts between plugins.

llvm-svn: 60871
2008-12-11 10:34:18 +00:00
Zhongxing Xu 26776c2784 Identify AnonPointeeRegion by the symbol that is concretized.
llvm-svn: 60870
2008-12-11 09:08:46 +00:00
Mon P Wang bcdbfa854a Avoid generating a convert_rndsat node when the src and dest type are the same.
llvm-svn: 60869
2008-12-11 03:30:13 +00:00
Zhongxing Xu 02fe71290a AnonPointeeRegions are now identified by the MemRegion of the pointer pointing
to them.

llvm-svn: 60868
2008-12-11 02:27:34 +00:00
Bill Wendling 40d2476adc Clarify FIXME.
llvm-svn: 60867
2008-12-11 01:26:44 +00:00
Mon P Wang c68b3c4fc1 Whitespace clean up (tabs with spaces)
llvm-svn: 60866
2008-12-11 00:44:22 +00:00
Mon P Wang b5eb7205ea Make fix for r60829 less conservative to allow the proper optimization for
vec_extract-sse4.ll.

llvm-svn: 60865
2008-12-11 00:26:16 +00:00
Ted Kremenek 0bc1320d95 Updated checker build.
llvm-svn: 60864
2008-12-11 00:20:13 +00:00
Anders Carlsson 591b2224cb Add another complex promotion test.
llvm-svn: 60863
2008-12-10 23:57:51 +00:00
Anders Carlsson b05961c700 Make sure to promote expressions of the form (floating point + complex integer) correctly, to (complex floating point + complex floating point)
llvm-svn: 60862
2008-12-10 23:30:05 +00:00
Bill Wendling d8681df4e7 Add a newline after this debug output.
llvm-svn: 60861
2008-12-10 23:24:43 +00:00
Ted Kremenek 8e1f05fc26 PreprocessorLexer (and subclasses):
- Added virtual method 'getSourceLocation()' (no arguments) that gets the location of the next "observable" location (e.g., next character, next token).
PPLexerChange.cpp:
- Implemented FIXME by using PreprocessorLexer::getSourceLocation() to get the location in the file we are returning to after lexing a #included file.  This appears to be slightly faster than having the branch (i.e., 'if(CurLexer)').  It's also not a really hot part of the Preprocessor.

llvm-svn: 60860
2008-12-10 23:20:59 +00:00
Misha Brukman 6c2522a1cf s/A Few Coding Standards/LLVM Coding Standards/g
llvm-svn: 60859
2008-12-10 23:07:02 +00:00
Douglas Gregor 85970ca84c Added a warning when referencing an if's condition variable in the
"else" clause, e.g.,

  if (int X = foo()) {
  } else {
    if (X) { // warning: X is always zero in this context
    }
  }

Fixes rdar://6425550 and lets me think about something other than
DeclContext.

llvm-svn: 60858
2008-12-10 23:01:14 +00:00