Victor Hernandez
2981d1b93d
Minor code cleanup.
...
llvm-svn: 84919
2009-10-23 00:59:10 +00:00
Bill Wendling
6aea1a2a5a
Neuter stack protectors by only checking character arrays. This is what GCC
...
does.
llvm-svn: 84916
2009-10-23 00:01:05 +00:00
John McCall
90459c50d7
Preserve type source information when substituting into FieldDecls.
...
Just r84734 now that some fundamental work has been completed.
llvm-svn: 84914
2009-10-22 23:33:21 +00:00
John McCall
fa2d692b7d
Preserve source information for anonymous struct/union declarations.
...
llvm-svn: 84913
2009-10-22 23:31:08 +00:00
David Goodwin
02ad4cb32e
Allow the target to select the level of anti-dependence breaking that should be performed by the post-RA scheduler. The default is none.
...
llvm-svn: 84911
2009-10-22 23:19:17 +00:00
Fariborz Jahanian
ffba662dd2
Complete code gen for '.*' binary expression for
...
both scalar and aggregates.
llvm-svn: 84910
2009-10-22 22:57:31 +00:00
Fariborz Jahanian
0797404a33
Fixes a warning.
...
llvm-svn: 84909
2009-10-22 22:49:47 +00:00
John McCall
fc93cf9777
When building types from declarators, instead of building two types (one for
...
the DeclaratorInfo, one for semantic analysis), just build a single type whose
canonical type will reflect the semantic analysis (assuming the type is
well-formed, of course).
To make that work, make a few changes to the type system:
* allow the nominal pointee type of a reference type to be a (possibly sugared)
reference type. Also, preserve the original spelling of the reference type.
Both of these can be ignored on canonical reference types.
* Remove ObjCProtocolListType and preserve the associated source information on
the various ObjC TypeLocs. Preserve the spelling of protocol lists except in
the canonical form.
* Preserve some level of source type structure on parameter types, but
canonicalize on the canonical function type. This is still a WIP.
Drops code size, makes strides towards accurate source location representation,
slight (~1.7%) progression on Cocoa.h because of complexity drop.
llvm-svn: 84907
2009-10-22 22:37:11 +00:00
Ted Kremenek
2a3ffa9658
Always emit error diagnostics when an error occurs within clang_createTranslationUnit() and clang_createTranslationUnitFromSource(). These kind of errors are ones that shouldn't be missed.
...
llvm-svn: 84904
2009-10-22 22:19:00 +00:00
Ted Kremenek
b5cd6233b1
Use 'waitpid' instead of 'wait'. Basing Program::Wait() on 'wait()' prevents it being correct within a multithreaded context.
...
This address: PR 5277 (Program::Wait is unsafe to call from multiple threads).
Note: If waitpid() turns out to be non-portable, we can add more autoconf magic, or look into
another solution.
llvm-svn: 84903
2009-10-22 22:16:17 +00:00
Jeffrey Yasskin
4546d31235
Try r84890 again (adding ValueMap<>), now that I've tested the compile on
...
gcc-4.4.
llvm-svn: 84902
2009-10-22 22:11:22 +00:00
Eric Christopher
9d2acced69
size_t, not unsigned here to silence a warning.
...
llvm-svn: 84900
2009-10-22 22:06:50 +00:00
Benjamin Kramer
ab304c9237
Random include cleanup.
...
llvm-svn: 84898
2009-10-22 21:49:41 +00:00
Jeffrey Yasskin
86dfc11cdf
Fix OProfileJITEventListener after r84054 renamed CompileUnit to Scope.
...
llvm-svn: 84895
2009-10-22 20:57:35 +00:00
Bill Wendling
4f0b8d7861
Tidying up some code and comments. No functionality change.
...
llvm-svn: 84894
2009-10-22 20:48:59 +00:00
John Thompson
69b4b14f52
Disable Microsoft extensions to fix failure on Windows.
...
llvm-svn: 84893
2009-10-22 20:34:27 +00:00
Jeffrey Yasskin
66db004d7e
Revert r84890, which broke the linux build.
...
llvm-svn: 84892
2009-10-22 20:23:43 +00:00
John McCall
b692a098c6
Canonicality is a property of qualified types, not unqualified types.
...
llvm-svn: 84891
2009-10-22 20:10:53 +00:00
Jeffrey Yasskin
6b80e6e2b7
Add a ValueMap<ValueOrSubclass*, T> type. ValueMap<Value*, T> is safe to use
...
even when keys get RAUWed and deleted during its lifetime. By default the keys
act like WeakVHs, but users can pass a third template parameter to configure
how updates work and whether to do anything beyond updating the map on each
action.
It's also possible to automatically acquire a lock around ValueMap updates
triggered by RAUWs and deletes, to support the ExecutionEngine.
llvm-svn: 84890
2009-10-22 20:10:20 +00:00
Chris Lattner
c78b8f3c3a
fix #2 :)
...
llvm-svn: 84889
2009-10-22 19:56:49 +00:00
Chris Lattner
7b53668b8f
fix testcase, thanks Daniel.
...
llvm-svn: 84888
2009-10-22 19:56:26 +00:00
Devang Patel
1155fdf6dc
Hide MetadataContext implementation details.
...
llvm-svn: 84886
2009-10-22 19:36:54 +00:00
Devang Patel
6da5dbf3c2
Fix getMDs() interface such that it does not expose implementation details.
...
llvm-svn: 84885
2009-10-22 18:55:16 +00:00
Devang Patel
084679e70a
Using TrackingVH instead of WeakVH or WeakMetadataVH.
...
llvm-svn: 84884
2009-10-22 18:25:28 +00:00
Douglas Gregor
6a573fe543
When replacing a template-id expression with a declaration reference expression after overloading completes, make sure to keep the qualifier. Still not ready with that test-case...
...
llvm-svn: 84880
2009-10-22 18:02:20 +00:00
Devang Patel
09c319e269
Sort handler names to ensure deterministic behavior.
...
llvm-svn: 84878
2009-10-22 17:40:37 +00:00
Ted Kremenek
a96b72a4ca
Split clang_getCursor() into clang_getCursor() and clang_getCursorWithHint().
...
llvm-svn: 84873
2009-10-22 17:22:53 +00:00
Stuart Hastings
8de31d0e80
Trying again to tweak the top-level Makefile to facilitate an Apple-style build.
...
Now with Clang-compatibility.
llvm-svn: 84872
2009-10-22 17:22:37 +00:00
Douglas Gregor
d019ff686c
When building and instantiating a template-id reference expression, such as
...
N::f<int>
keep track of the full nested-name-specifier. This is mainly QoI and
relatively hard to test; will try to come up with a printing-based
test once we also retain the explicit template arguments past overload
resolution.
llvm-svn: 84869
2009-10-22 17:20:55 +00:00
Bob Wilson
9d763cc3f8
Revert 84843. Evan, this was breaking some of the if-conversion tests.
...
llvm-svn: 84868
2009-10-22 16:52:21 +00:00
Daniel Dunbar
cb8eb225b1
Update test; the driver can find a different gcc tool chain directory when
...
simulating running on a different system.
llvm-svn: 84862
2009-10-22 16:05:11 +00:00
Duncan Sands
f34a264c60
Include config.h in order to have HAVE_STDINT_H be defined.
...
In the latest binutils the plugin-api.h needs this - without
it the LLVM gold plugin fails to compile.
llvm-svn: 84861
2009-10-22 16:03:32 +00:00
Sebastian Redl
802f14ccde
Try to instantiate templates before doing hierarchy checks in static_cast. Fixes PR5261.
...
llvm-svn: 84860
2009-10-22 15:07:22 +00:00
Nicolas Geoffray
7e8017cce7
Verify that the function and exception table have been allocated
...
before freeing them.
llvm-svn: 84859
2009-10-22 14:35:57 +00:00
Duncan Sands
2a536740a4
Check that accessing a struct field that occurs before the start
...
of the struct (!) works correctly.
llvm-svn: 84853
2009-10-22 12:53:25 +00:00
Duncan Sands
ec0a98f033
Test handling of record fields with negative offsets.
...
llvm-svn: 84851
2009-10-22 10:02:10 +00:00
Benjamin Kramer
c77f8634e5
Shift art to the right to keep GCC from complaining about multi-line comments.
...
llvm-svn: 84849
2009-10-22 09:28:49 +00:00
Douglas Gregor
3c8a0cfa5b
When a template-id expression refers to a member function template, turn it into an (implicit) member access expression. Fixes PR5220
...
llvm-svn: 84848
2009-10-22 07:19:14 +00:00
Douglas Gregor
6493d9c27e
Refactor our handling of implicit member reference expressions to get most of the logic out of BuildDeclarationNameExpr
...
llvm-svn: 84847
2009-10-22 07:08:30 +00:00
Evan Cheng
3615b9bef3
Move if-conversion before post-regalloc scheduling so the predicated instruction get scheduled properly.
...
llvm-svn: 84843
2009-10-22 06:48:32 +00:00
Evan Cheng
943f4f41f2
Load / store multiple was missing opportunites when the load / store bundles are at the end of the bb. Test case is already in, the bug is exposed by subsequent commit.
...
llvm-svn: 84842
2009-10-22 06:47:35 +00:00
Chris Lattner
cf7e8947e9
move another load optimization from instcombine -> libanalysis.
...
llvm-svn: 84841
2009-10-22 06:44:07 +00:00
Chris Lattner
51d2f70e32
move 'loading i32 from string' optimization from instcombine
...
to libanalysis. Instcombine shrinking... does this even
make sense???
llvm-svn: 84840
2009-10-22 06:38:35 +00:00
Chris Lattner
1664a4fd86
Move some constant folding logic for loads out of instcombine into
...
Analysis/ConstantFolding.cpp. This doesn't change the behavior of
instcombine but makes other clients of ConstantFoldInstruction
able to handle loads. This was partially extracted from Eli's patch
in PR3152.
llvm-svn: 84836
2009-10-22 06:25:11 +00:00
Chris Lattner
63d2b3615c
fix PR5265: the size of a float3 should be rounded up to its alignment.
...
This ensures that arrays of float3 are correctly padded.
llvm-svn: 84833
2009-10-22 05:17:15 +00:00
Evan Cheng
5457a96b63
Trim more includes.
...
llvm-svn: 84832
2009-10-22 05:11:00 +00:00
Evan Cheng
344fcd9d61
Trim include.
...
llvm-svn: 84831
2009-10-22 05:08:49 +00:00
Chris Lattner
3e630653ad
testcase for PR4678 & rdar://7309675
...
llvm-svn: 84830
2009-10-22 04:47:09 +00:00
Mikhail Glushenkov
2300f65e8c
Forgot a declaration.
...
llvm-svn: 84828
2009-10-22 04:15:24 +00:00
Mikhail Glushenkov
3b3e9a1c27
Make 'unset_option' work on list options.
...
llvm-svn: 84827
2009-10-22 04:15:07 +00:00