Chad Rosier
1b9c5f1188
Fix 80-column violation.
...
llvm-svn: 148162
2012-01-14 00:30:11 +00:00
Rafael Espindola
78a6477b28
Add a test showing how the Leh_func_endN symbol is used.
...
llvm-svn: 148161
2012-01-14 00:12:59 +00:00
Argyrios Kyrtzidis
fb7d1455cd
[libclang] Add CXIndexOpt_IndexFunctionLocalSymbols indexing option to indicate
...
that one wants indexing callbacks for function-local symbols as well.
llvm-svn: 148160
2012-01-14 00:11:49 +00:00
Douglas Gregor
87ea58f5cd
(Implicit) parameters deserialized as part of a function type must not
...
get added to the identifier chains as part of deserialization, because
they should not be visible to name lookup.
llvm-svn: 148159
2012-01-13 23:49:34 +00:00
Eli Friedman
c09e0557a5
Progress towards making isUsed() reflect whether a declaration is odr-used; don't set isUsed for local variables which are referenced in unevaluated contexts. Make other code use isReferenced() (which basically indicates that a declaration isn't dead) where appropriate.
...
I was forced to change test/SemaCXX/linkage.cpp because we aren't actually modeling extern "C" in the AST the way that testcase expects; we were not printing a warning only because we skipped the relevant check. Someone who actually understands the semantics here should fix that.
llvm-svn: 148158
2012-01-13 23:41:25 +00:00
Eli Friedman
1c29e7297a
Fix a silly mistake in ComplexExprEvaluator::ZeroInitialization. <rdar://problem/10691092>.
...
llvm-svn: 148157
2012-01-13 23:34:56 +00:00
Rafael Espindola
a693128778
Remove previous commit while I debug the bot failures.
...
llvm-svn: 148156
2012-01-13 23:28:50 +00:00
Kaelyn Uhrain
637b5b3235
Convert SemaTemplate*.cpp to pass a callback object to CorrectTypo.
...
The change to SemaTemplateVariadic.cpp improves the typo correction
results in certain situations, while the change to SemaTemplate.cpp
does not change existing behavior.
llvm-svn: 148155
2012-01-13 23:10:36 +00:00
Douglas Gregor
81bd038623
Make sure to consider non-DeclContext scopes properly when finding
...
multiple name lookup results in C/Objective-C. Fixes a regression a
caused in r147533, found by Enea Zaffanella!
llvm-svn: 148154
2012-01-13 23:06:53 +00:00
Howard Hinnant
fcf732c7a6
A bug fix involving the updating of path_dst_ptr_to_static_ptr. Some minor code rearrangement optimizations (putting most likely 'if' first in an if-else series. And some major optimizations which involve stopping the search prior to an exhaustive walk over the entire tree. Some of these stops are because an ambiguity is detected earlier. And some of the short circuiting is due to the information from the bits __diamond_shaped_mask and __non_diamond_repeat_mask. The stress test checked in last night is now about 28% faster for the B<Width/2, Depth> -O3 case. I'm still playing with some more optimization possibilities but I'm not sure they will play out.
...
llvm-svn: 148153
2012-01-13 23:06:03 +00:00
Sean Callanan
cbbe3ac4a9
I made two major improvements to the way the
...
master AST importer imports types.
- First, before importing the definition of a
Decl from its source, notify the underlying
importer of the source->destination mapping.
Especially for anonymous strucutres that are
otherwise hard to unique in the target AST
context, this hint is very helpful.
- When deporting a type or Decl from one
ASTContext to another (deporting occurs in
the case of moving result types from the
parser's AST context to the result AST
context), don't forget their origin if the
origin is the original debug information.
llvm-svn: 148152
2012-01-13 22:55:55 +00:00
Jakob Stoklund Olesen
35545421c8
Use RegisterTuples to generate pseudo-registers.
...
The QQ and QQQQ registers are not 'real', they are pseudo-registers used
to model some vld and vst instructions.
This makes the call clobber lists longer, but I intend to get rid of
those soon.
llvm-svn: 148151
2012-01-13 22:55:42 +00:00
Rafael Espindola
cef42c30a7
Remove label that is not used anymore.
...
llvm-svn: 148150
2012-01-13 22:41:58 +00:00
Eli Friedman
d476fdc392
Speculatively revert r148132+r148133 to try and fix a buildbot failure.
...
llvm-svn: 148149
2012-01-13 22:34:39 +00:00
Douglas Gregor
3a5999bc1c
When inferring a module for a framework, first determine whether that
...
framework is actually a subframework within a top-level framework. If
so, only infer a module for the top-level framework and then dig out
the appropriate submodule.
This helps us cope with an amusing subframeworks anti-pattern, where
one uses -F <framework>/Frameworks to get direct include access to the
subframeworks of a framework (which otherwise would not be
permitted).
llvm-svn: 148148
2012-01-13 22:31:52 +00:00
Jakob Stoklund Olesen
071c69cd7c
Skip the NAME field when forming tuples.
...
llvm-svn: 148147
2012-01-13 22:23:50 +00:00
Sean Callanan
ba5be17e7d
Only create new ASTImporters on demand, not
...
proactively.
llvm-svn: 148146
2012-01-13 22:19:53 +00:00
Sean Callanan
7282e2acf4
If the name of a struct or union is NULL in the
...
debug info, call it anonymous. This isn't
perfect, because Clang actually considers the
following struct not to be anonymous:
–
struct {
int x;
int y;
} g_foo;
-
but DWARF doesn't make the distinction.
llvm-svn: 148145
2012-01-13 22:10:18 +00:00
Sean Callanan
a6e61a7820
Fixed some logging in the AST source and added
...
more information.
llvm-svn: 148144
2012-01-13 22:05:55 +00:00
Andrew Trick
f35c84032d
Remove pointless mode line in .cpp file.
...
llvm-svn: 148143
2012-01-13 22:04:16 +00:00
Anna Zaks
201d489cb8
Move identification of memory setting and copying functions (memset,
...
memcmp, strncmp,..) out of Sema and into FunctionDecl so that the logic
could be reused in the analyzer.
llvm-svn: 148142
2012-01-13 21:52:01 +00:00
Eli Friedman
d749c6bf2e
Revert r148138; it's causing test failures.
...
llvm-svn: 148141
2012-01-13 21:33:06 +00:00
Kaelyn Uhrain
3658e6a636
Convert SemaExprMember.cpp to pass a callback object to CorrectTypo,
...
improving the typo correction results in certain situations.
This is also the first typo correction callback conversion to affect
an existing unit test. :)
llvm-svn: 148140
2012-01-13 21:28:55 +00:00
Sebastian Pop
86500280c6
remove assertions in the Hexagon backend specific clang driver
...
Patch from Jyotsna Verma:
I have made the changes to remove assertions in the Hexagon backend
specific clang driver. Instead of asserting on invalid arch name, it has
been modified to use the default value.
I have changed the implementation of the CPU flag validation for the
Hexagon backend. Earlier, the clang driver performed the check and
asserted on invalid inputs. In the new implementation, the driver passes
the last CPU flag (or sets to "v4" if not specified) to the compiler (and
also to the assembler and linker which perform their own check) instead of
asserting on incorrect values. This patch changes the setCPU function for
the Hexagon backend in clang/lib/Basic/Targets.cpp which causes the
compiler to error out on incorrect CPU flag values.
llvm-svn: 148139
2012-01-13 20:37:10 +00:00
Sebastian Pop
9a8d528ddf
rename -ccc-host-triple into -target
...
llvm-svn: 148138
2012-01-13 20:37:02 +00:00
Sebastian Pop
9d66d9e4b2
rename DefaultHostTriple into DefaultTargetTriple
...
llvm-svn: 148137
2012-01-13 20:36:46 +00:00
Duncan Sands
df9d781510
Try to clarify a little how exception handling works.
...
llvm-svn: 148136
2012-01-13 19:59:16 +00:00
Richard Smith
d7d5790cb6
Refactor for clarity.
...
llvm-svn: 148135
2012-01-13 19:34:55 +00:00
Devang Patel
7066d28043
Revert r148131, it was committed before it was ready.
...
llvm-svn: 148134
2012-01-13 19:28:58 +00:00
Stepan Dyatkovskiy
0a920fa210
Cosmetic patch for r148132.
...
llvm-svn: 148133
2012-01-13 19:27:22 +00:00
Stepan Dyatkovskiy
cbcbdb237f
LoopUnswitch: All helper data that is collected during loop-unswitch iterations was moved to separated class (LUAnalysisCache).
...
llvm-svn: 148132
2012-01-13 19:13:54 +00:00
Devang Patel
7ecdc6d4f5
Refactor.
...
llvm-svn: 148131
2012-01-13 19:12:18 +00:00
Devang Patel
5d85276e30
Add new test.
...
llvm-svn: 148128
2012-01-13 18:45:31 +00:00
Pete Cooper
97aafd5f18
Fixed comment. Thanks Duncan!
...
llvm-svn: 148123
2012-01-13 17:52:01 +00:00
Douglas Gregor
ccff301bfe
Reinstate test case accidentally reverted by r148028
...
llvm-svn: 148118
2012-01-13 16:56:26 +00:00
Douglas Gregor
09a22f071b
Don't infer a submodule for a framework's private header, at least for now.
...
llvm-svn: 148117
2012-01-13 16:54:27 +00:00
Alexander Potapenko
bd53f597de
This patch adds two methods, __asan_allocate_island and __asan_deallocate_island
...
and switches our interceptors to using them instead of the default
vm_allocate-based approach used by mach_override_ptr.
To simplify the code, a fixed memory mapping is used for the allocation pool --
note that we can't mmap an arbitrary chunk of memory, because the shadow memory hasn't been mapped yet
(for the reasons discussed in http://code.google.com/p/address-sanitizer/issues/detail?id=24 , we cannot map the shadow earlier)
The patch drops the program startup time from several second to half a second,
which speeds up the execution of ASan tests noticeably.
Because of the virtual memory size occupied by the programs it's hard
to speed up the shutdown time, which would've also helped the tests.
llvm-svn: 148116
2012-01-13 16:13:58 +00:00
Alexander Potapenko
9301db4baa
Add __asan_mach_override_ptr_custom, which allows to inject a custom memory allocator into mach_override_ptr().
...
llvm-svn: 148115
2012-01-13 15:31:37 +00:00
Alexander Potapenko
553c208d22
This patch moves the code reading /proc/self/environ into AsanGetEnv
...
in asan_linux.cc, because /proc is unavailable on Mac.
Instead the Mac version of AsanGetEnv iterates over the array of
environment variables obtained from _NSGetEnviron()
llvm-svn: 148114
2012-01-13 12:59:48 +00:00
Evgeniy Stepanov
2ca1aa5a44
Remove --hash-style from link command on Android.
...
Gnu hash is not supported by the Android loader.
llvm-svn: 148113
2012-01-13 09:30:38 +00:00
Craig Topper
e52d86a740
Convert SHUFPD with the same register for both sources to PSHUFD if it would prevent a register copy. Similar to SHUFPS, but requires the mask to be converted.
...
llvm-svn: 148112
2012-01-13 09:21:41 +00:00
Greg Clayton
13d284b284
Updated HTML with info for ${function.name-with-args}
...
llvm-svn: 148111
2012-01-13 08:41:20 +00:00
Greg Clayton
6d3dbf5161
Added a new thread and frame format that can be used to display a function
...
name + arguments when the data is available. It seems to work really well,
but some more testing is needed before we make this on by default.
The new function format name is:
${function.name-with-args}
To see how to use these formats see the website:
http://lldb.llvm.org/formats.html
Here is a sample backtrace of debugging LLDB with LLDB using this new format
value:
(lldb) thread backtrace all
* thread #1 : tid = 0x2203, 0x00007fff88a17bca libsystem_kernel.dylib __psynch_cvwait + 10, stop reason = signal SIGINT, name = <lldb.driver.main-thread>, queue = com.apple.main-thread
frame #0 : 0x00007fff88a17bca libsystem_kernel.dylib __psynch_cvwait + 10
frame #1 : 0x00007fff884ae274 libsystem_c.dylib _pthread_cond_wait + 840
frame #2 : 0x00000001010778ea LLDB lldb_private::Condition::Wait(this=0x0000000104846770, mutex=0x0000000104846730, abstime=0x0000000000000000, timed_out=0x00007fff5fbfdea7) + 138 at Condition.cpp:92
frame #3 : 0x0000000101244c21 LLDB lldb_private::Predicate<bool>::WaitForValueEqualTo(this=0x0000000104846728, value=true, abstime=0x0000000000000000, timed_out=0x00007fff5fbfdea7) + 209 at Predicate.h:317
frame #4 : 0x0000000100f6eeb2 LLDB lldb_private::Listener::WaitForEventsInternal(this=0x0000000104846660, timeout=0x0000000000000000, broadcaster=0x0000000000000000, broadcaster_names=0x0000000000000000, num_broadcaster_names=0x00000000, event_type_mask=0x00000000, event_sp=0x00007fff5fbfe030) + 386 at Listener.cpp:388
frame #5 : 0x0000000100f6f231 LLDB lldb_private::Listener::WaitForEvent(this=0x0000000104846660, timeout=0x0000000000000000, event_sp=0x00007fff5fbfe030) + 81 at Listener.cpp:436
frame #6 : 0x0000000100098dcd LLDB lldb::SBListener::WaitForEvent(this=0x00007fff5fbff0f0, timeout_secs=0xffffffff, event=0x00007fff5fbfe430) + 685 at SBListener.cpp:181
frame #7 : 0x000000010000628c lldb Driver::MainLoop(this=0x00007fff5fbff620) + 5244 at Driver.cpp:1325
frame #8 : 0x0000000100006ca3 lldb main(argc=1, argv=0x00007fff5fbff758, envp=0x00007fff5fbff768) + 419 at Driver.cpp:1460
frame #9 : 0x0000000100000d54 lldb start + 52
thread #3 : tid = 0x2703, 0x00007fff88a17df2 libsystem_kernel.dylib select$DARWIN_EXTSN + 10, name = <lldb.comm.debugger.input>
frame #0 : 0x00007fff88a17df2 libsystem_kernel.dylib select$DARWIN_EXTSN + 10
frame #1 : 0x0000000100f3f072 LLDB lldb_private::ConnectionFileDescriptor::BytesAvailable(this=0x000000010524d040, timeout_usec=0x004c4b40, error_ptr=0x0000000105640a18) + 722 at ConnectionFileDescriptor.cpp:542
frame #2 : 0x0000000100f3e6dd LLDB lldb_private::ConnectionFileDescriptor::Read(this=0x000000010524d040, dst=0x0000000105640a60, dst_len=1024, timeout_usec=0x004c4b40, status=0x0000000105640a14, error_ptr=0x0000000105640a18) + 301 at ConnectionFileDescriptor.cpp:273
frame #3 : 0x0000000100f3b8f7 LLDB lldb_private::Communication::ReadFromConnection(this=0x0000000104846270, dst=0x0000000105640a60, dst_len=1024, timeout_usec=0x004c4b40, status=0x0000000105640a14, error_ptr=0x0000000105640a18) + 167 at Communication.cpp:317
frame #4 : 0x0000000100f3b197 LLDB lldb_private::Communication::ReadThread(p=0x0000000104846270) + 327 at Communication.cpp:344
frame #5 : 0x0000000101078923 LLDB ThreadCreateTrampoline(arg=0x00000001045f6650) + 227 at Host.cpp:549
frame #6 : 0x00007fff884aa8bf libsystem_c.dylib _pthread_start + 335
frame #7 : 0x00007fff884adb75 libsystem_c.dylib thread_start + 13
thread #4 : tid = 0x2803, 0x00007fff88a17df2 libsystem_kernel.dylib select$DARWIN_EXTSN + 10, name = <lldb.comm.driver.editline>
frame #0 : 0x00007fff88a17df2 libsystem_kernel.dylib select$DARWIN_EXTSN + 10
frame #1 : 0x0000000100f3f072 LLDB lldb_private::ConnectionFileDescriptor::BytesAvailable(this=0x0000000105700370, timeout_usec=0x004c4b40, error_ptr=0x00000001056c3a18) + 722 at ConnectionFileDescriptor.cpp:542
frame #2 : 0x0000000100f3e6dd LLDB lldb_private::ConnectionFileDescriptor::Read(this=0x0000000105700370, dst=0x00000001056c3a60, dst_len=1024, timeout_usec=0x004c4b40, status=0x00000001056c3a14, error_ptr=0x00000001056c3a18) + 301 at ConnectionFileDescriptor.cpp:273
frame #3 : 0x0000000100f3b8f7 LLDB lldb_private::Communication::ReadFromConnection(this=0x0000000105700000, dst=0x00000001056c3a60, dst_len=1024, timeout_usec=0x004c4b40, status=0x00000001056c3a14, error_ptr=0x00000001056c3a18) + 167 at Communication.cpp:317
frame #4 : 0x0000000100f3b197 LLDB lldb_private::Communication::ReadThread(p=0x0000000105700000) + 327 at Communication.cpp:344
frame #5 : 0x0000000101078923 LLDB ThreadCreateTrampoline(arg=0x0000000105700430) + 227 at Host.cpp:549
frame #6 : 0x00007fff884aa8bf libsystem_c.dylib _pthread_start + 335
frame #7 : 0x00007fff884adb75 libsystem_c.dylib thread_start + 13
thread #5 : tid = 0x2903, 0x00007fff88a17df2 libsystem_kernel.dylib select$DARWIN_EXTSN + 10, name = <lldb.comm.driver.editline_output>
frame #0 : 0x00007fff88a17df2 libsystem_kernel.dylib select$DARWIN_EXTSN + 10
frame #1 : 0x0000000100f3f072 LLDB lldb_private::ConnectionFileDescriptor::BytesAvailable(this=0x00000001057178f0, timeout_usec=0x004c4b40, error_ptr=0x0000000105980a18) + 722 at ConnectionFileDescriptor.cpp:542
frame #2 : 0x0000000100f3e6dd LLDB lldb_private::ConnectionFileDescriptor::Read(this=0x00000001057178f0, dst=0x0000000105980a60, dst_len=1024, timeout_usec=0x004c4b40, status=0x0000000105980a14, error_ptr=0x0000000105980a18) + 301 at ConnectionFileDescriptor.cpp:273
frame #3 : 0x0000000100f3b8f7 LLDB lldb_private::Communication::ReadFromConnection(this=0x0000000105717580, dst=0x0000000105980a60, dst_len=1024, timeout_usec=0x004c4b40, status=0x0000000105980a14, error_ptr=0x0000000105980a18) + 167 at Communication.cpp:317
frame #4 : 0x0000000100f3b197 LLDB lldb_private::Communication::ReadThread(p=0x0000000105717580) + 327 at Communication.cpp:344
frame #5 : 0x0000000101078923 LLDB ThreadCreateTrampoline(arg=0x00000001057179b0) + 227 at Host.cpp:549
frame #6 : 0x00007fff884aa8bf libsystem_c.dylib _pthread_start + 335
frame #7 : 0x00007fff884adb75 libsystem_c.dylib thread_start + 13
thread #6 : tid = 0x2a03, 0x00007fff88a18af2 libsystem_kernel.dylib read + 10, name = <lldb.driver.commandline_io>
frame #0 : 0x00007fff88a18af2 libsystem_kernel.dylib read + 10
frame #1 : 0x0000000100050c3b libedit.3.dylib read_init + 247
frame #2 : 0x0000000100050e96 libedit.3.dylib el_wgetc + 155
frame #3 : 0x000000010005115d libedit.3.dylib el_wgets + 578
frame #4 : 0x000000010005debc libedit.3.dylib el_gets + 37
frame #5 : 0x000000010000d409 lldb IOChannel::LibeditGetInput(this=0x0000000105700490, new_line=0x0000000105a03db0) + 89 at IOChannel.cpp:311
frame #6 : 0x000000010000d8b6 lldb IOChannel::Run(this=0x0000000105700490) + 806 at IOChannel.cpp:391
frame #7 : 0x000000010000d57d lldb IOChannel::IOReadThread(ptr=0x0000000105700490) + 29 at IOChannel.cpp:345
frame #8 : 0x0000000101078923 LLDB ThreadCreateTrampoline(arg=0x00000001057179f0) + 227 at Host.cpp:549
frame #9 : 0x00007fff884aa8bf libsystem_c.dylib _pthread_start + 335
frame #10 : 0x00007fff884adb75 libsystem_c.dylib thread_start + 13
(lldb)
llvm-svn: 148110
2012-01-13 08:39:16 +00:00
Craig Topper
b1c2ebf6ee
use v8i32 as optimal mem type over v8f32 if AVX2 is enabled. Similar to SSE2 vs SSE1.
...
llvm-svn: 148109
2012-01-13 08:32:21 +00:00
Craig Topper
cb7e13d7c0
Make X86 instruction selection use 256-bit VPXOR for build_vector of all ones if AVX2 is enabled. This gives the ExeDepsFix pass a chance to choose FP vs int as appropriate. Also use v8i32 as the type for getZeroVector if AVX2 is enabled. This is consistent with SSE2 using prefering v4i32.
...
llvm-svn: 148108
2012-01-13 08:12:35 +00:00
NAKAMURA Takumi
1b845f712a
test/CodeGen/ARM/test-sharedidx.ll: Fix for -Asserts.
...
llvm-svn: 148107
2012-01-13 07:03:55 +00:00
Craig Topper
9f14d9f939
Add patterns for v16i16 and v32i8 immAllZerosV to select VPXOR to match v4i64 and v8i32.
...
llvm-svn: 148106
2012-01-13 06:59:47 +00:00
Andrew Trick
e77e84e4b7
Added the MachineSchedulerPass skeleton.
...
llvm-svn: 148105
2012-01-13 06:30:30 +00:00
Andrew Trick
d9accbf113
whitespace
...
llvm-svn: 148104
2012-01-13 06:30:25 +00:00
Andrew Trick
4d4fef238a
wrong filename
...
llvm-svn: 148103
2012-01-13 06:30:22 +00:00