platform/upstream/llvm.git
12 years agoDocument the -input-file option of FileCheck
Eli Bendersky [Wed, 7 Nov 2012 01:41:30 +0000 (01:41 +0000)]
Document the -input-file option of FileCheck

llvm-svn: 167517

12 years agoLogging improvements for the Objective-C runtime.
Sean Callanan [Wed, 7 Nov 2012 01:27:50 +0000 (01:27 +0000)]
Logging improvements for the Objective-C runtime.
Also fixed a bug where the Objective-C runtime
would not properly report that it found a class if
(a) it had to build the ObjCInterfaceDecl for the
class and (b) logging was enabled.

<rdar://problem/12641180>

llvm-svn: 167516

12 years agoAdd -Wmismatched-parameter-types flag for existing warning on conflicting parameter...
Ted Kremenek [Wed, 7 Nov 2012 01:25:56 +0000 (01:25 +0000)]
Add -Wmismatched-parameter-types flag for existing warning on conflicting parameter types.

llvm-svn: 167515

12 years agoPR11851 (and duplicates): Whenever a constexpr function is referenced,
Richard Smith [Wed, 7 Nov 2012 01:14:25 +0000 (01:14 +0000)]
PR11851 (and duplicates): Whenever a constexpr function is referenced,
instantiate it if it can be instantiated and implicitly define it if it can be
implicitly defined. This matches g++'s approach. Remove some cases from
SemaOverload which were marking functions as referenced when just planning how
overload resolution would proceed; such cases are not actually references.

llvm-svn: 167514

12 years agomodern ObjC translator. Insert line number for @synchronized statements.
Fariborz Jahanian [Wed, 7 Nov 2012 00:43:05 +0000 (00:43 +0000)]
modern ObjC translator. Insert line number for @synchronized statements.

llvm-svn: 167511

12 years agoAdd missing check to warning for packed attribute. PR14259.
Eli Friedman [Wed, 7 Nov 2012 00:35:20 +0000 (00:35 +0000)]
Add missing check to warning for packed attribute.  PR14259.

llvm-svn: 167510

12 years agoCreate helper functions in StmtDumper for outputting the indentation, newlines, and...
Manuel Klimek [Wed, 7 Nov 2012 00:33:12 +0000 (00:33 +0000)]
Create helper functions in StmtDumper for outputting the indentation, newlines, and brackets.

This is preparation for adding Decl dumping.

Patch by Philip Craig.

llvm-svn: 167509

12 years ago[arm fast-isel] Appease the machine verifier by using the proper register
Chad Rosier [Wed, 7 Nov 2012 00:13:01 +0000 (00:13 +0000)]
[arm fast-isel] Appease the machine verifier by using the proper register
classes.  For my test case the number of errors drop from 356 to 21.
Part of rdar://12594152

llvm-svn: 167508

12 years agoPR13552: Fix the end location of a CXXNewExpr.
David Blaikie [Wed, 7 Nov 2012 00:12:38 +0000 (00:12 +0000)]
PR13552: Fix the end location of a CXXNewExpr.

Spent longer than reasonable looking for a nice way to test this & decided to
give up for now. Open to suggestions/requests. Richard Smith suggested adding
something to ASTMatchers but it wasn't readily apparent how to test this with
that.

llvm-svn: 167507

12 years agoFix assertion failure with auto and nested initializer list; PR14272.
Eli Friedman [Tue, 6 Nov 2012 23:56:42 +0000 (23:56 +0000)]
Fix assertion failure with auto and nested initializer list; PR14272.

llvm-svn: 167506

12 years agoSimplify code. No functionality change.
Jakub Staszak [Tue, 6 Nov 2012 23:52:19 +0000 (23:52 +0000)]
Simplify code. No functionality change.

llvm-svn: 167505

12 years agoTease out the routine that reads the control block of an AST file from
Douglas Gregor [Tue, 6 Nov 2012 23:40:54 +0000 (23:40 +0000)]
Tease out the routine that reads the control block of an AST file from
the validation of an AST file against a specific set of options.

llvm-svn: 167504

12 years agoPut something sane in the DWARF offset field for bitfield ObjC ivars.
Eli Friedman [Tue, 6 Nov 2012 23:40:48 +0000 (23:40 +0000)]
Put something sane in the DWARF offset field for bitfield ObjC ivars.
This is useful because unnamed bitfields can have effects on the
offsets which are not otherwise reflected in the DWARF information.

<rdar://problem/12629719>

llvm-svn: 167503

12 years ago<rdar://problem/12647273>
Greg Clayton [Tue, 6 Nov 2012 23:36:26 +0000 (23:36 +0000)]
<rdar://problem/12647273>

Added the ability to get the full process list when using the --applist option in debugserver.

llvm-svn: 167502

12 years agoMake the helper functions static. No functional change.
Nadav Rotem [Tue, 6 Nov 2012 23:36:00 +0000 (23:36 +0000)]
Make the helper functions static. No functional change.

llvm-svn: 167501

12 years agoobjective-C modern rewriter. Insert line numbers in
Fariborz Jahanian [Tue, 6 Nov 2012 23:25:49 +0000 (23:25 +0000)]
objective-C modern rewriter. Insert line numbers in
translated code where new code makes the lines be off.
This is wip.

llvm-svn: 167500

12 years agoMark the Int_eh_sjlj_dispatchsetup pseudo instruction as clobbering all
Chad Rosier [Tue, 6 Nov 2012 23:05:24 +0000 (23:05 +0000)]
Mark the Int_eh_sjlj_dispatchsetup pseudo instruction as clobbering all
registers.  Previously, the register we being marked as implicitly defined, but
not killed.  In some cases this would cause the register scavenger to spill a
dead register.

Also, use an empty register mask to simplify the logic and to reduce the memory
footprint.
rdar://12592448

llvm-svn: 167499

12 years ago[regallocfast] Make sure the MachineRegisterInfo is aware of clobbers from a
Chad Rosier [Tue, 6 Nov 2012 22:52:42 +0000 (22:52 +0000)]
[regallocfast] Make sure the MachineRegisterInfo is aware of clobbers from a
register masks.  This is an obvious and necessary fix for a soon to be committed
patch.  No test case possible at this time.  Reviewed by Jakob.

llvm-svn: 167498

12 years agoRewriteModernObjC.cpp: Use Lexer::Stringify() on the file name of #line directive...
NAKAMURA Takumi [Tue, 6 Nov 2012 22:45:31 +0000 (22:45 +0000)]
RewriteModernObjC.cpp: Use Lexer::Stringify() on the file name of #line directive to escape Win32 path separator '\\'.

llvm-svn: 167497

12 years agoImplement codegen for init_priority attribute properly - make sure it
Anton Korobeynikov [Tue, 6 Nov 2012 22:44:45 +0000 (22:44 +0000)]
Implement codegen for init_priority attribute properly - make sure it
works between the modules.
No functionality change on Darwin/Windows.
This fixes PR11480.

llvm-svn: 167496

12 years agoBack out 167431+167437+167487; I didn't realize how incomplete our test
Eli Friedman [Tue, 6 Nov 2012 22:15:52 +0000 (22:15 +0000)]
Back out 167431+167437+167487; I didn't realize how incomplete our test
coverage of this code is.

llvm-svn: 167495

12 years agoclang/lib/Driver/Tools.cpp: Fix abuse of StringRef.
NAKAMURA Takumi [Tue, 6 Nov 2012 22:02:00 +0000 (22:02 +0000)]
clang/lib/Driver/Tools.cpp: Fix abuse of StringRef.

llvm-svn: 167494

12 years agoDimitry Andric: Silence some miscellaneous warnings.
Howard Hinnant [Tue, 6 Nov 2012 21:55:44 +0000 (21:55 +0000)]
Dimitry Andric:  Silence some miscellaneous warnings.

llvm-svn: 167493

12 years agoDimitry Andric: Silence some warnings in <locale>.
Howard Hinnant [Tue, 6 Nov 2012 21:48:33 +0000 (21:48 +0000)]
Dimitry Andric:  Silence some warnings in <locale>.

llvm-svn: 167492

12 years agoEnable the tuple interface of pair in C++03 mode.
Howard Hinnant [Tue, 6 Nov 2012 21:42:45 +0000 (21:42 +0000)]
Enable the tuple interface of pair in C++03 mode.

llvm-svn: 167491

12 years agoUpdate instructions for building and using libc++ on Mac OS
Howard Hinnant [Tue, 6 Nov 2012 21:31:37 +0000 (21:31 +0000)]
Update instructions for building and using libc++ on Mac OS

llvm-svn: 167490

12 years ago[libclang] Add some comments about the version constants for the libclang API.
Argyrios Kyrtzidis [Tue, 6 Nov 2012 21:21:49 +0000 (21:21 +0000)]
[libclang] Add some comments about the version constants for the libclang API.

llvm-svn: 167489

12 years agoCostModel: add another known vector trunc optimization.
Nadav Rotem [Tue, 6 Nov 2012 21:17:17 +0000 (21:17 +0000)]
CostModel: add another known vector trunc optimization.

llvm-svn: 167488

12 years agoFix a silly mistake in r167437.
Eli Friedman [Tue, 6 Nov 2012 21:10:22 +0000 (21:10 +0000)]
Fix a silly mistake in r167437.

llvm-svn: 167487

12 years agoProvide a way to disable use of extern templates in libc++. This is intended for...
Howard Hinnant [Tue, 6 Nov 2012 21:08:48 +0000 (21:08 +0000)]
Provide a way to disable use of extern templates in libc++.  This is intended for the clients of libc++, not the libc++ build.  The dylib should always contain the extern templates.  To disable the client needs to put -D'_LIBCPP_EXTERN_TEMPLATE(...)=' on the command line.

llvm-svn: 167486

12 years agoclang/test/Driver/fsanitize.c: Speculative fix to improve test on win32, not to mix...
NAKAMURA Takumi [Tue, 6 Nov 2012 20:44:29 +0000 (20:44 +0000)]
clang/test/Driver/fsanitize.c: Speculative fix to improve test on win32, not to mix emissions into stdout.

llvm-svn: 167485

12 years ago[c-index-test] When building with BUILD_CLANG_ONLY=YES, include c-index-test.
Argyrios Kyrtzidis [Tue, 6 Nov 2012 19:54:46 +0000 (19:54 +0000)]
[c-index-test] When building with BUILD_CLANG_ONLY=YES, include c-index-test.
It is part of libclang and has other uses besides running the clang tests.

llvm-svn: 167484

12 years agoRemove C++11-isms I just introduced in r167482
Douglas Gregor [Tue, 6 Nov 2012 19:41:11 +0000 (19:41 +0000)]
Remove C++11-isms I just introduced in r167482

llvm-svn: 167483

12 years agoIntroduce inferred framework modules into the module map file,
Douglas Gregor [Tue, 6 Nov 2012 19:39:40 +0000 (19:39 +0000)]
Introduce inferred framework modules into the module map file,
allowing a module map to be placed one level above the '.framework'
directories to specify that all .frameworks within that directory can
be inferred as framework modules. One can also specifically exclude
frameworks known not to work.

This makes explicit (and more restricted) behavior modules have had
"forever", where *any* .framework was assumed to be able to be built
as a module. That's not necessarily true, so we white-list directories
(with exclusions) when those directories have been audited.

llvm-svn: 167482

12 years agoTeach Clang parser to reject C++11 attributes that appertain to declaration specifiers.
Michael Han [Tue, 6 Nov 2012 19:34:54 +0000 (19:34 +0000)]
Teach Clang parser to reject C++11 attributes that appertain to declaration specifiers.

We don't support any C++11 attributes that appertain to declaration specifiers so reject
the attributes in parser until we support them; this also conforms to what g++ 4.8 is doing.

llvm-svn: 167481

12 years agoCost Model: add tables for some avx type-conversion hacks.
Nadav Rotem [Tue, 6 Nov 2012 19:33:53 +0000 (19:33 +0000)]
Cost Model: add tables for some avx type-conversion hacks.

llvm-svn: 167480

12 years agoUpdates to user's manual and release notes for -fsanitize= options.
Richard Smith [Tue, 6 Nov 2012 19:23:14 +0000 (19:23 +0000)]
Updates to user's manual and release notes for -fsanitize= options.

llvm-svn: 167479

12 years ago[c-index-test] When building with BUILD_CLANG_ONLY=YES, include c-index-test.
Argyrios Kyrtzidis [Tue, 6 Nov 2012 19:14:25 +0000 (19:14 +0000)]
[c-index-test] When building with BUILD_CLANG_ONLY=YES, include c-index-test.
It is part of libclang and has other uses besides running the clang tests.

llvm-svn: 167478

12 years agoFix build error from previous commit.
Andrew Kaylor [Tue, 6 Nov 2012 19:06:46 +0000 (19:06 +0000)]
Fix build error from previous commit.

llvm-svn: 167477

12 years agoCleanup: 80-column violation
Manman Ren [Tue, 6 Nov 2012 19:05:29 +0000 (19:05 +0000)]
Cleanup: 80-column violation

llvm-svn: 167476

12 years agoAdd interface for object-based JIT events.
Andrew Kaylor [Tue, 6 Nov 2012 18:51:59 +0000 (18:51 +0000)]
Add interface for object-based JIT events.

This patch adds the interface to expose events from MCJIT when an object is emitted or freed and implements the MCJIT functionality to send those events.  The IntelJITEventListener implementation is left empty for now.  It will be fleshed out in a future patch.

llvm-svn: 167475

12 years agoAdded unnamed bitfields to our bitfield test.
Greg Clayton [Tue, 6 Nov 2012 18:22:59 +0000 (18:22 +0000)]
Added unnamed bitfields to our bitfield test.

llvm-svn: 167473

12 years agoUse the -fsanitize=thread flag to unbreak buildbot.
Chad Rosier [Tue, 6 Nov 2012 18:16:37 +0000 (18:16 +0000)]
Use the -fsanitize=thread flag to unbreak buildbot.

llvm-svn: 167472

12 years agoMake sure to check the module is valid after trying to find a shared module.
Greg Clayton [Tue, 6 Nov 2012 17:50:15 +0000 (17:50 +0000)]
Make sure to check the module is valid after trying to find a shared module.

llvm-svn: 167471

12 years agoAdd unit tests for source locations of AST nodes.
Manuel Klimek [Tue, 6 Nov 2012 17:31:40 +0000 (17:31 +0000)]
Add unit tests for source locations of AST nodes.

Patch by Philip Craig.

llvm-svn: 167470

12 years agoModern objective-C translator: Start adding line info to the
Fariborz Jahanian [Tue, 6 Nov 2012 17:30:23 +0000 (17:30 +0000)]
Modern objective-C translator: Start adding line info to the
translated source where it is needed. wip.

llvm-svn: 167469

12 years agoBasic: Windows doesn't define S_IFIFO.
Daniel Dunbar [Tue, 6 Nov 2012 17:08:24 +0000 (17:08 +0000)]
Basic: Windows doesn't define S_IFIFO.

llvm-svn: 167468

12 years agoMemoryBuffer: Windows doesn't define S_IFIFO.
Daniel Dunbar [Tue, 6 Nov 2012 17:08:09 +0000 (17:08 +0000)]
MemoryBuffer: Windows doesn't define S_IFIFO.

llvm-svn: 167467

12 years agotsan: slightly relax requirements for lazy shadow memory (can overlap and may not...
Dmitry Vyukov [Tue, 6 Nov 2012 16:48:46 +0000 (16:48 +0000)]
tsan: slightly relax requirements for lazy shadow memory (can overlap and may not be properly aligned)
it's problematic on windows where allocation granularity is much larger than page size

llvm-svn: 167466

12 years agoUse -fsanitize= flag in docs for ASan/TSan
Alexey Samsonov [Tue, 6 Nov 2012 16:19:11 +0000 (16:19 +0000)]
Use -fsanitize= flag in docs for ASan/TSan

llvm-svn: 167465

12 years agotsan: lazily allocate shadow for Go
Dmitry Vyukov [Tue, 6 Nov 2012 16:00:16 +0000 (16:00 +0000)]
tsan: lazily allocate shadow for Go

llvm-svn: 167464

12 years agotsan: fix debug output
Dmitry Vyukov [Tue, 6 Nov 2012 15:54:34 +0000 (15:54 +0000)]
tsan: fix debug output

llvm-svn: 167463

12 years agotsan: better diagnostics for failed mmap()
Dmitry Vyukov [Tue, 6 Nov 2012 15:39:16 +0000 (15:39 +0000)]
tsan: better diagnostics for failed mmap()

llvm-svn: 167462

12 years agoFollow-up for r167411 to un-break ASan on Mac. Move SanitizerArgs to a header file...
Alexey Samsonov [Tue, 6 Nov 2012 15:09:03 +0000 (15:09 +0000)]
Follow-up for r167411 to un-break ASan on Mac. Move SanitizerArgs to a header file and use it on Darwin toolchain.

llvm-svn: 167460

12 years agodocs: use code font for console commands in phabricator manual
Alexey Samsonov [Tue, 6 Nov 2012 15:04:37 +0000 (15:04 +0000)]
docs: use code font for console commands in phabricator manual

llvm-svn: 167459

12 years agotsan: fix compiler warning
Dmitry Vyukov [Tue, 6 Nov 2012 14:05:20 +0000 (14:05 +0000)]
tsan: fix compiler warning

llvm-svn: 167458

12 years agotsan: windows platform support
Dmitry Vyukov [Tue, 6 Nov 2012 13:35:02 +0000 (13:35 +0000)]
tsan: windows platform support

llvm-svn: 167457

12 years agotsan: update script to support windows
Dmitry Vyukov [Tue, 6 Nov 2012 13:32:53 +0000 (13:32 +0000)]
tsan: update script to support windows

llvm-svn: 167456

12 years agotsan: add shadow mapping for windows
Dmitry Vyukov [Tue, 6 Nov 2012 13:26:57 +0000 (13:26 +0000)]
tsan: add shadow mapping for windows

llvm-svn: 167455

12 years agotsan: add missing function for windows
Dmitry Vyukov [Tue, 6 Nov 2012 13:25:05 +0000 (13:25 +0000)]
tsan: add missing function for windows

llvm-svn: 167454

12 years agotsan: fix constant types
Dmitry Vyukov [Tue, 6 Nov 2012 13:21:06 +0000 (13:21 +0000)]
tsan: fix constant types

llvm-svn: 167453

12 years agotsan: windows: less includes, better diagnostics for failed VirtualAlloc(), implement...
Dmitry Vyukov [Tue, 6 Nov 2012 13:19:59 +0000 (13:19 +0000)]
tsan: windows: less includes, better diagnostics for failed VirtualAlloc(), implement sched_yield()

llvm-svn: 167452

12 years agotsan: don't release disabled clocks
Dmitry Vyukov [Tue, 6 Nov 2012 13:16:25 +0000 (13:16 +0000)]
tsan: don't release disabled clocks

llvm-svn: 167451

12 years agotsan: define missing compier macros for windows
Dmitry Vyukov [Tue, 6 Nov 2012 12:54:16 +0000 (12:54 +0000)]
tsan: define missing compier macros for windows

llvm-svn: 167450

12 years agotsan: fix non-msvc windows build
Dmitry Vyukov [Tue, 6 Nov 2012 12:50:13 +0000 (12:50 +0000)]
tsan: fix non-msvc windows build

llvm-svn: 167449

12 years agotasn: improve sanitizer_internal_defs.h
Dmitry Vyukov [Tue, 6 Nov 2012 12:49:22 +0000 (12:49 +0000)]
tasn: improve sanitizer_internal_defs.h
The file uses namespaces and extern "LANG", so it's kinda senseless to use #ifdef __cplusplus

llvm-svn: 167448

12 years agotsan: fix windows build
Dmitry Vyukov [Tue, 6 Nov 2012 12:47:42 +0000 (12:47 +0000)]
tsan: fix windows build
__declspec is not _WIN32, it's _MSC_VER

llvm-svn: 167447

12 years agotsan: fix Go build
Dmitry Vyukov [Tue, 6 Nov 2012 12:46:26 +0000 (12:46 +0000)]
tsan: fix Go build

llvm-svn: 167446

12 years agoRemove tailing whitespaces
Michael Liao [Tue, 6 Nov 2012 08:06:35 +0000 (08:06 +0000)]
Remove tailing whitespaces

llvm-svn: 167445

12 years agomisched: TargetSchedule interface for machine resources.
Andrew Trick [Tue, 6 Nov 2012 07:10:38 +0000 (07:10 +0000)]
misched: TargetSchedule interface for machine resources.

Expose the processor resources defined by the machine model to the
scheduler and other clients through the TargetSchedule interface.

Normalize each resource count with respect to other kinds of
resources. This allows scheduling heuristics to balance resources
against other kinds of resources and latency.

llvm-svn: 167444

12 years agomisched: Rename RemainingCount to avoid confusion with remaining resources.
Andrew Trick [Tue, 6 Nov 2012 07:10:34 +0000 (07:10 +0000)]
misched: Rename RemainingCount to avoid confusion with remaining resources.

llvm-svn: 167443

12 years agoRemove completely irrelevant code from USR generation.
Ted Kremenek [Tue, 6 Nov 2012 06:36:45 +0000 (06:36 +0000)]
Remove completely irrelevant code from USR generation.

Thanks to Richard Smith for pointing this out.  This code stopped
serving its purpose during r103212 in a refactoring.  My initial
fix was to add back the logic to abort the USR generation for
InternalLinkage, but enough tests broke suspiciously that I fear
that USR generation for cursors with InternalLinkage is now expected
by some clients (where it wasn't the case when the refactoring
took place).  I don't own this code anymore and have not looked
at it for some time, but clearly this code is dead and can be removed
pending further review on the proper logic here.

llvm-svn: 167442

12 years agoDelete an outdated comment.
Nico Weber [Tue, 6 Nov 2012 05:20:23 +0000 (05:20 +0000)]
Delete an outdated comment.

llvm-svn: 167441

12 years agoARM byval: when type alignment is bigger than ABI alignment, instead of
Manman Ren [Tue, 6 Nov 2012 04:58:01 +0000 (04:58 +0000)]
ARM byval: when type alignment is bigger than ABI alignment, instead of
disabling byval, we set realign to true.

It will perform an aligned alloca, and call memcpy to copy the byval
argument to the local variable.
Change the size threshold back to 64 bytes.

rdar://12596507

llvm-svn: 167440

12 years ago[analyzer] Add symbol escapes logic to the SimpleStreamChecker.
Anna Zaks [Tue, 6 Nov 2012 04:20:57 +0000 (04:20 +0000)]
[analyzer] Add symbol escapes logic to the SimpleStreamChecker.

llvm-svn: 167439

12 years ago[analyzer] Remove isWithinInlined. It's been replaced with inTopFrame().
Anna Zaks [Tue, 6 Nov 2012 04:20:54 +0000 (04:20 +0000)]
[analyzer] Remove isWithinInlined. It's been replaced with inTopFrame().

Thanks Jordan.

llvm-svn: 167438

12 years agoPropagate CharUnits through CGObjCMac.cpp.
Eli Friedman [Tue, 6 Nov 2012 03:41:04 +0000 (03:41 +0000)]
Propagate CharUnits through CGObjCMac.cpp.

llvm-svn: 167437

12 years agoMinor fix to ObjC layout bitmap metadata. Found while I was trying to
Eli Friedman [Tue, 6 Nov 2012 03:38:02 +0000 (03:38 +0000)]
Minor fix to ObjC layout bitmap metadata.  Found while I was trying to
refactor the code.

llvm-svn: 167436

12 years agoScheduleDAG interface. Added OrderKind to distinguish nonregister dependencies.
Andrew Trick [Tue, 6 Nov 2012 03:13:46 +0000 (03:13 +0000)]
ScheduleDAG interface. Added OrderKind to distinguish nonregister dependencies.

This is in preparation for adding "weak" DAG edges, but generally
simplifies the design.

llvm-svn: 167435

12 years agoUpdate compiler-rt tests to match flag renaming/deprecation in Clang.
Richard Smith [Tue, 6 Nov 2012 02:31:42 +0000 (02:31 +0000)]
Update compiler-rt tests to match flag renaming/deprecation in Clang.

llvm-svn: 167434

12 years agoClassify the INT_MIN/-1 check as -fsanitize=signed-integer-overflow, not as -fsanitiz...
Richard Smith [Tue, 6 Nov 2012 02:30:30 +0000 (02:30 +0000)]
Classify the INT_MIN/-1 check as -fsanitize=signed-integer-overflow, not as -fsanitize=divide-by-zero.

llvm-svn: 167433

12 years ago[c-index-test] Do install c-index-test because it's not just for tests,
Argyrios Kyrtzidis [Tue, 6 Nov 2012 02:12:21 +0000 (02:12 +0000)]
[c-index-test] Do install c-index-test because it's not just for tests,
it's also setup as 'INTERNAL_TOOL'.

llvm-svn: 167432

12 years agoPropagate CharUnits into ObjC CodeGen. No intended functional change.
Eli Friedman [Tue, 6 Nov 2012 01:51:20 +0000 (01:51 +0000)]
Propagate CharUnits into ObjC CodeGen.  No intended functional change.

llvm-svn: 167431

12 years agoAdd a workaround to problems with the clang debug info for
Jim Ingham [Tue, 6 Nov 2012 01:14:52 +0000 (01:14 +0000)]
Add a workaround to problems with the clang debug info for
inlined subroutine ranges.

<rdar://problem/12588579>

llvm-svn: 167430

12 years agoPer discussion on cfe-commits, treat -faddress-sanitizer,
Richard Smith [Tue, 6 Nov 2012 01:12:02 +0000 (01:12 +0000)]
Per discussion on cfe-commits, treat -faddress-sanitizer,
-fno-address-sanitizer, -fthread-sanitizer, -fno-thread-sanitizer, and
-fcatch-undefined-behavior as deprecated: produce a warning if they are used
pointing to the corresponding -fsanitize= option. In passing add the missing
'-' to some diagnostics.

llvm-svn: 167429

12 years ago[PCH] Take into account the 'include' source location of a SM_SLOC_BUFFER_ENTRY.
Argyrios Kyrtzidis [Tue, 6 Nov 2012 00:35:04 +0000 (00:35 +0000)]
[PCH] Take into account the 'include' source location of a SM_SLOC_BUFFER_ENTRY.

llvm-svn: 167426

12 years ago[PCH] Write out the ClassTemplateDecl::Common::InjectedClassNameType type
Argyrios Kyrtzidis [Tue, 6 Nov 2012 00:35:02 +0000 (00:35 +0000)]
[PCH] Write out the ClassTemplateDecl::Common::InjectedClassNameType type
reference instead of relying on computing it.

In general, if storage is no issue, it is preferable to deserialize info from
the PCH instead of trying to recompute it after the PCH was loaded.

The incentive to change this now was due to r155303 changing how friend template
classes in dependent contexts are handled; such classes can now be chained to
a previous template class but the computed InjectedClassNameType may be different
due to the extra template parameters from the dependent context.

The new handling requires more investigation but, in the meantime, writing out
InjectedClassNameType fixes PCH issue in rdar://12627738.

llvm-svn: 167425

12 years ago<rdar://problem/12582031>
Greg Clayton [Tue, 6 Nov 2012 00:20:41 +0000 (00:20 +0000)]
<rdar://problem/12582031>

Unnamed bitfields cause struct layout problems

Synthesize unnamed bitfields when required. Most compilers don't mention unnamed bitfields in the DWARF, so we need to create them to keep clang happy with the types we create from the DWARF. We currently can't do this for ObjC since the DW_AT_bit_offset value for any direct ivars of ObjC classes as the values for these attributes are bogus. A bug has been filed on Clang to fix this, and another bug has been filed on LLDB to make sure we fix the DWARF parser once the clang fix is in by looking the the DW_AT_producer in the compile unit attributes and finding the compiler version and only enabling it for newer versions of clang.

llvm-svn: 167424

12 years agoHave the parser initialize Sema before it consumes the first
Douglas Gregor [Mon, 5 Nov 2012 23:58:27 +0000 (23:58 +0000)]
Have the parser initialize Sema before it consumes the first
token. This is important because the first token could actually be
after an #include that triggers a module import, which might use
either Sema or the AST consumer before it would have been initialized.

llvm-svn: 167423

12 years agoRefactor the getTypeLegalizationCost interface. No functionality change.
Nadav Rotem [Mon, 5 Nov 2012 23:57:45 +0000 (23:57 +0000)]
Refactor the getTypeLegalizationCost interface. No functionality change.

llvm-svn: 167422

12 years agoCostModel: Add tables for the common x86 compares.
Nadav Rotem [Mon, 5 Nov 2012 23:48:20 +0000 (23:48 +0000)]
CostModel: Add tables for the common x86 compares.

llvm-svn: 167421

12 years agoSplit the instrinsic header wmmintrin.h into AES and PCLMUL parts, so
Douglas Gregor [Mon, 5 Nov 2012 23:30:26 +0000 (23:30 +0000)]
Split the instrinsic header wmmintrin.h into AES and PCLMUL parts, so
that we can model them as separate submodules.

llvm-svn: 167420

12 years agoFrontend: Add support for reading named pipes as the main file.
Daniel Dunbar [Mon, 5 Nov 2012 22:53:33 +0000 (22:53 +0000)]
Frontend: Add support for reading named pipes as the main file.

 - The whole {File,Source}Manager is built around wanting to pre-determine the
   size of files, so we can't fit this in naturally. Instead, we handle it like
   we do STDIN, where we just replace the main file contents upfront.

llvm-svn: 167419

12 years agoDelete comment I forgot to delete in my last change.
Nico Weber [Mon, 5 Nov 2012 22:50:26 +0000 (22:50 +0000)]
Delete comment I forgot to delete in my last change.

llvm-svn: 167418

12 years agoUse Richard's BE_THE_HEADER trick to simplify a test. No intended behavior change.
Nico Weber [Mon, 5 Nov 2012 22:49:03 +0000 (22:49 +0000)]
Use Richard's BE_THE_HEADER trick to simplify a test. No intended behavior change.

llvm-svn: 167417

12 years agoARM byval: when type alignment is bigger than ABI alignment, we can't guarantee
Manman Ren [Mon, 5 Nov 2012 22:42:46 +0000 (22:42 +0000)]
ARM byval: when type alignment is bigger than ABI alignment, we can't guarantee
the type alignment of the byval argument. This patch will disable byval in this case,
it also increases the size threshold for turning on byval.

A backend fix will be attempted.

rdar://12596507

llvm-svn: 167416

12 years agoUse the individual -fsanitize=<...> arguments to control which of the UBSan
Richard Smith [Mon, 5 Nov 2012 22:21:05 +0000 (22:21 +0000)]
Use the individual -fsanitize=<...> arguments to control which of the UBSan
checks to enable. Remove frontend support for -fcatch-undefined-behavior,
-faddress-sanitizer and -fthread-sanitizer now that they don't do anything.

llvm-svn: 167413

12 years agoCode Model: Improve the accuracy of the zext/sext/trunc vector cost estimation.
Nadav Rotem [Mon, 5 Nov 2012 22:20:53 +0000 (22:20 +0000)]
Code Model: Improve the accuracy of the zext/sext/trunc vector cost estimation.

llvm-svn: 167412

12 years agoAdd -fsanitize=<sanitizers> argument to driver and frontend, and add
Richard Smith [Mon, 5 Nov 2012 22:04:41 +0000 (22:04 +0000)]
Add -fsanitize=<sanitizers> argument to driver and frontend, and add
-fno-sanitize=<sanitizers> argument to driver. These allow ASan, TSan, and the
various UBSan checks to be enabled and disabled separately. Right now, the
different modes can't be combined, but the intention is that combining UBSan
and the other sanitizers will be permitted in the near future.

Currently, the UBSan checks will all be enabled if any of them is; that will be
fixed by the next patch.

llvm-svn: 167411

12 years agoSuppress signed/unsigned comparison warning.
Richard Smith [Mon, 5 Nov 2012 22:01:44 +0000 (22:01 +0000)]
Suppress signed/unsigned comparison warning.

llvm-svn: 167410