Commit Graph

133085 Commits

Author SHA1 Message Date
Chad Rosier e53314f7e3 Cleanup a few magic numbers.
llvm-svn: 163263
2012-09-05 22:40:13 +00:00
Anna Zaks e5cb4981d0 [analyzer] Fix a crash PR13762.
llvm-svn: 163262
2012-09-05 22:31:58 +00:00
Anna Zaks b4b2b57ee0 [analyzer] NullOrUndef diagnostics: track symbols binded to regions.
If a region is binded to a symbolic value, we should track the symbol.

(The code I changed was not previously exercised by the regression
tests.)

llvm-svn: 163261
2012-09-05 22:31:55 +00:00
Anna Zaks 1e2a0dc405 [analyzer] Remove unneeded code.
This region is set as interesting as part of trackNullOrUndefValue call,
no need to mark it as interesting twice.

llvm-svn: 163260
2012-09-05 22:31:49 +00:00
Greg Clayton 946f890b78 <rdar://problem/12237556>
Fixed an issue where we didn't parse N_SO stab pairs where the first N_SO was a relative path.

llvm-svn: 163259
2012-09-05 22:30:51 +00:00
Roman Divacky ad06cee239 Stop casting away const qualifier needlessly.
llvm-svn: 163258
2012-09-05 22:26:57 +00:00
Chad Rosier cbd2a1983f [ms-inline asm] We only need one bit to represent the AsmDialect in the
MachineInstr.

llvm-svn: 163257
2012-09-05 22:17:43 +00:00
Roman Divacky 9338344acb Constify this properly. Found by gcc48 -Wcast-qual.
llvm-svn: 163256
2012-09-05 22:15:49 +00:00
Roman Divacky 9f33d68668 Mark checkSignature const, and in turn stop casting away const from
ArchiveMemberHeader. Found by gcc48 -Wcast-qual.

llvm-svn: 163255
2012-09-05 22:09:23 +00:00
Roman Divacky 665260222f Constify SDNodeIterator an stop its only non-const user being cast stripped
of its constness. Found by gcc48 -Wcast-qual.

llvm-svn: 163254
2012-09-05 22:03:34 +00:00
Eric Christopher 0e1adc6085 Add test missed in previous commit.
llvm-svn: 163253
2012-09-05 21:50:35 +00:00
Eric Christopher 273227b411 Try to fix the windows bots.
llvm-svn: 163252
2012-09-05 21:50:30 +00:00
Roman Divacky 77198de4d6 Constify subtarget info properly so that we dont cast away the const in
the SubtargetInfoKV tables. Found by gcc48 -Wcast-qual.

llvm-svn: 163251
2012-09-05 21:43:57 +00:00
Enrico Granata 9b034c1558 Patch for clang to include the UTF conversion routines that LLDB needs
llvm-svn: 163250
2012-09-05 21:37:27 +00:00
Eric Christopher c0f1a5e46e Apply some driver improvements for freebsd-*-mips*.
Patch by Brooks Davis.

llvm-svn: 163249
2012-09-05 21:32:44 +00:00
Greg Clayton dbc6c0bbc9 <rdar://problem/12211320>
When the vendor and OS are not specified in a triple, only let unspecified vendor and OS fields matchs for the current host platform.

llvm-svn: 163248
2012-09-05 21:19:23 +00:00
Roman Divacky 6792380e7b Use const properly so that we dont remove const qualifier from region and MII
by casting. Found with gcc48.

llvm-svn: 163247
2012-09-05 21:17:34 +00:00
Jim Ingham e7e6ffc600 Turn on the "fancy inlined stepping."
llvm-svn: 163246
2012-09-05 21:14:28 +00:00
Jim Ingham cb95f34818 If the ThreadList ShouldStop restarts the target, don't resume it again.
llvm-svn: 163245
2012-09-05 21:13:56 +00:00
Jim Ingham bad39e47cd Move calculating the CurrentInlinedDepth to AFTER the synchronous breakpoint callback gets a chance to run.
If the stopped event comes in with the Restarted bit set, don't try to hand that to the plans, but just return ShouldStop = false.  There's nothing useful the plans can do, since the target is already running.

llvm-svn: 163244
2012-09-05 21:12:49 +00:00
Chad Rosier 994f4040f5 [ms-inline asm] Propagate the asm dialect into the MachineInstr representation.
llvm-svn: 163243
2012-09-05 21:00:58 +00:00
Jan Wen Voung 5020dd35e5 Fix a bug.
llvm-svn: 163242
2012-09-05 20:56:00 +00:00
Jan Wen Voung 05ff570139 revert the additional stuff.
llvm-svn: 163241
2012-09-05 20:55:57 +00:00
Jan Wen Voung 52ad208146 Clean up llvm-bcanalyzer to print to consistent streams.
Avoid interleaving fprintf(stderr,...) and outs() << ...;

Also add a column to show "bytes-per" for each record.

llvm-svn: 163240
2012-09-05 20:55:54 +00:00
Enrico Granata d4439aa9ed Implementing an Options class for EvaluateExpression() in order to make the signature more compact and make it easy to 'just run an expression'
llvm-svn: 163239
2012-09-05 20:41:26 +00:00
Tobias Grosser d0855e180d [cindex.py] Make the use of a compatibilty check explicit
At the moment, we implictly check compatibility between the python
bindings and libclang, as the python bindings will fail to load in
case a method we use in libclang is not available.

This patch makes the use of this compatibility check explicit and introduces a
flag to optionally disable the check. This will allow us to further harden the
compatibility check, but it also gives the user the possibility to disable the
compatibility check to evaluate compatibility with older libclang versions.

I added documentation that makes clear the python bindings are only tested
with the libclang version they have been shipped with.

llvm-svn: 163238
2012-09-05 20:23:53 +00:00
DeLesley Hutchins 93b1b031c1 Thread-safety analysis: bugfix for case where a trylock occurs in an
expression involving temporaries.

llvm-svn: 163237
2012-09-05 20:01:16 +00:00
Fariborz Jahanian 63b1bc70ee objective-c++11: c++11 does not change pod-ness when
type is an unqualified objc pointer in arc. Treat it just
as being treated in c++98. This fixes a bogus vararg warning
with -std=c++11. //rdar://12229679

llvm-svn: 163236
2012-09-05 19:51:20 +00:00
Michael J. Spencer 00b0d38094 [Docs] Fix Sphinx incremental build. Patch by Sean Silva!
llvm-svn: 163235
2012-09-05 19:44:47 +00:00
Hal Finkel efe4a44106 Move the PPC TOC defs into the PPC64 InstrInfo file.
Since TOC is just defined for PPC64, move its definition to PPC64 td file.

Patch by Adhemerval Zanella.

llvm-svn: 163234
2012-09-05 19:22:27 +00:00
Chad Rosier f65f65f1e4 Clean up.
llvm-svn: 163233
2012-09-05 19:16:22 +00:00
Chad Rosier 7cf5a44836 Update for r163231.
llvm-svn: 163232
2012-09-05 19:01:07 +00:00
Chad Rosier d8c7610781 [ms-inline asm] Enumerate the InlineAsm dialects and rename the nsdialect to
inteldialect.

llvm-svn: 163231
2012-09-05 19:00:49 +00:00
Tim Northover c8d867d42d Strip old MachineInstrs *after* we know we can put them back.
Previous patch accidentally decided it couldn't convert a VFP to a
NEON instruction after it had already destroyed the old one. Not a
good move.

llvm-svn: 163230
2012-09-05 18:37:53 +00:00
Benjamin Kramer 100b59c0a0 Clean up includes.
llvm-svn: 163229
2012-09-05 18:19:08 +00:00
Jim Grosbach 5d3913f189 Update CMakeList.txt for new lli sources.
llvm-svn: 163228
2012-09-05 18:15:08 +00:00
Peter Collingbourne 7b0ad09cc3 Add barrier.cl to SOURCES, spotted by Jin Wang.
llvm-svn: 163227
2012-09-05 18:13:55 +00:00
Abramo Bagnara 6e861b8689 Added missing test.
llvm-svn: 163226
2012-09-05 18:06:49 +00:00
Roman Divacky 09c8a3dde5 Remove unused typedefs gcc4.8 warns about.
llvm-svn: 163225
2012-09-05 17:55:46 +00:00
Fariborz Jahanian aaf376b4dd c error recovery. treat an invalid redeclaration
of a c-function for what it is. Otherwise, this func
is treated as an overloadable c-function resulting in
a crash much later. // rdar://11743706

llvm-svn: 163224
2012-09-05 17:52:12 +00:00
Jordan Rose 6d92188ff7 [analyzer] Fix bad test from r163220.
Add a FIXME to the test while I track down the real problem.

llvm-svn: 163222
2012-09-05 17:34:50 +00:00
Abramo Bagnara 73bf7f5b5b Allow disabling of wchar_t type.
llvm-svn: 163221
2012-09-05 17:30:57 +00:00
Jordan Rose fcdda36149 [analyzer] Be more forgiving about calling methods on struct rvalues.
The problem is that the value of 'this' in a C++ member function call
should always be a region (or NULL). However, if the object is an rvalue,
it has no associated region (only a conjured symbol or LazyCompoundVal).
For now, we handle this in two ways:

1) Actually respect MaterializeTemporaryExpr. Before, it was relying on
   CXXConstructExpr to create temporary regions for all struct values.
   Now it just does the right thing: if the value is not in a temporary
   region, create one.

2) Have CallEvent recognize the case where its 'this' pointer is a
   non-region, and just return UnknownVal to keep from confusing clients.

The long-term problem is being tracked internally in <rdar://problem/12137950>,
but this makes many test cases pass.

llvm-svn: 163220
2012-09-05 17:11:26 +00:00
Jordan Rose d1a08b6e43 [analyzer] Clean up a couple uses of getPointeeType().
No intended functionality change.

llvm-svn: 163219
2012-09-05 17:11:22 +00:00
Jordan Rose bc009d4493 Revert "[analyzer] Treat all struct values as regions (even rvalues)."
This turned out to have many implications, but what eventually seemed to
make it unworkable was the fact that we can get struct values (as
LazyCompoundVals) from other places besides return-by-value function calls;
that is, we weren't actually able to "treat all struct values as regions"
consistently across the entire analyzer core.

Hopefully we'll be able to come up with an alternate solution soon.

This reverts r163066 / 02df4f0aef142f00d4637cd851e54da2a123ca8e.

llvm-svn: 163218
2012-09-05 17:11:15 +00:00
Jim Grosbach dc1123fcab MCJIT: getPointerToFunction() references target address space.
Make sure to return a pointer into the target memory, not the local memory.
Often they are the same, but we can't assume that.

llvm-svn: 163217
2012-09-05 16:50:40 +00:00
Jim Grosbach 0f435d0851 MCJIT: Add faux remote target execution to lli for the MCJIT.
Simulate a remote target address space by allocating a seperate chunk of
memory for the target and re-mapping section addresses to that prior to
execution. Later we'll want to have a truly remote process, but for now
this gets us closer to being able to test the remote target
functionality outside LLDB.

rdar://12157052

llvm-svn: 163216
2012-09-05 16:50:34 +00:00
Benjamin Kramer 6c2649ca4e Switch BasicAliasAnalysis' cache to SmallDenseMap.
It relies on clear() being fast and the cache rarely has more than 1 or 2
elements, so give it an inline capacity and always shrink it back down in case
it grows. DenseMap will grow to 64 buckets which makes clear() a lot slower.

llvm-svn: 163215
2012-09-05 16:49:37 +00:00
Pranav Bhandarkar 823f9ebaa3 LLVM Bug Fix 13709: Remove needless lsr(Rp, #32) instruction access the
subreg_hireg of register pair Rp.

	* lib/Target/Hexagon/HexagonPeephole.cpp(PeepholeDoubleRegsMap): New
	 DenseMap similar to PeepholeMap that additionally records subreg info
	 too.
        (runOnMachineFunction): Record information in PeepholeDoubleRegsMap
        and copy propagate the high sub-reg of Rp0 in Rp1 = lsr(Rp0, #32) to
	the instruction Rx = COPY Rp1:logreg_subreg.
	* test/CodeGen/Hexagon/remove_lsr.ll: New test.
	

llvm-svn: 163214
2012-09-05 16:01:40 +00:00
Alexey Samsonov f6d2125829 [Sanitizer] implement readlink as syscall on Linux
llvm-svn: 163213
2012-09-05 14:48:24 +00:00