platform/upstream/llvm.git
11 years ago[modules] Refactor code from ASTReader::makeModuleVisible() into a new function,
Argyrios Kyrtzidis [Tue, 19 Feb 2013 19:34:40 +0000 (19:34 +0000)]
[modules] Refactor code from ASTReader::makeModuleVisible() into a new function,
Module::getExportedModules() so it can be reused.

llvm-svn: 175548

11 years agoFix Makefile bug preventing tests from running when building lldb with ccache
Daniel Malea [Tue, 19 Feb 2013 19:31:05 +0000 (19:31 +0000)]
Fix Makefile bug preventing tests from running when building lldb with ccache

llvm-svn: 175547

11 years agoUpdated to support latest Clang option naming.
Sean Callanan [Tue, 19 Feb 2013 19:16:37 +0000 (19:16 +0000)]
Updated to support latest Clang option naming.

llvm-svn: 175546

11 years agoAdding files left out of commit r175544.
Edwin Vane [Tue, 19 Feb 2013 19:14:45 +0000 (19:14 +0000)]
Adding files left out of commit r175544.

llvm-svn: 175545

11 years agoAdd support for auto-generating LIT tests by the build
Edwin Vane [Tue, 19 Feb 2013 19:08:10 +0000 (19:08 +0000)]
Add support for auto-generating LIT tests by the build

autoconf and CMake flavours both updated to auto-generate files for use
in cpp11-migrate's LIT tests.

Auto-generated files are placed in the build directory under
test/cpp11-migrate/autogen. The directory structure past this point
mirrors the structure in the source directory under test/cpp11-migrate.
A lit.site.cfg is generated in test/cpp11-migrate/autogen to describe
the new test suite. When LIT runs, it runs the standard testsuite and
now also the auto-generated testsuite.

llvm-svn: 175544

11 years agoAdd i386 register support for the x86_64 RegisterContext plugin. This allows debuggin...
Matt Kopec [Tue, 19 Feb 2013 19:06:16 +0000 (19:06 +0000)]
Add i386 register support for the x86_64 RegisterContext plugin. This allows debugging a 32-bit inferior on 64-bit lldb/host.

llvm-svn: 175543

11 years agoDon't trust st_size of a character device. This fixes using
Dan Gohman [Tue, 19 Feb 2013 18:57:53 +0000 (18:57 +0000)]
Don't trust st_size of a character device. This fixes using
/dev/stdin as an input when stdin is connected to a tty, for example.

No test, because it's difficult to write a reasonably portable test
for this. /dev/stdin isn't a character device when stdin is redirected
from a file or connected to a pipe.

llvm-svn: 175542

11 years agoARM: Allocation hints must make sure to be in the alloc order.
Jim Grosbach [Tue, 19 Feb 2013 18:55:36 +0000 (18:55 +0000)]
ARM: Allocation hints must make sure to be in the alloc order.

When creating an allocation hint for a register pair, make sure the hint
for the physical register reference is still in the allocation order.

rdar://13240556

llvm-svn: 175541

11 years agoAssert that the target provided hints are in the allocation order.
Jakob Stoklund Olesen [Tue, 19 Feb 2013 18:41:01 +0000 (18:41 +0000)]
Assert that the target provided hints are in the allocation order.

Target implementations of getRegAllocationHints() should use the
provided allocation order, and they can never return hints outside the
order. This is already documented in TargetRegisterInfo.h.

<rdar://problem/13240556>

llvm-svn: 175540

11 years agoUse MapVector::pop_back() per LLVM r175538.
Douglas Gregor [Tue, 19 Feb 2013 18:26:28 +0000 (18:26 +0000)]
Use MapVector::pop_back() per LLVM r175538.

llvm-svn: 175539

11 years agoRemove my bogus MapVector::erase() with a narrower ::pop_back(), and add a unit test.
Douglas Gregor [Tue, 19 Feb 2013 18:26:07 +0000 (18:26 +0000)]
Remove my bogus MapVector::erase() with a narrower ::pop_back(), and add a unit test.

llvm-svn: 175538

11 years agoHexagon: Sync TSFlags in MCTargetDesc/HexagonBaseInfo.h with
Jyotsna Verma [Tue, 19 Feb 2013 18:18:36 +0000 (18:18 +0000)]
Hexagon: Sync TSFlags in MCTargetDesc/HexagonBaseInfo.h with
HexagonInstrFormats.td.

llvm-svn: 175537

11 years agoClean up HiPE prologue emission a bit and avoid signed arithmetic tricks.
Benjamin Kramer [Tue, 19 Feb 2013 17:32:57 +0000 (17:32 +0000)]
Clean up HiPE prologue emission a bit and avoid signed arithmetic tricks.

No intended functionality change.

llvm-svn: 175536

11 years ago[docs] Rename to permit wider variety of content.
Sean Silva [Tue, 19 Feb 2013 17:29:01 +0000 (17:29 +0000)]
[docs] Rename to permit wider variety of  content.

I don't want to rule out the possibility of linking to e.g. interesting
blog posts about uses of Clang, so avoid restricting the content to
"projects".

This breaks URL compatibility, but this document was committed less than
an hour ago so hopefully nobody has linked to it yet.

llvm-svn: 175535

11 years ago[docs] Revise content on ExternalProjectsUsingClang page.
Sean Silva [Tue, 19 Feb 2013 17:21:23 +0000 (17:21 +0000)]
[docs] Revise content on ExternalProjectsUsingClang page.

llvm-svn: 175534

11 years agoCorrectly format macro with unfinished template declaration.
Daniel Jasper [Tue, 19 Feb 2013 17:14:38 +0000 (17:14 +0000)]
Correctly format macro with unfinished template declaration.

We can now format:
  #define A template <typename T>

Before this created a segfault :-/.

llvm-svn: 175533

11 years agoSupport in hasDeclaration for types with getDecl()
Edwin Vane [Tue, 19 Feb 2013 17:14:34 +0000 (17:14 +0000)]
Support in hasDeclaration for types with getDecl()

Using a new metafunction for detecting the presence of the member
'getDecl' in a type T, added support to hasDeclaration for any such type
T. This allows hasDecl() to be replaced and enables several other
subclasses of clang::Type to use hasDeclaration.

Updated unittests and LibASTMatchersReference.html.

Reviewers: klimek
llvm-svn: 175532

11 years agoMove LLVM_LIBRARY_VISIBILITY for consistency with what was done to
Rafael Espindola [Tue, 19 Feb 2013 17:14:33 +0000 (17:14 +0000)]
Move LLVM_LIBRARY_VISIBILITY for consistency with what was done to
PPCJITInfo.cpp in r175394.

llvm-svn: 175531

11 years agoFix typo
Eli Bendersky [Tue, 19 Feb 2013 17:11:48 +0000 (17:11 +0000)]
Fix typo

llvm-svn: 175530

11 years ago[docs] Introduce ExternalProjectsUsingClang.rst
Sean Silva [Tue, 19 Feb 2013 16:58:15 +0000 (16:58 +0000)]
[docs] Introduce ExternalProjectsUsingClang.rst

A couple concrete examples are sure to be a win. If you know of any
other external projects using Clang, please let me know!

Patch by Laszlo Nagy! (with a title tweak by me)

llvm-svn: 175529

11 years agoFix GCMetadaPrinter::finishAssembly not executed, patch by Yiannis Tsiouris.
Benjamin Kramer [Tue, 19 Feb 2013 16:51:44 +0000 (16:51 +0000)]
Fix GCMetadaPrinter::finishAssembly not executed, patch by Yiannis Tsiouris.

Due to the execution order of doFinalization functions, the GC information were
deleted before AsmPrinter::doFinalization was executed. Thus, the
GCMetadataPrinter::finishAssembly was never called.

The patch fixes that by moving the code of the GCInfoDeleter::doFinalization to
Printer::doFinalization.

llvm-svn: 175528

11 years agoMake ARMAsmPrinter pass name more precise and fix comment.
Eli Bendersky [Tue, 19 Feb 2013 16:47:59 +0000 (16:47 +0000)]
Make ARMAsmPrinter pass name more precise and fix comment.

llvm-svn: 175527

11 years agoMake pass name more precise and fix comment.
Eli Bendersky [Tue, 19 Feb 2013 16:38:32 +0000 (16:38 +0000)]
Make pass name more precise and fix comment.

llvm-svn: 175525

11 years agoMinor test runner improvemenst
Daniel Malea [Tue, 19 Feb 2013 16:08:57 +0000 (16:08 +0000)]
Minor test runner improvemenst
- rework the way SBDebugger.SetAsync() is used to avoid side effects (reset original value at TearDownHook)
- refactor expectedFailureClang (and add expectedFailureGcc decorator)
- mark TestChangeValueAPI.py as expectedFailureGcc due to PR-15039

llvm-svn: 175523

11 years agoUpdate TestVBool Makefile to allow building test program with gcc
Daniel Malea [Tue, 19 Feb 2013 15:53:47 +0000 (15:53 +0000)]
Update TestVBool Makefile to allow building test program with gcc
- do not pass (incompatible option) -stdlib=libstdc++ option if using GCC as test compiler

llvm-svn: 175522

11 years agoUpdate Makefile to use build-compiler (CC) for LLDB testing
Daniel Malea [Tue, 19 Feb 2013 15:48:37 +0000 (15:48 +0000)]
Update Makefile to use build-compiler (CC) for LLDB testing
- Should allow tests to run without 'clang' installed

llvm-svn: 175521

11 years agoARM NEON: Merge a f32 bitcast of a v2i32 extractelt
Arnold Schwaighofer [Tue, 19 Feb 2013 15:27:05 +0000 (15:27 +0000)]
ARM NEON: Merge a f32 bitcast of a v2i32 extractelt

A vectorized sitfp on doubles will get scalarized to a sequence of an
extract_element of <2 x i32>, a bitcast to f32 and a sitofp.
Due to the the extract_element, and the bitcast we will uneccessarily generate
moves between scalar and vector registers.

The patch fixes this by using a COPY_TO_REGCLASS and a EXTRACT_SUBREG to extract
the element from the vector instead.

radar://13191881

llvm-svn: 175520

11 years agoR600: Add AR_X to the R600_TReg_X register class.
Tom Stellard [Tue, 19 Feb 2013 15:22:47 +0000 (15:22 +0000)]
R600: Add AR_X to the R600_TReg_X register class.

NOTE: This is a candidate for the Mesa stable branch.
llvm-svn: 175519

11 years agoR600: Mark all members of the TRegMem register class as reserved
Tom Stellard [Tue, 19 Feb 2013 15:22:45 +0000 (15:22 +0000)]
R600: Mark all members of the TRegMem register class as reserved

This stops the Machine Verifier from complaining about uses of undefined
physical registers.

NOTE: This is a candidate for the Mesa stable branch.
llvm-svn: 175518

11 years agoR600: Fix scheduler crash caused by invalid MachinePointerInfo
Tom Stellard [Tue, 19 Feb 2013 15:22:44 +0000 (15:22 +0000)]
R600: Fix scheduler crash caused by invalid MachinePointerInfo

Kernel function arguments are lowered to loads from the PARAM_I address
space.  When creating these load instructions, we were initializing
their MachinePointerInfo with an Arguement object that was not attached
to any function.  This was causing the MachineScheduler to crash when
it tried to access the parent of the Arguement.

This has been fixed by initializing the MachinePointerInfo with a
UndefValue instead.

NOTE: This is a candidate for the Mesa stable branch.
llvm-svn: 175517

11 years agoR600: Fix tracking of implicit defs in the IndirectAddressing pass
Tom Stellard [Tue, 19 Feb 2013 15:22:42 +0000 (15:22 +0000)]
R600: Fix tracking of implicit defs in the IndirectAddressing pass

In some cases, we were losing track of live implicit registers which
was creating dead defs and causing the scheduler to produce invalid
code.

NOTE: This is a candidate for the Mesa stable branch.
llvm-svn: 175516

11 years ago[sanitizer] Fix FileOps test on Android.
Evgeniy Stepanov [Tue, 19 Feb 2013 15:01:05 +0000 (15:01 +0000)]
[sanitizer] Fix FileOps test on Android.

llvm-svn: 175515

11 years ago[asan] don't run the long double test if long double is the same as double
Kostya Serebryany [Tue, 19 Feb 2013 13:43:44 +0000 (13:43 +0000)]
[asan] don't run the long double test if long double is the same as double

llvm-svn: 175514

11 years ago[sanitizer] Slightly lower allocator test memory consumption.
Evgeniy Stepanov [Tue, 19 Feb 2013 13:38:27 +0000 (13:38 +0000)]
[sanitizer] Slightly lower allocator test memory consumption.

This way it fits on a random 1G device.

llvm-svn: 175513

11 years ago[ASan] Allow ASan default runtime options be overriden at compile time by providing...
Alexey Samsonov [Tue, 19 Feb 2013 13:14:48 +0000 (13:14 +0000)]
[ASan] Allow ASan default runtime options be overriden at compile time by providing ASAN_DEFAULT_OPTIONS macro

llvm-svn: 175512

11 years ago[Sanitizer] Allow runtime flags be separated by colon as well as space
Alexey Samsonov [Tue, 19 Feb 2013 13:03:37 +0000 (13:03 +0000)]
[Sanitizer] Allow runtime flags be separated by colon as well as space

llvm-svn: 175511

11 years ago[msan] Use slow stack unwinder in UMR reports.
Evgeniy Stepanov [Tue, 19 Feb 2013 12:43:18 +0000 (12:43 +0000)]
[msan] Use slow stack unwinder in UMR reports.

llvm-svn: 175510

11 years agoFix initialization-order bug in llvm::Support::TimeValue. TimeValue::now() is explici...
Alexey Samsonov [Tue, 19 Feb 2013 11:35:39 +0000 (11:35 +0000)]
Fix initialization-order bug in llvm::Support::TimeValue. TimeValue::now() is explicitly called during module initialization of lib/Support/Process.cpp. It reads the field of global object PosixZeroTime, which is not guaranteed to be initialized at this point. Found by AddressSanitizer with -fsanitize=init-order option.

llvm-svn: 175509

11 years ago[asan] instrument memory accesses with unusual sizes
Kostya Serebryany [Tue, 19 Feb 2013 11:30:25 +0000 (11:30 +0000)]
[asan] instrument memory accesses with unusual sizes
This patch makes asan instrument memory accesses with unusual sizes (e.g. 5 bytes or 10 bytes), e.g. long double or
packed structures.
Instrumentation is done with two 1-byte checks
(first and last bytes) and if the error is found
__asan_report_load_n(addr, real_size) or
__asan_report_store_n(addr, real_size)
is called.

asan-rt part

Also fix lint.

llvm-svn: 175508

11 years ago[asan] instrument memory accesses with unusual sizes
Kostya Serebryany [Tue, 19 Feb 2013 11:29:21 +0000 (11:29 +0000)]
[asan] instrument memory accesses with unusual sizes

This patch makes asan instrument memory accesses with unusual sizes (e.g. 5 bytes or 10 bytes), e.g. long double or
packed structures.
Instrumentation is done with two 1-byte checks
(first and last bytes) and if the error is found
__asan_report_load_n(addr, real_size) or
__asan_report_store_n(addr, real_size)
is called.

Also, call these two new functions in memset/memcpy
instrumentation.

asan-rt part will follow.

llvm-svn: 175507

11 years agoFix a bug in mutex_try_to_lock. This was previously trying to unlock a mutex that...
David Chisnall [Tue, 19 Feb 2013 11:28:45 +0000 (11:28 +0000)]
Fix a bug in mutex_try_to_lock.  This was previously trying to unlock a mutex that it didn't own, causing an assertion failure in mutex.cpp.  The issue was that the unique_lock went out of scope, releasing the lock on m, then m.unlock() was called on an already-unlocked mutex.

This change removes the spurious m.unlock() call.

If this test was previously passing for anyone with assertions enabled, then they should investigate bugs in their pthread implementation, as pthread_unlock() should not return 0 if the mutex is currently unlocked.

llvm-svn: 175506

11 years ago[Sanitizer] If -fsanitize-blacklist= option is not explicitly specified, make Clang...
Alexey Samsonov [Tue, 19 Feb 2013 11:25:29 +0000 (11:25 +0000)]
[Sanitizer] If -fsanitize-blacklist= option is not explicitly specified, make Clang look for the default sanitizer-specific blacklist in the resource directory.

llvm-svn: 175505

11 years ago[msan] Fix ReExec on linux.
Evgeniy Stepanov [Tue, 19 Feb 2013 11:09:29 +0000 (11:09 +0000)]
[msan] Fix ReExec on linux.

execle(argv[0], ...) is wrong, because argv[0] may contain a PATH-resolvable
program name. Execute /proc/self/exe instead.

llvm-svn: 175504

11 years ago[sanitizer] Fix Android build.
Evgeniy Stepanov [Tue, 19 Feb 2013 11:06:41 +0000 (11:06 +0000)]
[sanitizer] Fix Android build.

llvm-svn: 175503

11 years agoAdd the missing 'static' keyword to the test
Timur Iskhodzhanov [Tue, 19 Feb 2013 10:50:44 +0000 (10:50 +0000)]
Add the missing 'static' keyword to the test

llvm-svn: 175502

11 years agoSimplify code. No functionality change.
Jakub Staszak [Tue, 19 Feb 2013 09:48:30 +0000 (09:48 +0000)]
Simplify code. No functionality change.

llvm-svn: 175501

11 years agoFix bug in LineState comparison function.
Daniel Jasper [Tue, 19 Feb 2013 09:28:55 +0000 (09:28 +0000)]
Fix bug in LineState comparison function.

The key bug was

  if (Other.StartOfLineLevel < StartOfLineLevel) ..

instead of

  if (Other.StartOfLineLevel != StartOfLineLevel) ..

Also cleaned up the function to be more consistent in the comparisons.

llvm-svn: 175500

11 years ago[sanitizer] Add interceptors for localtime and friends.
Evgeniy Stepanov [Tue, 19 Feb 2013 09:19:16 +0000 (09:19 +0000)]
[sanitizer] Add interceptors for localtime and friends.

llvm-svn: 175499

11 years ago[tsan] use our own GetEnv instead of libc's getenv
Kostya Serebryany [Tue, 19 Feb 2013 08:19:13 +0000 (08:19 +0000)]
[tsan] use our own GetEnv instead of libc's getenv

llvm-svn: 175498

11 years agoFix capitalization in comment to match function name.
Craig Topper [Tue, 19 Feb 2013 07:43:59 +0000 (07:43 +0000)]
Fix capitalization in comment to match function name.

llvm-svn: 175497

11 years agoFix a case where a kext module was being added to the Target
Jason Molenda [Tue, 19 Feb 2013 07:41:13 +0000 (07:41 +0000)]
Fix a case where a kext module was being added to the Target
twice.

llvm-svn: 175496

11 years agoChange the order that the DarwinKernel DynamicLoader plugin uses
Jason Molenda [Tue, 19 Feb 2013 07:16:22 +0000 (07:16 +0000)]
Change the order that the DarwinKernel DynamicLoader plugin uses
to search for kexts on the local system -- the ModuleList FindModule()
method is the best first attempt, only call
Symbols::DownloadObjectAndSymbolFile() if that has failed and this
is the kernel binary which really needs to have its symbols located.

<rdar://problem/13241893>

llvm-svn: 175495

11 years agoExperiment with printing a warning message when lldb is unable to
Jason Molenda [Tue, 19 Feb 2013 06:39:56 +0000 (06:39 +0000)]
Experiment with printing a warning message when lldb is unable to
find a binary on the debugger-host during a kernel debug session
for a kernel extension (kext).  This may prove to be too verbose
in typical usage, particularly if there are many third-party kexts.
We'll try this and see how it works.

<rdar://problem/13080833>

llvm-svn: 175494

11 years agoGrammar.
Eric Christopher [Tue, 19 Feb 2013 06:23:44 +0000 (06:23 +0000)]
Grammar.

llvm-svn: 175493

11 years agoMore grammar.
Eric Christopher [Tue, 19 Feb 2013 06:16:53 +0000 (06:16 +0000)]
More grammar.

llvm-svn: 175492

11 years agoAlways print the kernel UUID and load address if we are working with
Jason Molenda [Tue, 19 Feb 2013 06:11:13 +0000 (06:11 +0000)]
Always print the kernel UUID and load address if we are working with
a kernel binary - even if we can't find the symbol-rich binary or
dSYM on the debugger-system.  Print a warning if the symbol-rich binary
cannot be located.  This more closely emulates the gdb behavior when
a kernel debug session failed to locate a kernel binary.

<rdar://problem/13016095>

llvm-svn: 175491

11 years agoMore const correcting of stack coloring.
Craig Topper [Tue, 19 Feb 2013 06:02:40 +0000 (06:02 +0000)]
More const correcting of stack coloring.

llvm-svn: 175490

11 years agoChange the DarwinKernel DyanmicLoader to maintain a persist list
Jason Molenda [Tue, 19 Feb 2013 05:42:46 +0000 (05:42 +0000)]
Change the DarwinKernel DyanmicLoader to maintain a persist list
of kernel extensions (kexts) that have been loaded into the kernel.
Now when we hit the "kexts have changed" breakpoint we can avoid
adding kexts multiple times, and can properly detect kext unloads
and remove them from the Target's list of modules.

<rdar://problem/13107639>
<rdar://problem/13191016>

llvm-svn: 175489

11 years agoConst-correct the stack coloring code.
Craig Topper [Tue, 19 Feb 2013 05:32:02 +0000 (05:32 +0000)]
Const-correct the stack coloring code.

llvm-svn: 175488

11 years agoAvoid extra DenseMap lookups in StackColoring::calculateLocalLiveness.
Craig Topper [Tue, 19 Feb 2013 04:47:31 +0000 (04:47 +0000)]
Avoid extra DenseMap lookups in StackColoring::calculateLocalLiveness.

llvm-svn: 175487

11 years agoExpand pseudos/macros BteqzT8SltiX16, BteqzT8SltiuX16,
Reed Kotler [Tue, 19 Feb 2013 03:56:57 +0000 (03:56 +0000)]
Expand pseudos/macros BteqzT8SltiX16, BteqzT8SltiuX16,
BtnezT8SltiX16, BtnezT8SltiuX16 .

llvm-svn: 175486

11 years agoMake the dump() function const and reduce the number of hash lookups it performs.
Craig Topper [Tue, 19 Feb 2013 03:14:22 +0000 (03:14 +0000)]
Make the dump() function const and reduce the number of hash lookups it performs.

llvm-svn: 175485

11 years agoUse a reference into the BlockLiveness DenseMap to avoid repeated hash lookups in...
Craig Topper [Tue, 19 Feb 2013 03:06:17 +0000 (03:06 +0000)]
Use a reference into the BlockLiveness DenseMap to avoid repeated hash lookups in collectMarkers.

llvm-svn: 175484

11 years agoFixing a typo where FixIts was accidentally self-assigning instead of assigning in...
Aaron Ballman [Tue, 19 Feb 2013 02:32:05 +0000 (02:32 +0000)]
Fixing a typo where FixIts was accidentally self-assigning instead of assigning in the parameter Fixits. This fixes several failed assertions with MSVC debug builds.

llvm-svn: 175483

11 years agoRemove some unused private fields from the AArch64MCCodeEmitter. These
Chandler Carruth [Tue, 19 Feb 2013 02:08:14 +0000 (02:08 +0000)]
Remove some unused private fields from the AArch64MCCodeEmitter. These
fields were only ever set in the constructor. The create method retains
its consistent interface so that these bits can be re-threaded through
the emitter if they're ever needed.

This was found by the -Wunused-private-field Clang warning.

llvm-svn: 175482

11 years agoSwitch a vector<pair<const T &, const U &>> to a vector<pair<const T *,
Chandler Carruth [Tue, 19 Feb 2013 01:58:11 +0000 (01:58 +0000)]
Switch a vector<pair<const T &, const U &>> to a vector<pair<const T *,
const U *>>. Even in C++11 it doesn't seem this is valid as vector's
emplace support requires move assignment, and there is no way to move
assign a reference.

The real motivation however is that this fixes the build of lld with
libstdc++ 4.6.

llvm-svn: 175481

11 years agoAdd support for -fvisibility-ms-compat.
John McCall [Tue, 19 Feb 2013 01:57:35 +0000 (01:57 +0000)]
Add support for -fvisibility-ms-compat.

We treat this as an alternative to -fvisibility=<?>
which changes the default value visibility to "hidden"
and the default type visibility to "default".

Expose a -cc1 option for changing the default type
visibility, repurposing -fvisibility as the default
value visibility option (also setting type visibility
from it in the absence of a specific option).

rdar://13079314

llvm-svn: 175480

11 years agoUse the actual class visibility for the ObjC EHTYPE global,
John McCall [Tue, 19 Feb 2013 01:57:29 +0000 (01:57 +0000)]
Use the actual class visibility for the ObjC EHTYPE global,
not the global visibility mode.

Noticed by inspection.

llvm-svn: 175479

11 years agoFixing the lack of a space in an expression that was causing sheer unhappiness.
Enrico Granata [Tue, 19 Feb 2013 01:14:06 +0000 (01:14 +0000)]
Fixing the lack of a space in an expression that was causing sheer unhappiness.

llvm-svn: 175478

11 years agoTemporarily revert r175471 for more review.
Bill Wendling [Tue, 19 Feb 2013 00:53:07 +0000 (00:53 +0000)]
Temporarily revert r175471 for more review.

llvm-svn: 175477

11 years agoTemporarily revert r175470 for more review.
Bill Wendling [Tue, 19 Feb 2013 00:52:45 +0000 (00:52 +0000)]
Temporarily revert r175470 for more review.

llvm-svn: 175476

11 years agoNSWindows should only be created after you have an NSApplication
Enrico Granata [Tue, 19 Feb 2013 00:39:59 +0000 (00:39 +0000)]
NSWindows should only be created after you have an NSApplication

llvm-svn: 175475

11 years agoExpand pseudos BteqzT8CmpiX16 and BtnezT8CmpiX16.
Reed Kotler [Tue, 19 Feb 2013 00:20:58 +0000 (00:20 +0000)]
Expand pseudos BteqzT8CmpiX16 and BtnezT8CmpiX16.

llvm-svn: 175474

11 years agoUse array_pod_sort instead of std::sort.
Jakub Staszak [Mon, 18 Feb 2013 23:18:22 +0000 (23:18 +0000)]
Use array_pod_sort instead of std::sort.

llvm-svn: 175472

11 years agoAdd a 'no-builtin' attribute if we do not want to simplify calls.
Bill Wendling [Mon, 18 Feb 2013 23:17:48 +0000 (23:17 +0000)]
Add a 'no-builtin' attribute if we do not want to simplify calls.

llvm-svn: 175471

11 years agoCheck to see if the 'no-builtin' attribute is set before simplifying a library call.
Bill Wendling [Mon, 18 Feb 2013 23:17:16 +0000 (23:17 +0000)]
Check to see if the 'no-builtin' attribute is set before simplifying a library call.

llvm-svn: 175470

11 years agoAdd some convenience methods for querying function attributes.
Bill Wendling [Mon, 18 Feb 2013 23:16:42 +0000 (23:16 +0000)]
Add some convenience methods for querying function attributes.

llvm-svn: 175469

11 years ago<rdar://problem/12529957>
Enrico Granata [Mon, 18 Feb 2013 23:16:23 +0000 (23:16 +0000)]
<rdar://problem/12529957>

Synthetic children provider for NSSet

llvm-svn: 175468

11 years agoX86FrameLowering.cpp: Fixup. Sorry for the breakage.
NAKAMURA Takumi [Mon, 18 Feb 2013 23:15:21 +0000 (23:15 +0000)]
X86FrameLowering.cpp: Fixup. Sorry for the breakage.

llvm-svn: 175467

11 years agoUse LLVM_DELETED_FUNCTION rather than '// do not implement' comments.
David Blaikie [Mon, 18 Feb 2013 23:11:17 +0000 (23:11 +0000)]
Use LLVM_DELETED_FUNCTION rather than '// do not implement' comments.

Also removes some redundant DNI comments on function declarations already
using the macro.

llvm-svn: 175466

11 years agoUse LLVM_DELETED_FUNCTION rather than '// do not implement' comments.
David Blaikie [Mon, 18 Feb 2013 23:11:09 +0000 (23:11 +0000)]
Use LLVM_DELETED_FUNCTION rather than '// do not implement' comments.

Also removes some redundant DNI comments on function declarations already
using the macro.

llvm-svn: 175465

11 years agoX86FrameLowering.cpp: Fix a warning in -Asserts. [-Wunused-variable]
NAKAMURA Takumi [Mon, 18 Feb 2013 23:08:49 +0000 (23:08 +0000)]
X86FrameLowering.cpp: Fix a warning in -Asserts. [-Wunused-variable]

llvm-svn: 175464

11 years agoRemove a useless assert.
Chad Rosier [Mon, 18 Feb 2013 22:20:16 +0000 (22:20 +0000)]
Remove a useless assert.

llvm-svn: 175463

11 years agoReplace TypeLoc llvm::cast support to be well-defined.
David Blaikie [Mon, 18 Feb 2013 22:06:02 +0000 (22:06 +0000)]
Replace TypeLoc llvm::cast support to be well-defined.

The TypeLoc hierarchy used the llvm::cast machinery to perform undefined
behavior by casting pointers/references to TypeLoc objects to derived types
and then using the derived copy constructors (or even returning pointers to
derived types that actually point to the original TypeLoc object).

Some context is in this thread:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-December/056804.html
Though it's spread over a few months which can be hard to read in the mail
archive.

llvm-svn: 175462

11 years agoComment out the rdar number.
Chad Rosier [Mon, 18 Feb 2013 21:59:15 +0000 (21:59 +0000)]
Comment out the rdar number.

llvm-svn: 175460

11 years ago[fast-isel] Remove an invalid assert.
Chad Rosier [Mon, 18 Feb 2013 21:46:28 +0000 (21:46 +0000)]
[fast-isel] Remove an invalid assert.

If the memcpy has an odd length with an alignment of 2, this would incorrectly
assert on the last 1 byte copy.
rdar://13202135

llvm-svn: 175459

11 years agoFix a 32/64 bit incompatibility in the HiPE prologue generation.
Benjamin Kramer [Mon, 18 Feb 2013 21:45:01 +0000 (21:45 +0000)]
Fix a 32/64 bit incompatibility in the HiPE prologue generation.

llvm-svn: 175458

11 years agoSupport for HiPE-compatible code emission, patch by Yiannis Tsiouris.
Benjamin Kramer [Mon, 18 Feb 2013 20:55:12 +0000 (20:55 +0000)]
Support for HiPE-compatible code emission, patch by Yiannis Tsiouris.

llvm-svn: 175457

11 years ago[ms-inline asm] Remove a redundant call to the setHasMSInlineAsm function.
Chad Rosier [Mon, 18 Feb 2013 20:13:59 +0000 (20:13 +0000)]
[ms-inline asm] Remove a redundant call to the setHasMSInlineAsm function.

llvm-svn: 175456

11 years agolibclang: don't store nul-terminated strings as StringRefs,
Dmitri Gribenko [Mon, 18 Feb 2013 19:50:38 +0000 (19:50 +0000)]
libclang: don't store nul-terminated strings as StringRefs,
if the nul-terminatedness property is important for clients.

Also, don't return the same CXString multiple times.  This did not create a
correctness issue in practice because the CXString was of an CXS_Unmanaged
kind, and destruction was a no-op.

llvm-svn: 175455

11 years agoClean up last use of dyn_cast on TypeLoc in ASTMatchers
David Blaikie [Mon, 18 Feb 2013 19:04:16 +0000 (19:04 +0000)]
Clean up last use of dyn_cast on TypeLoc in ASTMatchers

llvm-svn: 175454

11 years agoTest for my last patch. // rdar://13178483
Fariborz Jahanian [Mon, 18 Feb 2013 19:02:44 +0000 (19:02 +0000)]
Test for my last patch. // rdar://13178483

llvm-svn: 175453

11 years agoUse llvm::cast instead of reinterpret_cast.
Jakub Staszak [Mon, 18 Feb 2013 18:49:44 +0000 (18:49 +0000)]
Use llvm::cast instead of reinterpret_cast.
Also, GetElementPtrInst::getType() method returns SequentialType now, instead of
PointerType. There wasn't any issue yet, so no testcase attached.

llvm-svn: 175452

11 years agoAdd include guards for CommentVisitor.h
Argyrios Kyrtzidis [Mon, 18 Feb 2013 18:31:16 +0000 (18:31 +0000)]
Add include guards for CommentVisitor.h

llvm-svn: 175451

11 years agoPrevent crash on multiple user errors (which I cannot reproduce in
Fariborz Jahanian [Mon, 18 Feb 2013 17:22:23 +0000 (17:22 +0000)]
Prevent crash on multiple user errors (which I cannot reproduce in
a small test case). // rdar://13178483.

llvm-svn: 175450

11 years agoAdd front/back/erase to MapVector.
Douglas Gregor [Mon, 18 Feb 2013 16:03:04 +0000 (16:03 +0000)]
Add front/back/erase to MapVector.

llvm-svn: 175449

11 years agoCodeGenFunction::CurFuncDecl can be NULL; fix crash introduced in r175386.
Douglas Gregor [Mon, 18 Feb 2013 15:59:24 +0000 (15:59 +0000)]
CodeGenFunction::CurFuncDecl can be NULL; fix crash introduced in r175386.

llvm-svn: 175448

11 years agoEnsure that the identifier chains have the most recent declaration after module deser...
Douglas Gregor [Mon, 18 Feb 2013 15:53:43 +0000 (15:53 +0000)]
Ensure that the identifier chains have the most recent declaration after module deserialization.

This commit introduces a set of related changes to ensure that the
declaration that shows up in the identifier chain after deserializing
declarations with a given identifier is, in fact, the most recent
declaration. The primary change involves waiting until after we
deserialize and wire up redeclaration chains before updating the
identifier chains. There is a minor optimization in here to avoid
recursively deserializing names as part of looking to see whether
top-level declarations for a given name exist.

A related change that became suddenly more urgent is to property
record a merged declaration when an entity first declared in the
current translation unit is later deserialized from a module (that had
not been loaded at the time of the original declaration). Since we key
off the canonical declaration (which is parsed, not from an AST file)
for emitted redeclarations, we simply record this as a merged
declaration during AST writing and let the readers merge them.

Re-fixes <rdar://problem/13189985>, presumably for good this time.

llvm-svn: 175447

11 years agoR600/SI: Use MULADD_IEEE/V_MAD_F32 instruction for mad pattern
Vincent Lejeune [Mon, 18 Feb 2013 14:11:28 +0000 (14:11 +0000)]
R600/SI: Use MULADD_IEEE/V_MAD_F32 instruction for mad pattern

llvm-svn: 175446

11 years agoR600: Support for TBO
Vincent Lejeune [Mon, 18 Feb 2013 14:11:19 +0000 (14:11 +0000)]
R600: Support for TBO

NOTE: This is a candidate for the Mesa stable branch.

Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
llvm-svn: 175445