Commit Graph

49468 Commits

Author SHA1 Message Date
Steve Naroff c989a7b6c0 Fix <rdar://problem/6339636> clang ObjC rewriter: Assertion failed: FileID-1 < FileIDs.size() && "Invalid FileID!", file c:\cygwin\home\Administrator\llvm\tools\clang\include\clang/Basic/SourceManager.h, line 513
llvm-svn: 58654
2008-11-03 23:29:32 +00:00
Devang Patel d26344d252 Fix unused variable warnings.
llvm-svn: 58653
2008-11-03 23:20:04 +00:00
Ted Kremenek 14f18653f6 Hook up the Plist diagnostic client to the driver.
Fix Plist output.

llvm-svn: 58652
2008-11-03 23:18:07 +00:00
Devang Patel f33f8a8606 Fix unused variable warnings.
llvm-svn: 58651
2008-11-03 23:14:09 +00:00
Dan Gohman d5104a5de6 Add C bindings for extractvalue and insertvalue. Patch by Frits van Bommel!
llvm-svn: 58650
2008-11-03 22:55:43 +00:00
Douglas Gregor fa7431a807 Check that this cannot be used in a default argument. Happily, it was already implemented
llvm-svn: 58649
2008-11-03 22:47:57 +00:00
Ted Kremenek 0cbd963817 Add path diagnostics client for emitting path reports using Plists.
llvm-svn: 58647
2008-11-03 22:33:57 +00:00
Ted Kremenek e868c00d5a Rename 'HTMLDiagnostics.h' to 'PathDiagnosticClients.h'
llvm-svn: 58646
2008-11-03 22:31:48 +00:00
Evan Cheng f60e5aaaac Remove a dead switch statement.
llvm-svn: 58644
2008-11-03 21:26:52 +00:00
Evan Cheng 3620e685b5 Minor code restructuring. No functionality change.
llvm-svn: 58643
2008-11-03 21:02:39 +00:00
Dale Johannesen 08535d2507 Fix some ppcf128 regressions: make ExpandFloatRes_LOAD
work correctly, and bring over a late change to ppcf128
SetCC handling.

llvm-svn: 58642
2008-11-03 20:47:45 +00:00
Douglas Gregor c28b57d703 Implicit support for direct initialization of objects of class type, e.g.,
X x(5, 7);

llvm-svn: 58641
2008-11-03 20:45:27 +00:00
Duncan Sands 6692dec2a0 Make VAARG promotion work correctly with large funky
sized integers like i129, and also reduce the number
of assumptions made about how vaarg is implemented.
This still doesn't work correctly for small integers
like (eg) i1 on x86, since x86 passes each of them
(essentially an i8) in a 4 byte stack slot, so the
pointer needs to be advanced by 4 bytes not by 1 byte
as now.  But this is no longer a LegalizeTypes problem
(it was also wrong in LT before): it is a bug in the
operation expansion in LegalizeDAG: now LegalizeTypes
turns an i1 vaarg into an i8 vaarg which would work
fine if only the i8 vaarg was turned into correct code
later.

llvm-svn: 58635
2008-11-03 20:22:12 +00:00
Daniel Dunbar 925dc26d51 Clarify performance experiments description based on feedback from
Eric C, thanks!

llvm-svn: 58634
2008-11-03 20:03:58 +00:00
Dan Gohman bde853911f Overload AddInteger on int/long/long long instead of on int/int64_t,
to avoid overload ambiguities. This fixes build errors introduced
by r58623.

llvm-svn: 58632
2008-11-03 19:40:18 +00:00
Devang Patel fe57d109b6 Ignore conditions that are outside the loop.
llvm-svn: 58631
2008-11-03 19:38:07 +00:00
Andrew Lenharth 348f3fa6a7 add a period at the end of the comment, ignoring the fact that the comment would be hard pressed to be considered a sentence, but if it makes Bill happy...
llvm-svn: 58630
2008-11-03 19:29:29 +00:00
Douglas Gregor 2fe9883a96 Standard conversion sequences now have a CopyConstructor field, to
cope with the case where a user-defined conversion is actually a copy
construction, and therefore can be compared against other standard
conversion sequences. While I called this a hack before, now I'm
convinced that it's the right way to go.

Compare overloads based on derived-to-base conversions that invoke
copy constructors. 

Suppress user-defined conversions when attempting to call a
user-defined conversion.

llvm-svn: 58629
2008-11-03 19:09:14 +00:00
Jim Grosbach 4d0549e3be Add binary encoding support for multiply instructions. Some blanks left to fill in, but the basics are there.
llvm-svn: 58626
2008-11-03 18:38:31 +00:00
Devang Patel c1631db93b Turn floating point IVs into integer IVs where possible.
This allows SCEV users to effectively calculate trip count.
LSR later on transforms back integer IVs to floating point IVs
later on to avoid int-to-float casts inside the loop.

llvm-svn: 58625
2008-11-03 18:32:19 +00:00
Dan Gohman ac41d9f5d8 Refactor various TargetAsmInfo subclasses' TargetMachine members away
adding a TargetMachine member to the base TargetAsmInfo class instead.

llvm-svn: 58624
2008-11-03 18:22:42 +00:00
Dan Gohman d7546abb8a Change how extended types are represented in MVTs. Instead of fiddling
bits, use a union of a SimpleValueType enum and a regular Type*.

This increases the size of MVT on 64-bit hosts from 32 bits to 64 bits.
In most cases, this doesn't add significant overhead. There are places
in codegen that use arrays of MVTs, so these are now larger, but
they're small in common cases.

This eliminates restrictions on the size of integer types and vector
types that can be represented in codegen. As the included testcase
demonstrates, it's now possible to codegen very large add operations.
There are still some complications with using very large types. PR2880
is still open so they can't be used as return values on normal targets,
there are no libcalls defined for very large integers so operations
like multiply and divide aren't supported.

This also introduces a minimal tablgen Type library, capable of
handling IntegerType and VectorType. This will allow parts of
TableGen that don't depend on using SimpleValueType values to handle
arbitrary integer and vector types.

llvm-svn: 58623
2008-11-03 17:56:27 +00:00
Douglas Gregor 0537942f3c Add implicitly-declared default and copy constructors to C++ classes,
when appropriate.

Conversions for class types now make use of copy constructors. I've
replaced the egregious hack allowing class-to-class conversions with a
slightly less egregious hack calling these conversions standard
conversions (for overloading reasons).

llvm-svn: 58622
2008-11-03 17:51:48 +00:00
Daniel Dunbar d395a1722d Comment fix.
llvm-svn: 58621
2008-11-03 17:33:36 +00:00
Dan Gohman f9e7f69141 Remove redundant inline keywords from functions defined within
class definitions.

llvm-svn: 58620
2008-11-03 17:10:24 +00:00
Andrew Lenharth 45b86322f2 Ensure that we are checking only calls to the function we are interested in specializing
llvm-svn: 58615
2008-11-03 16:05:35 +00:00
Douglas Gregor ab13857072 Eliminate header dependency ASTContext -> TargetInfo
llvm-svn: 58613
2008-11-03 15:57:00 +00:00
Douglas Gregor 66583c5ff3 Implement C++ DR 106 and C++ DR 540, both of which deal with
reference-collapsing. 

Implement diagnostic for formation of a reference to cv void.

Drop cv-qualifiers added to a reference type when the reference type
comes from a typedef.

llvm-svn: 58612
2008-11-03 15:51:28 +00:00
Anton Korobeynikov fb2f87bbfe Testcase for recent llvm-gcc fix
llvm-svn: 58611
2008-11-03 14:43:31 +00:00
Douglas Gregor 8af6e6d415 Connect ASTContext to TargetInfo when determining the size_t, ptrdiff_t, and wchar_t types. Fixes recent breakage on Linux.
llvm-svn: 58609
2008-11-03 14:12:49 +00:00
Duncan Sands 0207a3f897 Make VAARG work with x86 long double (which is
10 bytes long, but is passed in 12/16 bytes).

llvm-svn: 58608
2008-11-03 11:51:11 +00:00
Steve Naroff 3e7ced125b Fix <rdar://problem/6336774> clang block rewriter: Assertion failed: Offset+NumBytes <= size() && "Invalid region to erase!", file c:\cygwin\home\Administrator\llvm\to ols\clang\include\clang/Rewrite/RewriteRope.h, line 219.
llvm-svn: 58607
2008-11-03 11:20:24 +00:00
Matthijs Kooijman 2530f5fe43 Make MachineFrameInfo::print not crash when no TargetFrameInfo is available.
llvm-svn: 58606
2008-11-03 11:16:43 +00:00
Chris Lattner 8cc7be369c Fix PR3001: if we have an error parsing an initializer, make sure to remove
the designator corresponding to it, otherwise Sema and later parsing will
get confused.

llvm-svn: 58603
2008-11-03 09:28:22 +00:00
Chris Lattner 7d7fff2303 privatize some methods.
llvm-svn: 58602
2008-11-03 09:11:11 +00:00
Ted Kremenek 3a5d515a82 Simplify the functions HtmlEsape and ShellEscape. We now properly print out the following command line in the HTML output: scan-build gcc -x c /dev/null -c -Dfoo='"string abc"'
Fixes <rdar://problem/6338651>

llvm-svn: 58600
2008-11-03 07:44:16 +00:00
Evan Cheng 3a9aead4d4 Silence a compiler warning.
llvm-svn: 58598
2008-11-03 07:14:02 +00:00
Zhongxing Xu c8c71979a6 Add some notes for SCA.
llvm-svn: 58597
2008-11-03 06:04:23 +00:00
Zhongxing Xu 8ea09cc542 Fix 80-col violations.
llvm-svn: 58596
2008-11-03 05:18:34 +00:00
Zhongxing Xu 2d330ef8fa - Remove AnonTypedRegion, which is not to be used.
- Prepare AnonPointeeRegioin for later use.

llvm-svn: 58595
2008-11-03 04:12:24 +00:00
Nick Lewycky 7874fe900a Typo
llvm-svn: 58594
2008-11-03 03:50:40 +00:00
Nick Lewycky d73806a9cc Replace explicit loop with utility function.
llvm-svn: 58593
2008-11-03 03:49:14 +00:00
Nick Lewycky 7b14e20a5e Don't crash analyzing certain quadratics (addrec of {X,+,Y,+,1}).
We're still waiting on code that actually analyzes them properly.

llvm-svn: 58592
2008-11-03 02:43:49 +00:00
Owen Anderson b067843863 Revert my last patch until I consult with Evan about it.
llvm-svn: 58591
2008-11-03 02:33:28 +00:00
Sebastian Redl 1384553cbe Source ranges for named cast diagnostics.
llvm-svn: 58570
2008-11-02 22:21:33 +00:00
Nick Lewycky 3c6d34a7f0 Changes from Duncan's review:
* merge two weak functions by making them both alias a third non-weak fn
 * don't reimplement CallSite::hasArgument
 * whitelist the safe linkage types

llvm-svn: 58568
2008-11-02 16:46:26 +00:00
Anton Korobeynikov c11b47911d Testcase for PR2691
llvm-svn: 58567
2008-11-02 16:46:17 +00:00
Cedric Venet 1bb549685b Add header files to CMake build solution. It use globing so it doesn't need to be manually maintained, but it won't automatically detect a new header. I think this is a good compromise for the header files, since there presence in the solution is just an help for the user. Moreover, a new header is often introduced with a new cpp source file which need a makefile change, which will regenerate the solution and detect the new header.
llvm-svn: 58566
2008-11-02 16:28:53 +00:00
Zhongxing Xu de297f8198 Add function side-effect test cast.
llvm-svn: 58565
2008-11-02 13:17:44 +00:00
Zhongxing Xu 2e8e604704 1. When a pointer to struct is used as an argument, GRSimpleVals::EvalCall()
sets the whole struct to Unknown. Then we cannot assume the V passed to
   BindStruct() is always a CompoundVal. When it is an UnknownVal, we call
   BindStructToVal(UnknownVal).

2. Change the signature of InitializeStructToUndefined() to BindStructToVal()
   to reuse the code.

llvm-svn: 58564
2008-11-02 12:13:30 +00:00