Commit Graph

110418 Commits

Author SHA1 Message Date
Anna Zaks 680be29584 KeychainAPI checker: forgot to commit the test with r136930. This should fix the bot.
llvm-svn: 136938
2011-08-04 22:40:38 +00:00
Matt Beaumont-Gay 7f6519141c Put a few warnings into a DiagGroup. Feel free to improve the flag name!
llvm-svn: 136937
2011-08-04 22:35:03 +00:00
Johnny Chen 0affe0213d Print out the stopwatch (which contains laps, total elapsed time, and average)
instead of just the average.

llvm-svn: 136932
2011-08-04 22:05:36 +00:00
Johnny Chen e464282f29 Add a benchmark comparing lldb vs. gdb with disassembly on a large function (lldb's Driver::MainLoop()).
Sample run on my OSX Lion (MacBook Pro):

1: test_run_gdb_then_lldb (TestDisassembly.DisassembleDriverMainLoop)
   Test disassembly on a large function with lldb vs. gdb. ... 
gdb benchmark: Avg: 0.201802 (Laps: 5, Total Elapsed Time: 1.009008)
lldb benchmark: Avg: 0.109569 (Laps: 5, Total Elapsed Time: 0.547843)
lldb_avg/gdb_avg: 0.542952
ok
2: test_run_lldb_then_gdb (TestDisassembly.DisassembleDriverMainLoop)
   Test disassembly on a large function with lldb vs. gdb. ... 
lldb benchmark: Avg: 0.109580 (Laps: 5, Total Elapsed Time: 0.547902)
gdb benchmark: Avg: 0.201587 (Laps: 5, Total Elapsed Time: 1.007936)
lldb_avg/gdb_avg: 0.543588
ok

llvm-svn: 136931
2011-08-04 22:01:21 +00:00
Anna Zaks c686177555 KeychainAPI checker: Track additional pair of SecKeychain APIs. Also, keep exploring the transition on which a call to allocator function failed (to be able to find errors in examples like ErrorCodesFromDifferentAPISDoNotInterfere).
llvm-svn: 136930
2011-08-04 21:53:01 +00:00
Chad Rosier b43c21a1e2 Whitespace.
llvm-svn: 136929
2011-08-04 21:50:29 +00:00
Sean Callanan 0c4d8d25a7 Fixed a problem that caused LLDB to fail to execute
expressions that used function pointers.  The problem
was that IRForTarget previously only scanned the IR
for the expression for call instructions; if a function
was used in another context, it was ignored.

Now LLDB scans the Module for functions that are only
declared (not also defined -- so these are externals);
it then constructs function pointers for these
functions and substitutes them wherever the function
is used.

Also made some changes so that "expr main" works just
as well as "expr &main"; they end up being the same
code, but LLDB was generating the result variable in
different ways.

llvm-svn: 136928
2011-08-04 21:37:47 +00:00
Fariborz Jahanian 6a86844161 objective-c: diagnose protocol inconsistencies in following
situation. When a class explicitly or implicitly (through inheritance) 
"conformsTo" two protocols which conflict (have methods which conflict).
This is 2nd part of // rdar://6191214.

llvm-svn: 136927
2011-08-04 21:28:44 +00:00
Chad Rosier 2c23b27fc7 Formatting.
llvm-svn: 136924
2011-08-04 21:26:30 +00:00
Jakob Stoklund Olesen 63e3dec9ad Count the total amount of stack space used in compiled functions.
Patch by Ivan Krasin!

llvm-svn: 136921
2011-08-04 21:06:09 +00:00
Greg Clayton 2c5f0e96c4 Make sure we track CXX and objc method decls.
llvm-svn: 136920
2011-08-04 21:02:57 +00:00
Johnny Chen d63991ca4a Fix some typos.
llvm-svn: 136919
2011-08-04 21:01:04 +00:00
Johnny Chen 2cce3f394c Remove an extra 'for' in the comment.
llvm-svn: 136918
2011-08-04 20:48:50 +00:00
Johnny Chen 189bff103d Fix makefile rules to prevent CFLAGS from appearing twice in the command line.
llvm-svn: 136917
2011-08-04 20:44:56 +00:00
Devang Patel d61b1d505c Print DBG_VALUE variable's location info as a comment.
llvm-svn: 136916
2011-08-04 20:44:26 +00:00
Devang Patel eabc3cea33 Increment counter inside insertDebugValue().
llvm-svn: 136915
2011-08-04 20:42:11 +00:00
Douglas Gregor 3f35bb2d15 Add a new libclang API to return a CXCompletionString for an arbitrary
cursor, from Connor Wakamo! Addresses <rdar://problem/9087798>.

llvm-svn: 136911
2011-08-04 20:04:59 +00:00
Devang Patel c0174048a4 We need to map DebugLoc. It leads to Fuction * (through subprogram entry node) which should be appropriately mapped.
llvm-svn: 136910
2011-08-04 20:02:18 +00:00
Devang Patel 6ddbb2e277 Linke NamedMDNodes after linking global values as comment suggests.
llvm-svn: 136909
2011-08-04 19:44:28 +00:00
Chris Lattner e8baa38e79 allow \r's in .s files.
llvm-svn: 136908
2011-08-04 19:31:26 +00:00
Chad Rosier 64b18eebc6 Fix style and remove obviously redundant code.
llvm-svn: 136907
2011-08-04 19:25:14 +00:00
Roman Divacky dfbecd1eb7 Introduce adjustFixupOffset that adjusts the fixup offset of a relocation.
This is meant to be overriden by backends. Implement an override on PowerPC
which adjusts the offset by 2 for ha16/lo16 relocation kinds. This removes
a commented out hack and enables hello world to be compiled on PowerPC.

llvm-svn: 136905
2011-08-04 19:08:19 +00:00
Douglas Gregor fddf530c5d Clean up the debug dump for a Module, so the local->global maps are
clearly called out, and add the missing local -> global selector map
output.

llvm-svn: 136903
2011-08-04 19:00:50 +00:00
Douglas Gregor 2f555fc415 Introduce local -> global mapping for preprocessed entity IDs. This is
the last of the ID/offset/index mappings that I know
of. Unfortunately, the "gap" method of testing doesn't work here due
to the way the preprocessing record performs iteration. We'll do more
testing once multi-AST loading is possible.

llvm-svn: 136902
2011-08-04 18:56:47 +00:00
Devang Patel b456866b7b Add counter.
llvm-svn: 136901
2011-08-04 18:45:38 +00:00
Evan Cheng e4df6a2add Fix an obvious type. Patch by Ivan Krasin.
llvm-svn: 136900
2011-08-04 18:40:26 +00:00
Evan Cheng 19e3f80579 Fix an obvious type. Patch by Ivan Krasin.
llvm-svn: 136899
2011-08-04 18:38:15 +00:00
Owen Anderson ce5190321e LDCL_POST and STCL_POST need one's-complement offsets, rather than two's complement offsets. Add an appropriate immediate type for them.
llvm-svn: 136896
2011-08-04 18:24:14 +00:00
Johnny Chen 19bfde34ed Add a test to check the integrity of the lldb public api directory containing SB*.h headers.
There should be nothing unwanted there and a simpe main.cpp (generated from main.cpp.template)
which includes SB*.h should compile and link with the LLDB framework.

llvm-svn: 136894
2011-08-04 18:17:16 +00:00
Douglas Gregor 7cb0d01dcd Remove the unset, unused return value of
ASTReader::ReadMacroRecord(). No functionality change.

llvm-svn: 136893
2011-08-04 18:09:14 +00:00
Chad Rosier a336c6f380 Additional comments and whitespace.
llvm-svn: 136892
2011-08-04 17:52:43 +00:00
Kaelyn Uhrain 7d9bc633d2 Match type names and give more info for out-of-line function definition errors.
Having a function declaration and definition with different types for a
parameter where the types have same (textual) name can occur when an unqualified
type name resolves to types in different namespaces in each location.

The error messages have been extended by adding notes that point to the first
parameter of the function definition that doesn't match the declaration, instead
of a generic "member declaration nearly matches". The generic message is still
used in cases where the mismatch is not in the paramenter list, such as
mismatched cv qualifiers on the member function itself.

llvm-svn: 136891
2011-08-04 17:40:00 +00:00
Anna Zaks 08be9b99e3 KeychainAPI checker: Refactor to make it easier to add more allocator/deallocator API pairs. Add the allocator function ID to the checker state. Better comments.
llvm-svn: 136889
2011-08-04 17:28:06 +00:00
Enrico Granata 4443d8c321 changing CFString.py to reflect the new behavior of CreateValueFromAddress
llvm-svn: 136887
2011-08-04 17:14:03 +00:00
Enrico Granata 61408e0856 more logical behavior for SBValue::CreateValueFromAddress
llvm-svn: 136886
2011-08-04 17:07:02 +00:00
Douglas Gregor 0d4b431e2c In the AST reader and writer, slide the preprocessed entity IDs by +1
so that we use ID zero as a sentinel for "no result". This matches the
convention set by all of the other global IDs.

llvm-svn: 136885
2011-08-04 17:06:18 +00:00
Rafael Espindola 77dde89b90 Fix the bitwidth of the remaining fields.
llvm-svn: 136884
2011-08-04 17:00:11 +00:00
Douglas Gregor 78d0b57d88 Add some missing record names to the AST output. No functionality change, but llvm-bcanalyzer will be a little more informative now for AST files
llvm-svn: 136883
2011-08-04 16:39:39 +00:00
Douglas Gregor a863b4b4e3 Implement the local -> global remapping for macro definition IDs in
the detailed preprocessing record. Tested with the standard "gaps" method.

llvm-svn: 136882
2011-08-04 16:36:56 +00:00
Duncan Sands 583b1e12f8 Fix a place that was clearly forgotten when the type legalization
logic moved over to its own enum.  Noticed by Andrey Karpov with
the PVS-studio tool.

llvm-svn: 136881
2011-08-04 16:01:54 +00:00
Rafael Espindola 9bc32a96be print st_shndx with the correct number of bits.
llvm-svn: 136880
2011-08-04 15:50:13 +00:00
Douglas Gregor 49b236a705 The AST reader was forgetting to parse ObjCInferRelatedReturnType
llvm-svn: 136879
2011-08-04 15:46:00 +00:00
Duncan Sands 00f39c1521 Add obviously missing "break". Noticed by Andrey Karpov with
the PVS-studio tool.

llvm-svn: 136878
2011-08-04 15:45:59 +00:00
Rafael Espindola 9528995e3f print st_other with the correct number of bits.
llvm-svn: 136877
2011-08-04 15:38:19 +00:00
Douglas Gregor db0b9f1264 Parsing of C++0x lambda expressions, from John Freeman with help from
David Blaikie!

llvm-svn: 136876
2011-08-04 15:30:47 +00:00
Rafael Espindola 96df560ce1 print st_type with the correct number of bits.
llvm-svn: 136875
2011-08-04 15:24:00 +00:00
Rafael Espindola 79ef75dc49 Print st_bind with the correct number of bits.
llvm-svn: 136874
2011-08-04 15:10:35 +00:00
Rafael Espindola 1848231ad1 Print r_sym with the correct number of bits.
llvm-svn: 136873
2011-08-04 14:48:27 +00:00
Rafael Espindola 260af5cef6 Print r_type with the correct number of bits.
llvm-svn: 136872
2011-08-04 14:39:30 +00:00
Rafael Espindola 1b282e7e49 Another counter goes decimal.
llvm-svn: 136871
2011-08-04 14:27:46 +00:00