Eric Christopher
c509ff6944
Fix typos.
...
llvm-svn: 126018
2011-02-19 03:19:09 +00:00
John McCall
68cc3350a8
Fix a -Wuninitialized warning; it's actually a false positive,
...
but it's not reasonable for the diagnostic to figure that out.
Pointed out by Benjamin Kramer.
Also clarify the logic here.
llvm-svn: 126017
2011-02-19 03:13:26 +00:00
John McCall
8377967543
Warn about code that uses variables and functions with internal linkage
...
without defining them. This should be an error, but I'm paranoid about
"uses" that end up not actually requiring a definition. I'll revisit later.
Also, teach IR generation to not set internal linkage on variable
declarations, just for safety's sake. Doing so produces an invalid module
if the variable is not ultimately defined.
Also, fix several places in the test suite where we were using internal
functions without definitions.
llvm-svn: 126016
2011-02-19 02:53:41 +00:00
Jim Ingham
85e8b81492
- Changed all the places where CommandObjectReturn was exporting a StreamString to just exporting
...
a Stream, and then added GetOutputData & GetErrorData to get the accumulated data.
- Added a StreamTee that will tee output to two provided lldb::StreamSP's.
- Made the CommandObjectReturn use this so you can Tee the results immediately to
the debuggers output file, as well as saving up the results to return when the command
is done executing.
- HandleCommands now uses this so that if you have a set of commands that continue the target
you will see the commands come out as they are processed.
- The Driver now uses this to output the command results as you go, which makes the interface
more reactive seeming.
llvm-svn: 126015
2011-02-19 02:53:09 +00:00
Argyrios Kyrtzidis
21f347e729
[analyzer] Fix crash when analyzing C++ code.
...
llvm-svn: 126013
2011-02-19 01:59:41 +00:00
Ted Kremenek
fda3687515
Add 'StoreRef' smart pointer to allow more fine-grain memory lifetime control of Store objects.
...
This yields a minor memory reduction (for larger functions) on Sqlite at the cost of slightly
higher memory usage on some functions because of the increased size of GRState (which can be optimized).
I expect the real memory savings from this enhancement will come when we aggressively
canabilize more of the ExplodedGraph.
llvm-svn: 126012
2011-02-19 01:59:33 +00:00
Ted Kremenek
f66e5b695f
Add ImmutableMap methods 'manualRetain()', 'manualRelease()', and 'getRootWithoutRetain()' to help more aggressively reclaim memory in the static analyzer.
...
llvm-svn: 126011
2011-02-19 01:59:21 +00:00
Johnny Chen
ce0dec7597
Make the helper method ReadCoreReg(uint32_t reg, bool *success) more generic
...
which now handles R0-R12, SP, LR, as well as PC. And refactored a lot of
calls to ReadRegisterUnsigned() to now funnel through ReadCoreReg(), instead.
llvm-svn: 126010
2011-02-19 01:36:13 +00:00
Devang Patel
5f1b4cdda1
Do not emit empty DW_TAG_lexical_block DIEs. In one test case, size of debug info reduced by almost 7%.
...
llvm-svn: 126009
2011-02-19 01:31:27 +00:00
Devang Patel
5d12337655
DIE numbers do not add any value in this test.
...
llvm-svn: 126008
2011-02-19 01:28:37 +00:00
Argyrios Kyrtzidis
e34245b30b
[analyzer] Fix crash when analyzing C++ code.
...
llvm-svn: 126007
2011-02-19 01:08:41 +00:00
Argyrios Kyrtzidis
1227f3afca
[analyzer] Disable a test until inlining CXXConstructExprs is fully investigated.
...
llvm-svn: 126006
2011-02-19 01:08:37 +00:00
Jakob Stoklund Olesen
f1a60a61ba
Give SplitAnalysis a VRM member to access VirtRegMap::getOriginal().
...
llvm-svn: 126005
2011-02-19 00:53:42 +00:00
Joerg Sonnenberger
740467a245
Avoid dangling else warnings.
...
llvm-svn: 126004
2011-02-19 00:43:45 +00:00
Jakob Stoklund Olesen
04aff708fd
Missed member rename for naming convention.
...
llvm-svn: 126003
2011-02-19 00:42:33 +00:00
Jakob Stoklund Olesen
13eb3650b0
This method belonged in VirtRegMap.
...
llvm-svn: 126002
2011-02-19 00:38:43 +00:00
Jakob Stoklund Olesen
609bc44c2e
Separate timers for local and global splitting.
...
llvm-svn: 126001
2011-02-19 00:38:40 +00:00
Mikhail Glushenkov
82e559837a
Make "-opt [-emit-llvm]" work for .ll files.
...
Patch by Kaelyn Uhrain!
llvm-svn: 126000
2011-02-19 00:33:27 +00:00
Chandler Carruth
4c4f8de421
Improve bool and char integral template argument printing in
...
diagnostics, resolving PR9227.
Patch originally by Mihai Rusu and Stephen Hines with some minimal style
tweaks from me.
llvm-svn: 125999
2011-02-19 00:21:00 +00:00
Chandler Carruth
9c9127eace
Fix a missed case in the NULL operand to conditional operator
...
diagnostics.
Patch by Stephen Hines.
llvm-svn: 125998
2011-02-19 00:13:59 +00:00
Chandler Carruth
fc1ad1f371
Update the test error messages to match the update I made to the actual
...
messages.
llvm-svn: 125997
2011-02-19 00:12:23 +00:00
Chandler Carruth
98e3c568bf
Fix PR8767, improve diagnostic wording when allocating an object of an
...
abstract class type.
Patch by Stephen Hines, with a wording tweak from Doug applied by me.
llvm-svn: 125996
2011-02-18 23:59:51 +00:00
Chandler Carruth
a8bea4b90e
Initial steps to improve diagnostics when there is a NULL and
...
a non-pointer on the two sides of a conditional expression.
Patch by Stephen Hines and Mihai Rusu.
llvm-svn: 125995
2011-02-18 23:54:50 +00:00
Caroline Tice
55532be31f
Add code to emulate LDRB (register) Arm instruction.
...
llvm-svn: 125994
2011-02-18 23:52:21 +00:00
Chandler Carruth
241b31378d
Check for NULL child expressions before visiting them, as the first
...
thing the visit does is dyn_cast<>, which leads to a nasty segfault.
llvm-svn: 125993
2011-02-18 23:42:00 +00:00
Johnny Chen
ce4e629fdf
Add emulation methods for "ORR (immediate)" and "ORR (register)".
...
Add Encoding T3 of "MOV (register)" to EmulateMOVRdRm() method and fixed
some bugs in EmulateMOVRdImm() and EmulateMOVRdRm() methods.
llvm-svn: 125992
2011-02-18 23:41:11 +00:00
Douglas Gregor
3a69eafa88
When code-completing a case statement for a switch on a value of
...
enumeration type, prioritize the enumeration constants and don't
provide completions for any other expressions. Fixes <rdar://problem/7283668>.
llvm-svn: 125991
2011-02-18 23:30:37 +00:00
Devang Patel
2d6390d47b
Start using enums from DIBuilder.
...
llvm-svn: 125990
2011-02-18 23:29:22 +00:00
Devang Patel
0555fd38b3
Provide enums to build complex address calucation expressions.
...
(This is infact direct copy from DIFactory, which is disappearing soon.)
llvm-svn: 125989
2011-02-18 23:28:53 +00:00
Devang Patel
f20e5a905f
Remove unused tag.
...
llvm-svn: 125988
2011-02-18 23:23:09 +00:00
Devang Patel
0ca3d1e980
These tags are now covered by dwarf::TagString().
...
llvm-svn: 125987
2011-02-18 23:13:40 +00:00
Devang Patel
4192802280
Provide tag strings for llvm specific tags.
...
llvm-svn: 125986
2011-02-18 23:06:29 +00:00
Daniel Dunbar
5423b497ab
More correct fix for CMake breakage I was seeing, my buildbots use
...
LLVM_INCLUDE_TESTS:=OFF, which may no longer be necessary for all I know.
llvm-svn: 125985
2011-02-18 22:55:32 +00:00
Devang Patel
b7ae3ccb84
Do not lose debug info of an inlined function argument even if the argument is only used through GEPs.
...
This time with a fix that avoids using invalidated DenseMap iterator.
llvm-svn: 125984
2011-02-18 22:43:42 +00:00
Ted Kremenek
dcc45f6ec1
Update text for where to file analyzer bugs.
...
llvm-svn: 125983
2011-02-18 22:42:04 +00:00
Fariborz Jahanian
0dcb2a0d99
Test case for // rdar://8850818
...
llvm-svn: 125982
2011-02-18 22:37:54 +00:00
Chris Lattner
7e5d8aa6f9
Now that -loop-idiom uses TargetLibraryInfo properly, it doesn't
...
need to be pulled out of the pass manager when the user specifies
-fno-builtin. It can intelligently determine which libcalls to
optimize based on what is enabled in TargetLibraryInfo. This
allows -fno-builtin-foo to work someday.
llvm-svn: 125981
2011-02-18 22:36:36 +00:00
Jakob Stoklund Olesen
4376d67b6f
Use VirtRegMap's Virt2SplitMap to keep track of the original live range before splitting.
...
All new virtual registers created for spilling or splitting point back to their original.
llvm-svn: 125980
2011-02-18 22:35:20 +00:00
Chris Lattner
fa222dfbed
If -fno-builtin is passed, tell TargetLibraryInfo to
...
turn off all builtin optimizations.
llvm-svn: 125979
2011-02-18 22:34:47 +00:00
Chris Lattner
1341df93f7
add a way to disable all builtins, wire it up to opt's -disable-simplifylibcalls flag.
...
llvm-svn: 125978
2011-02-18 22:34:03 +00:00
Douglas Gregor
af2a6ae429
Selector::getIdentifierInfoForSlot() can return NULL values, a fact
...
that was ignored in a few places (most notably, code
completion). Introduce Selector::getNameForSlot() for the common case
where we only care about the name. Audit all uses of
getIdentifierInfoForSlot(), switching many over to getNameForSlot(),
fixing a few crashers.
Fixed <rdar://problem/8939352>, a code-completion crasher.
llvm-svn: 125977
2011-02-18 22:29:55 +00:00
Daniel Dunbar
7ba92d716a
Unbreak CMake build on MSVC9, chapuni please check.
...
Without this I get:
--
-- Generating done
CMake Error: Unknown Target referenced : check.deps
CMake Error: Target: check-all depends on unknown target: check.deps
--
llvm-svn: 125976
2011-02-18 22:24:23 +00:00
Caroline Tice
27d1032b60
Add code to emulate LDRB (literal) Arm instruction.
...
llvm-svn: 125975
2011-02-18 22:24:22 +00:00
Chris Lattner
e6b261fec5
Make loop-idiom use TargetLibraryInfo to determine whether it is allowed
...
to hack on memset, memcpy etc.
llvm-svn: 125974
2011-02-18 22:22:15 +00:00
Chris Lattner
d38801cac6
add memset and memcpy, though they are always available for now.
...
llvm-svn: 125973
2011-02-18 22:21:24 +00:00
Chris Lattner
af3c0e0ecd
rearrange some comments, no functionality change.
...
llvm-svn: 125972
2011-02-18 22:21:07 +00:00
Chris Lattner
d98cec5ca2
install a TargetLibraryInfo configured with the appropriate
...
target triple. This would be a decent place to add -fno-builtin
info for example.
llvm-svn: 125971
2011-02-18 22:20:38 +00:00
Chris Lattner
15c8b5ef8b
Have opt set up a specific TargetLibraryInfo for modules
...
with a triple.
llvm-svn: 125970
2011-02-18 22:13:01 +00:00
Oscar Fuentes
09514f1955
CMake: updated list of tblgen source files.
...
llvm-svn: 125969
2011-02-18 22:06:23 +00:00
Oscar Fuentes
5ed962656c
Move library stuff out of the toplevel CMakeLists.txt file.
...
llvm-svn: 125968
2011-02-18 22:06:14 +00:00