Commit Graph

50367 Commits

Author SHA1 Message Date
Ted Kremenek 5b75170014 Fix comment.
llvm-svn: 59673
2008-11-19 22:55:55 +00:00
Ted Kremenek 2861cf42fe Use PreprocessorLexer::getFileID() instead of Lexer::getFileLoc(). This is an intermediate step to having getCurrentLexer() return a PreprocessorLexer* instead of a Lexer*.
llvm-svn: 59672
2008-11-19 22:55:25 +00:00
Ted Kremenek a2c3c8d71c Move more cases of using 'CurLexer' to 'CurPPLexer'.
Use PTHLexer::isNextPPTokenLParen() when using the PTHLexer.

llvm-svn: 59671
2008-11-19 22:43:49 +00:00
Ted Kremenek 11cfbb473e Add stub for PTHLexer::isNextPPTokenLParen().
llvm-svn: 59670
2008-11-19 22:42:26 +00:00
Ted Kremenek c9a67fa201 Add version of 'getFileCharacteristic()' for FileIDs.
llvm-svn: 59669
2008-11-19 22:41:46 +00:00
Ted Kremenek 76c3441a4e When using a PTHLexer, use DiscardToEndOfLine() instead of ReadToEndOfLine().
llvm-svn: 59668
2008-11-19 22:21:33 +00:00
Dan Gohman f4d95fdce9 Move the code for printing a graph node label for an SUnit into
a virtual method of SelectionDAG.

llvm-svn: 59667
2008-11-19 22:09:45 +00:00
Ted Kremenek 45245217bc - Move static function IsNonPragmaNonMacroLexer into Preprocessor.h.
- Add variants of IsNonPragmaNonMacroLexer to accept an IncludeMacroStack entry
  (simplifies some uses).
- Use IsNonPragmaNonMacroLexer in Preprocessor::LookupFile.
- Add 'FileID' to PreprocessorLexer, and have Preprocessor query this fileid
  when looking up the FileEntry for a file

Performance testing of -Eonly on Cocoa.h shows no performance regression because
of this patch.

llvm-svn: 59666
2008-11-19 21:57:25 +00:00
Dan Gohman 78fb6214f3 Convert SUnit's dump method into a print method and implement
dump in terms of it.

llvm-svn: 59665
2008-11-19 21:32:03 +00:00
Steve Naroff dbfc693f47 Fix <rdar://problem/6291588> assertion failure: SourceManager.h line 489.
llvm-svn: 59664
2008-11-19 21:15:47 +00:00
Douglas Gregor 91cea0ad1e Support for calling overloaded function call operators (operator())
with function call syntax, e.g.,

  Functor f;
  f(x, y);

This is the easy part of handling calls to objects of class type 
(C++ [over.call.object]). The hard part (coping with conversions from
f to function pointer or reference types) will come later. Nobody uses
that stuff anyway, right? :)

llvm-svn: 59663
2008-11-19 21:05:33 +00:00
Oscar Fuentes 4fb443f81b CMake: Removed source file.
llvm-svn: 59662
2008-11-19 19:32:19 +00:00
Douglas Gregor 7911b3711d Some tweaks suggested by Argiris
llvm-svn: 59661
2008-11-19 19:09:45 +00:00
Daniel Dunbar bc47ed8e74 Ignore Output directories when searching for tests.
llvm-svn: 59660
2008-11-19 19:06:57 +00:00
Devang Patel 79303b2572 Do not use separate utility to walk all instructions and remove dead dbg intrinsics. Let instcombiner do this job.
llvm-svn: 59659
2008-11-19 19:01:37 +00:00
Devang Patel 827bced2b1 Let instcombiner remove redundant dbg intrinsics.
llvm-svn: 59658
2008-11-19 18:59:41 +00:00
Devang Patel 7ed6c5317c If there are two consecutive llvm.dbg.stoppoint calls then
it is likely that the optimizer deleted code in between these
two intrinsics. Keep only the last llvm.dbg.stoppoint in this case.

llvm-svn: 59657
2008-11-19 18:56:50 +00:00
Oscar Fuentes 77543d9af0 CMake: Added some source files.
Patch contributed by Jay Foad!

llvm-svn: 59656
2008-11-19 18:46:39 +00:00
Oscar Fuentes 7455d45ba2 CMake: Removed source file from lib/Target/PIC16/CMakeLists.txt.
llvm-svn: 59655
2008-11-19 18:42:25 +00:00
Fariborz Jahanian a598b5286e More of objective-c's gc code-gen. Treat objective-c
objects as __strong when attribute unspecified.

llvm-svn: 59654
2008-11-19 18:38:10 +00:00
Argyrios Kyrtzidis 554689a3aa Make DeclContext::getLexicalParent reuse DeclContext::getParent.
llvm-svn: 59651
2008-11-19 18:07:24 +00:00
Argyrios Kyrtzidis 0d09c4944e Take care another assert:
struct A {
  struct B;
};

struct A::B {
  void m() {} // Assertion failed: getContainingDC(DC) == CurContext && "The next DeclContext should be lexically contained in the current one."
};

Introduce DeclContext::getLexicalParent which may be different from DeclContext::getParent when nested-names are involved, e.g:

   namespace A {
      struct S;
   }
   struct A::S {}; // getParent() == namespace 'A'
                   // getLexicalParent() == translation unit

llvm-svn: 59650
2008-11-19 18:01:13 +00:00
Scott Michel ef5e6934cb CellSPU: Do not custom lower i1 stores, rely on type legalization to do the
right thing and promote the store to i8.

llvm-svn: 59648
2008-11-19 17:45:08 +00:00
Nuno Lopes 0e33c688d5 fix folding of '*doubleArray'
llvm-svn: 59647
2008-11-19 17:44:31 +00:00
Argyrios Kyrtzidis 7768a30c37 Make the non-const DeclContext::getParent call the const version, instead of the other way around.
llvm-svn: 59646
2008-11-19 17:36:39 +00:00
Fariborz Jahanian 50a1270d87 Few more changes due to Daniel's feedback.
llvm-svn: 59645
2008-11-19 17:34:06 +00:00
Stuart Hastings 0daa1b4a94 <rdar://problem/6351057>
Discourage (allocate last) use of x86_64 R12 and R13 due to their
longer instruction encodings.

llvm-svn: 59644
2008-11-19 17:19:35 +00:00
Douglas Gregor 40412acc02 Support overloading of the subscript operator[], including support for
built-in operator candidates. Test overloading of '&' and ','.

In C++, a comma expression is an lvalue if its right-hand
subexpression is an lvalue. Update Expr::isLvalue accordingly.

llvm-svn: 59643
2008-11-19 17:17:41 +00:00
Andrew Lenharth 0f09564ffc ignore the -m elf_i386 directive used in the linux kernel
llvm-svn: 59642
2008-11-19 17:00:08 +00:00
Dan Gohman 7f480e04eb Revert r59640. It broke this test for builds that aren't
configured with llvm-gcc.

llvm-svn: 59641
2008-11-19 16:24:37 +00:00
Dan Gohman f09aabfe70 Use %llvmgcc -xassembler instead of invoking as directly. This avoids
problems for example when LLVM is built with --with-extra-options=-m64
and as defaults to x86-32 mode.

llvm-svn: 59640
2008-11-19 16:02:14 +00:00
Steve Naroff 9e4ac111f0 Fix <rdar://problem/6150376> [sema] crash on invalid message send.
The core fix in Sema::ActOnClassMessage(). All the other changes have to do with passing down the SourceLocation for the receiver (to properly position the cursor when producing an error diagnostic).

llvm-svn: 59639
2008-11-19 15:54:23 +00:00
Douglas Gregor d08452f60a Added operator overloading for unary operators, post-increment, and
post-decrement, including support for generating all of the built-in
operator candidates for these operators. 

C++ and C have different rules for the arguments to the builtin unary
'+' and '-'. Implemented both variants in Sema::ActOnUnaryOp.

In C++, pre-increment and pre-decrement return lvalues. Update
Expr::isLvalue accordingly.

llvm-svn: 59638
2008-11-19 15:42:04 +00:00
Scott Michel 3462c8ecda Temporary check-in for Duncan to demonstrate CellSPU store problem.
llvm-svn: 59637
2008-11-19 15:24:16 +00:00
Argyrios Kyrtzidis 89709ac2cc Fix this:
With this snippet:
  void f(a::b);

An assert is hit:
Assertion failed: CachedTokens[CachedLexPos-1].getLocation() == Tok.getAnnotationEndLoc() && "The annotation should be until the most recent cached token", file ..\..\lib\Lex\PPCaching.cpp, line 98

Introduce Preprocessor::RevertCachedTokens that reverts a specific number of tokens when backtracking is enabled.

llvm-svn: 59636
2008-11-19 15:22:16 +00:00
Argyrios Kyrtzidis f5e2812e69 Remove Preprocessor::CacheTokens boolean data member. The same functionality can be provided by using Preprocessor::isBacktrackEnabled().
llvm-svn: 59631
2008-11-19 14:23:14 +00:00
Argyrios Kyrtzidis 4172d641d1 Fix compilation error on MSVC.
llvm-svn: 59629
2008-11-19 12:56:21 +00:00
Sanjiv Gupta 7e8bf3422f Forgot to add this in the previous commit.
llvm-svn: 59623
2008-11-19 12:12:49 +00:00
Daniel Dunbar 7689f6be47 Add spec ref to comment.
llvm-svn: 59622
2008-11-19 11:54:05 +00:00
Sanjiv Gupta 5c63cf8bfd Fixed build warnings.
llvm-svn: 59621
2008-11-19 11:27:59 +00:00
Zhongxing Xu 16a92afc4b Add test for path-sensitive uninit-val detection involving struct field.
llvm-svn: 59620
2008-11-19 11:10:42 +00:00
Zhongxing Xu e5816f213d Add support for symbolicating global structs and arrays in RegionStoreManager::getInitialStore().
llvm-svn: 59619
2008-11-19 11:06:24 +00:00
Zhongxing Xu b8e54884c8 Add SymbolData for array elements and struct fields.
llvm-svn: 59618
2008-11-19 11:03:17 +00:00
Sanjiv Gupta 2ae21ee517 Added a more function PIC16 backend. However to get this working a patch in
ExpandIntegerOperand (LegalizeIntegerTypes.cpp) is needed which is yet to be reworked and submitted. 

llvm-svn: 59617
2008-11-19 11:00:54 +00:00
Daniel Dunbar af7efa695c Fix silly code, use IdentifierInfo* instead of std::string in
PragmaPackStack. Thanks Chris!

llvm-svn: 59616
2008-11-19 10:32:38 +00:00
Daniel Dunbar 9b1335eca8 Fix redundant load of bit-fields on assignment (to get the updated
value).
 - Use extra argument to EmitStoreThroughLValue to provide place to
   write update bit-field value if caller requires it.
 - This fixes several FIXMEs.

llvm-svn: 59615
2008-11-19 09:36:46 +00:00
Bill Wendling fd2c607026 Use stripPointerCasts when checking for AllocaInsts for the stackprotector intrinsic.
llvm-svn: 59614
2008-11-19 09:17:16 +00:00
Sanjiv Gupta f99d54498a Pointer width for PIC16 is 16 bits. Modify getMemCpy, getMemMove and getMemSet accordingly.
llvm-svn: 59613
2008-11-19 09:02:07 +00:00
Sanjiv Gupta 839679afda Int type for PIC16 is i16. Added i16 intrinsics for memmove, memcpy and memset.
llvm-svn: 59612
2008-11-19 08:50:17 +00:00
Chris Lattner e503373e67 fix save-o
llvm-svn: 59611
2008-11-19 08:26:36 +00:00