Commit Graph

151711 Commits

Author SHA1 Message Date
JF Bastien e84854a125 Small correction to unordered memory code generation of ARM LDRD
The information was correct pre-LPAE.

llvm-svn: 184253
2013-06-18 23:07:16 +00:00
Adrian Prantl c1a3fe7f9b Emit forward decls for structs with declarations only when we are
limiting debug info.

FIXME: There is still work left to do here, the testcase should work even with -flimit-debug-info.

rdar://problem/14101097

llvm-svn: 184252
2013-06-18 23:01:56 +00:00
Greg Clayton f02500c74c Added the ability to get a list of types from a SBModule or SBCompileUnit. Sebastien Metrot wanted this, and sent a hollowed out patch. I filled in the blanks and did the low level implementation. The new functions are:
//------------------------------------------------------------------
/// Get all types matching \a type_mask from debug info in this
/// module.
///
/// @param[in] type_mask
///     A bitfield that consists of one or more bits logically OR'ed
///     together from the lldb::TypeClass enumeration. This allows
///     you to request only structure types, or only class, struct
///     and union types. Passing in lldb::eTypeClassAny will return
///     all types found in the debug information for this module.
///
/// @return
///     A list of types in this module that match \a type_mask
//------------------------------------------------------------------
lldb::SBTypeList
SBModule::GetTypes (uint32_t type_mask)


//------------------------------------------------------------------
/// Get all types matching \a type_mask from debug info in this
/// compile unit.
///
/// @param[in] type_mask
///    A bitfield that consists of one or more bits logically OR'ed
///    together from the lldb::TypeClass enumeration. This allows
///    you to request only structure types, or only class, struct
///    and union types. Passing in lldb::eTypeClassAny will return
///    all types found in the debug information for this compile
///    unit.
///
/// @return
///    A list of types in this compile unit that match \a type_mask
//------------------------------------------------------------------
lldb::SBTypeList
SBCompileUnit::GetTypes (uint32_t type_mask = lldb::eTypeClassAny);

This lets you request types by filling out a mask that contains one or more bits from the lldb::TypeClass enumerations, so you can only get the types you really want.

llvm-svn: 184251
2013-06-18 22:51:05 +00:00
Eli Friedman 5f508953bc Introduce a new mangling for protocol-qualified ObjC types in C++. This allows
to provide proper overloading, and also prevents mangling conflicts with
template arguments of protocol-qualified type.

This is a non-backward-compatible mangling change, but per discussion with
John, the benefits outweigh this cost.

Fixes <rdar://problem/14074822>.

llvm-svn: 184250
2013-06-18 22:41:37 +00:00
Fariborz Jahanian 5222608310 doc. parsing: Allow parameter name "..." for variadic functions/methods.
// rdar://14124644

llvm-svn: 184249
2013-06-18 22:40:39 +00:00
Enrico Granata a2e7f9ab2b <rdar://problem/14194128>
ClangASTContext was failing to retrieve fields and base class info for ObjC variables
This checkin fixes that and adds a test case

llvm-svn: 184248
2013-06-18 22:40:36 +00:00
Bill Wendling 07ac471914 Identify me on IRC.
llvm-svn: 184247
2013-06-18 22:09:36 +00:00
Matt Kopec 246a89562c Add assertion for when no watchpoint found in POSIX watchnotify handler.
Also, ensure x86_64 watchpoint registers are initialized before they are accessed on the POSIX side.

llvm-svn: 184246
2013-06-18 21:58:02 +00:00
Jim Ingham c64623179b We were getting an assert because somebody was making a watchpoint that was
neither read nor write.  Tighten up the checking so this isn't possible.

<rdar://problem/14111167>

llvm-svn: 184245
2013-06-18 21:52:48 +00:00
Jim Grosbach a6ed57d8dd ARM: Add optional datatype suffix to NEON mvn asm syntax.
rdar://14194152

llvm-svn: 184244
2013-06-18 21:49:21 +00:00
Jim Ingham 8c8c6fab4c Make the lldb "Release" configuration use the same llvm build "Release+Asserts" as the lldb "Debug" configuration.
No need to rebuild llvm and remove asserts to build the local optimized lldb.

llvm-svn: 184243
2013-06-18 21:44:59 +00:00
Sean Silva c3131926c0 [yaml2obj][ELF] Add dummy .strtab section.
This will be needed later for holding symbol names, due to the libObject
issue mentioned in the commit message of r184161.

llvm-svn: 184242
2013-06-18 21:37:50 +00:00
Matt Kopec 362f503519 Temporarily disable checking of watchpoint hit on FreeBSD on trace message.
Patch from Ed Maste.

llvm-svn: 184241
2013-06-18 21:35:32 +00:00
Eli Friedman cdf8b88285 Make sure the assembler-with-cpp hack for "#" works with multiple "#"s in
succession. Fixes PR16363.

llvm-svn: 184240
2013-06-18 21:33:38 +00:00
Bill Wendling 1470e2077a We want a string representation of the attribute, not the kind as a string.
llvm-svn: 184239
2013-06-18 21:27:00 +00:00
Argyrios Kyrtzidis dd7106375c When declaring an ObjC interface decl with a @compatibility_alias alias name, change the class name to the "real" one.
If we have something like

  @class NewImage;
  @compatibility_alias OldImage NewImage;
  @class OldImage;

the lookup for 'OldImage' will return the 'NewImage' decl ("@class NewImage").
In such a case, when creating the decl for "@class OldImage" use the real declaration name ("NewImage"),
instead of the alias one ("OldImage"), otherwise we will break IdentifierResolver and redecls-chain invariants.

Fixes crash of rdar://14112291.

llvm-svn: 184238
2013-06-18 21:26:33 +00:00
Jason Molenda a721731fdd PlatformDarwinKernel was treating its file path arg as a kext bundle id -- but when the user
did a manual "target modules add", it would be a file path.  If the kext bundle lookup fails,
fall back to calling PlatformDarwin's GetSharedModule which will handle a file path correctly.
<rdar://problem/14179858> 

llvm-svn: 184237
2013-06-18 21:23:14 +00:00
Tim Northover 1806f938b5 AArch64: remove accidental test output file.
llvm-svn: 184236
2013-06-18 21:16:53 +00:00
Rafael Espindola 2bf893664b Remove Path::canWrite.
llvm-svn: 184235
2013-06-18 21:10:03 +00:00
Rafael Espindola fc92e84586 Use llvm::sys::fs::can_write.
llvm-svn: 184234
2013-06-18 20:58:25 +00:00
Rafael Espindola a1280c16fb Add a can_write function to PathV2.
llvm-svn: 184233
2013-06-18 20:56:38 +00:00
Stephen Lin 8f99e9413f Partially revert r184225 test changes and make a smaller and more generic fix.
llvm-svn: 184232
2013-06-18 20:51:51 +00:00
Michael Gottesman 696e44efd4 [ARMTargetLowering] ARMISD::{SUB,ADD}{C,E} second result is a boolean implying that upper bits are always 0.
llvm-svn: 184231
2013-06-18 20:49:45 +00:00
Michael Gottesman b2a70564a7 Converted an overly aggressive assert to a conditional check in AddCombineTo64bitMLAL.
Said assert assumes that ADDC will always have a glue node as its second
argument and is checked before we even know that we are actually performing the
relevant MLAL optimization. This is incorrect since on ARM we *CAN* codegen ADDC
with a use list based second argument. Thus to have both effects, I converted
the assert to a conditional check which if it fails we do not perform the
optimization.

In terms of tests I can not produce an ADDC from the IR level until I get in my
multiprecision optimization patch which is forthcoming. The tests for said patch
would cause this assert to fail implying that said tests will provide the
relevant tests.

llvm-svn: 184230
2013-06-18 20:49:40 +00:00
Rafael Espindola 3025f2366f Remove unused Path::canRead.
llvm-svn: 184229
2013-06-18 20:42:25 +00:00
Nadav Rotem 7d6c625235 Fix 80 col violation.
llvm-svn: 184228
2013-06-18 20:41:52 +00:00
Michael Gottesman 1534399059 [multiprecision-builtins] Added missing builtin __builtin_{add,sub}cb for {add,sub} with carry for bytes.
I have had several people ask me about why this builtin was not available in
clang (since it seems like a logical conclusion). This patch implements said
builtins.

Relevant tests are included as well. I also updated the Clang language extension reference.

rdar://14192664.

llvm-svn: 184227
2013-06-18 20:40:40 +00:00
Jim Ingham cc0273d784 Fix the help for "image dump line-table" - its arguments are compilation units not modules.
llvm-svn: 184226
2013-06-18 20:27:11 +00:00
Stephen Lin 6d51d86698 Fix C++ constructor/destructor tests when run on ARM
llvm-svn: 184225
2013-06-18 20:24:04 +00:00
Kevin Enderby c5d0935788 Change the arm assembler to support this from the v7c spec:
"When assembling to the ARM instruction set, the .N qualifier produces
an assembler error and the .W qualifier has no effect."

In the pre-matcher handler in the asm parser the ".w" (wide) qualifier 
when in ARM mode is now discarded. And an error message is now
produced when the ".n" (narrow) qualifier is used in ARM mode.

Test cases for these were added.

rdar://14064574

llvm-svn: 184224
2013-06-18 20:19:24 +00:00
Richard Smith 39b7968ccb DR14, DR101, and part of DR1: fix handling of extern "C" declarations in
namespaces, by treating them just like we treat extern "C" declarations in
function scope.

llvm-svn: 184223
2013-06-18 20:15:12 +00:00
Quentin Colombet b51a68681a During SelectionDAG building explicitly set a node to constant zero when the
value is zero.
This allows optmizations to kick in more easily.
Fix some test cases so that they remain meaningful (i.e., not completely dead
coded) when optimizations apply.

<rdar://problem/14096009> superfluous multiply by high part of zero-extended
value.

llvm-svn: 184222
2013-06-18 20:14:39 +00:00
John Thompson 54c83695f7 Fixed a typo and naming convention.
llvm-svn: 184221
2013-06-18 19:56:05 +00:00
Jack Carter f9f753c2ea Mips ELF: Mark object file as ABI compliant
When producing objects that are abi compliant we are 
marking neither the object file nor the assembly file
correctly and thus generate warnings. 

We need to set the EF_CPIC flag in the ELF header when
generating direct object.

Note that the warning is only generated when compiling without PIC.

When compiling with clang the warning will be suppressed by supplying:

 -Wa,-mno-shared -Wa,-call_nonpic

Also the following directive should also be added:

	.option	pic0

when compiling without PIC,  This eliminates the need for supplying:

  -mno-shared -call_nonpic

on the assembler command line.

Patch by Douglas Gilmore

llvm-svn: 184220
2013-06-18 19:47:15 +00:00
Rafael Espindola 8f181a5406 Remove uniqueID from PathV1.h.
llvm-svn: 184219
2013-06-18 19:46:19 +00:00
Rafael Espindola f9e9bb8858 Use llvm::sys::fs::GetUniqueID.
llvm-svn: 184218
2013-06-18 19:40:07 +00:00
Rafael Espindola 45e6c2406d Add a GetUniqueID that will replace the uniqueID of PathV1.h.
llvm-svn: 184217
2013-06-18 19:34:49 +00:00
Adrian Prantl 5eeaf7402b Fix a missing pointer deref that was uncovered by one of the buildbots.
llvm-svn: 184216
2013-06-18 18:24:04 +00:00
Enrico Granata 68ae4117d9 <rdar://problem/12717717>
Modifying our data formatters matching algorithm to ensure that "const X*" is treated as equivalent to "X*"
Also, a couple improvements to the "lldb types" logging

llvm-svn: 184215
2013-06-18 18:23:07 +00:00
Eli Friedman 0e5d677fc3 Correctly compute the index of the first string format argument when deciding
whether to emit a -Wformat-security warning.  <rdar://problem/14178260>.

llvm-svn: 184214
2013-06-18 18:10:01 +00:00
David Blaikie 141b2acb9d Reduce indentation.
llvm-svn: 184213
2013-06-18 18:03:17 +00:00
Enrico Granata 5342c4409b This patch fixes the issue where our command-line tab completer would sometimes replicate commands
e.g.

(lldb) pl<TAB>
Available completions:
	platform
	plugin
	platform
	plugin

Thanks to Matthew Sorrels for doing work and testing on this issue

llvm-svn: 184212
2013-06-18 18:01:08 +00:00
Richard Smith 1a90f5956d PR14503: Don't assert if a constexpr constructor temploid instantiates to a
constructor that does not initialize all members, and that constructor is used
to initialize a global.

llvm-svn: 184211
2013-06-18 17:51:51 +00:00
Rafael Espindola 8ffbac96a8 Convert most uses of PathV1.h in ToolRunner.cpp.
llvm-svn: 184210
2013-06-18 17:20:08 +00:00
Enrico Granata 8ca77852f4 Removing the lldb-perf file group from our Xcode project
This is in a separate project now so this duplication is unnecessary and some referenced files were also dangling after a rename

llvm-svn: 184209
2013-06-18 17:15:32 +00:00
Fariborz Jahanian 0649923b57 Objective-C: Fixes a typo correction bug where a
selector would be correted to identical selector name
in certain corner cases. // rdar://7853549

llvm-svn: 184208
2013-06-18 17:10:58 +00:00
Stefanus Du Toit 8811ad4f81 Add support for encoding the HLE XACQUIRE and XRELEASE prefixes.
For decoding, keep the current behavior of always decoding these as their REP
versions. In the future, this could be improved to recognize the cases where
these behave as XACQUIRE and XRELEASE and decode them as such.

llvm-svn: 184207
2013-06-18 17:08:10 +00:00
Rafael Espindola 4526b1d410 Add a version of unique_file that return just the file name.
llvm-svn: 184206
2013-06-18 17:01:00 +00:00
Stephen Lin a637fb8ccd CodeGen: Have 'this'-returning constructors and destructors to take advantage of the new backend 'returned' attribute.
The backend will now use the generic 'returned' attribute to form tail calls where possible, as well as avoid save-restores of 'this' in some cases (specifically the cases that matter for the ARM C++ ABI).

This patch also reverts a prior front-end only partial implementation of these optimizations, since it's no longer required.

llvm-svn: 184205
2013-06-18 17:00:49 +00:00
Rafael Espindola c724765d52 Return a std::string from PrependMainExecutablePath.
llvm-svn: 184204
2013-06-18 16:47:55 +00:00