platform/upstream/llvm.git
11 years agoRemove an extra operand to a DIFile metadata entry
David Blaikie [Wed, 13 Mar 2013 22:33:09 +0000 (22:33 +0000)]
Remove an extra operand to a DIFile metadata entry

(extra cleanup/fallout from r176983 - not sure why I didn't catch this locally)

llvm-svn: 176988

11 years agoAttempt to fix test.
Bill Wendling [Wed, 13 Mar 2013 22:29:26 +0000 (22:29 +0000)]
Attempt to fix test.

llvm-svn: 176987

11 years agoReset some of the target options which affect code generation.
Bill Wendling [Wed, 13 Mar 2013 22:26:59 +0000 (22:26 +0000)]
Reset some of the target options which affect code generation.

This doesn't reset all of the target options within the TargetOptions
object. This is because some of those are ABI-specific and must be determined if
it's okay to change those on the fly.

llvm-svn: 176986

11 years agoHave these attriubtes set to 'true' or 'false'.
Bill Wendling [Wed, 13 Mar 2013 22:24:33 +0000 (22:24 +0000)]
Have these attriubtes set to 'true' or 'false'.

The back-end cannot differentiate between functions that are from a .ll file and
those generated from the front-end. We cannot then take the non-precense of
these attributes as a "false" value. Have the front-end explicitly set the value
to 'true' or 'false' depending upon what is actually set.

llvm-svn: 176985

11 years agoSimplify directory name handling in DILexicalBlockFile.
David Blaikie [Wed, 13 Mar 2013 22:23:51 +0000 (22:23 +0000)]
Simplify directory name handling in DILexicalBlockFile.

llvm-svn: 176984

11 years agoRemove the unused 4th operand for DIFile debug info metadata
David Blaikie [Wed, 13 Mar 2013 22:05:21 +0000 (22:05 +0000)]
Remove the unused 4th operand for DIFile debug info metadata

llvm-svn: 176983

11 years agoAdd braces to crashed test summary (needed for buildbots to detect crashes)
Daniel Malea [Wed, 13 Mar 2013 21:50:49 +0000 (21:50 +0000)]
Add braces to crashed test summary (needed for buildbots to detect crashes)

llvm-svn: 176980

11 years agoRemove extra whitespace
Daniel Malea [Wed, 13 Mar 2013 21:18:54 +0000 (21:18 +0000)]
Remove extra whitespace

llvm-svn: 176978

11 years agoMake LTO codegen use a PassManager, rather than a FunctionPassManager, for the
Lang Hames [Wed, 13 Mar 2013 21:18:46 +0000 (21:18 +0000)]
Make LTO codegen use a PassManager, rather than a FunctionPassManager, for the
codegen passes. This brings it in to line with clang and llc's codegen setup,
and tidies up the code.

If I understand correctly, adding ModulePasses to a FunctionPassManager is
bogus. It only seems to explode if an added ModulePass depends on a
FunctionPass though, which might be why this code has survived so long.

Fixes <rdar://problem/13386816>.

llvm-svn: 176977

11 years ago[Modules] Don't eagerly load and associate all the module header files.
Argyrios Kyrtzidis [Wed, 13 Mar 2013 21:13:51 +0000 (21:13 +0000)]
[Modules] Don't eagerly load and associate all the module header files.

In a module-enabled Cocoa PCH file, we spend a lot of time stat'ing the headers
in order to associate the FileEntries with their modules and support implicit
module import.

Use a more lazy scheme by enhancing HeaderInfoTable to store extra info about
the module that a header belongs to, and associate it with its module only when
there is a request for loading the header info for a particular file.

Part of rdar://13391765

llvm-svn: 176976

11 years ago[Modules] Resolve top-headers of modules lazily.
Argyrios Kyrtzidis [Wed, 13 Mar 2013 21:13:43 +0000 (21:13 +0000)]
[Modules] Resolve top-headers of modules lazily.

This allows resolving top-header filenames of modules to FileEntries when
we need them, not eagerly.

Note that that this breaks ABI for libclang functions
clang_Module_getTopLevelHeader / clang_Module_getNumTopLevelHeaders
but this is fine because they are experimental and not widely used yet.

llvm-svn: 176975

11 years agoPrepend "FAIL:" string to tests that crash so that buildbots pick them up.
Daniel Malea [Wed, 13 Mar 2013 21:08:02 +0000 (21:08 +0000)]
Prepend "FAIL:" string to tests that crash so that buildbots pick them up.

llvm-svn: 176974

11 years agoSimplify CMake rules in HandleLLVMOptions module.
Alexey Samsonov [Wed, 13 Mar 2013 20:50:23 +0000 (20:50 +0000)]
Simplify CMake rules in HandleLLVMOptions module.

Summary: No functionality change.

Reviewers: Bigcheese

Reviewed By: Bigcheese

CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D535

llvm-svn: 176973

11 years agoMinor LLDB test improvements
Daniel Malea [Wed, 13 Mar 2013 20:50:05 +0000 (20:50 +0000)]
Minor LLDB test improvements
- fix TestCPPBool (was failing with some versions of GCC due to num_breakpoint_locations)
- speed up tests by skipping git/svn revision parsing by the test harness when running in lit-compatible (parsable) mode

This should resolve the failures reported by http://lab.llvm.org:8011/builders/lldb-x86_64-linux

llvm-svn: 176972

11 years agoCause the mips16/nomips16 attribute to be passed to LLVM from Clang
Reed Kotler [Wed, 13 Mar 2013 20:40:30 +0000 (20:40 +0000)]
Cause the mips16/nomips16 attribute to be passed to LLVM from Clang
in the LLVM assembly language output.

llvm-svn: 176971

11 years ago[ELF][X86_64][Hexagon] order plt/got entries properly and fix test
Shankar Easwaran [Wed, 13 Mar 2013 20:30:11 +0000 (20:30 +0000)]
[ELF][X86_64][Hexagon] order plt/got entries properly and fix test

llvm-svn: 176970

11 years ago[analyzer] BugReporter - more precise tracking of C++ references
Anna Zaks [Wed, 13 Mar 2013 20:20:14 +0000 (20:20 +0000)]
[analyzer] BugReporter - more precise tracking of C++ references

When BugReporter tracks C++ references involved in a null pointer violation, we
want to differentiate between a null reference and a reference to a null pointer. In the
first case, we want to track the region for the reference location; in the second, we want
to track the null pointer.

In addition, the core creates CXXTempObjectRegion to represent the location of the
C++ reference, so teach FindLastStoreBRVisitor about it.

This helps null pointer suppression to kick in.

(Patch by Anna and Jordan.)

llvm-svn: 176969

11 years agoAdd some additonal attribute helper functions. Test will be on follow
Reed Kotler [Wed, 13 Mar 2013 20:20:08 +0000 (20:20 +0000)]
Add some additonal attribute helper functions. Test will be on follow
up putback to clang for mips16.

llvm-svn: 176968

11 years agoR600: Remove unused Outputs variable
Vincent Lejeune [Wed, 13 Mar 2013 20:13:25 +0000 (20:13 +0000)]
R600: Remove unused Outputs variable

llvm-svn: 176967

11 years agoRemove stray space.
Ted Kremenek [Wed, 13 Mar 2013 20:05:52 +0000 (20:05 +0000)]
Remove stray space.

llvm-svn: 176966

11 years ago[analyzer] Handle Objc Fast enumeration for "loop is executed 0 times".
Ted Kremenek [Wed, 13 Mar 2013 20:03:31 +0000 (20:03 +0000)]
[analyzer] Handle Objc Fast enumeration for "loop is executed 0 times".

Fixes <rdar://problem/12322528>

llvm-svn: 176965

11 years agoMigrate dbg-arg.ll to a C file test to be resilient to IR changes.
David Blaikie [Wed, 13 Mar 2013 18:46:28 +0000 (18:46 +0000)]
Migrate dbg-arg.ll to a C file test to be resilient to IR changes.

llvm-svn: 176964

11 years agoNo functionality change. Use unreachable in getCUOffset.
Manman Ren [Wed, 13 Mar 2013 18:41:27 +0000 (18:41 +0000)]
No functionality change. Use unreachable in getCUOffset.

llvm-svn: 176963

11 years agoNo functionality change. Use unreachable in getCompileUnit.
Manman Ren [Wed, 13 Mar 2013 18:33:41 +0000 (18:33 +0000)]
No functionality change. Use unreachable in getCompileUnit.

llvm-svn: 176962

11 years ago<rdar://problem/13404189>
Greg Clayton [Wed, 13 Mar 2013 18:25:49 +0000 (18:25 +0000)]
<rdar://problem/13404189>

Made the "--reverse" option to "source list" also be able to use the "--count". This helps us implement support for regexp source list command:

(lldb) l -10

Which gets turned into:

(lldb) source list --reverse --count 10

Also simplified the code that is used to track showing more source from the last file and line.

llvm-svn: 176961

11 years ago<rdar://problem/13396207>
Greg Clayton [Wed, 13 Mar 2013 18:23:44 +0000 (18:23 +0000)]
<rdar://problem/13396207>

Added logging that will show up in the system console when we try to resume a process that is already running, or has an unexpected state.

llvm-svn: 176960

11 years agoCheck register classes also when changing them.
Jakob Stoklund Olesen [Wed, 13 Mar 2013 18:11:17 +0000 (18:11 +0000)]
Check register classes also when changing them.

We have the same assertion in createVirtualRegister.

llvm-svn: 176959

11 years agoAdd a target setting (target.use-fast-stepping) to control using the "run to next...
Jim Ingham [Wed, 13 Mar 2013 17:58:04 +0000 (17:58 +0000)]
Add a target setting (target.use-fast-stepping) to control using the "run to next branch" stepping algorithm.

llvm-svn: 176958

11 years agoFix incorrect cast identification.
Daniel Jasper [Wed, 13 Mar 2013 17:13:53 +0000 (17:13 +0000)]
Fix incorrect cast identification.

Before: int a = sizeof(int *)+ b;"
After:  int a = sizeof(int *) + b;
llvm-svn: 176957

11 years ago[analyzer] fixed the logic changed by r176949
Anton Yartsev [Wed, 13 Mar 2013 17:07:32 +0000 (17:07 +0000)]
[analyzer] fixed the logic changed by r176949

llvm-svn: 176956

11 years agoARM cost model: Add test case to make sure we would notice a change in CodeGen
Arnold Schwaighofer [Wed, 13 Mar 2013 16:25:55 +0000 (16:25 +0000)]
ARM cost model: Add test case to make sure we would notice a change in CodeGen

In r176898 I updated the cost model to reflect the fact that sext/zext/cast on
v8i32 <-> v8i8 and v16i32 <-> v16i8 are expensive.

This test case is so that we make sure to update the cost model once we fix
CodeGen.

llvm-svn: 176955

11 years agorelax check to allow for attributes (fix buildbot for elf-ppc64)
Adrian Prantl [Wed, 13 Mar 2013 16:14:44 +0000 (16:14 +0000)]
relax check to allow for attributes (fix buildbot for elf-ppc64)

llvm-svn: 176954

11 years agoFix comment indentation before labels.
Daniel Jasper [Wed, 13 Mar 2013 15:53:12 +0000 (15:53 +0000)]
Fix comment indentation before labels.

Before:
switch (x) {
  // if 1, do f()
case 1:
  f();
}

After:
switch (x) {
// if 1, do f()
case 1:
  f();
}

llvm-svn: 176953

11 years agoFix formatting issue with builder-type calls.
Daniel Jasper [Wed, 13 Mar 2013 15:37:48 +0000 (15:37 +0000)]
Fix formatting issue with builder-type calls.

Before:
->aaaaaa()->aaaaaaaaaaa(aaaaaaaa()->aaaaaa()->aaaaa() - aaaaaaaaa()->aaaaaa()
                                                             ->aaaaa());

After:
a->aaaaaa()->aaaaaaaaaaa(aaaaaaaa()->aaaaaa()->aaaaa() -
                         aaaaaaaaa()->aaaaaa()->aaaaa());

llvm-svn: 176952

11 years agoAdded AnnotatedToken::isOneOf + a few other refactorings
Alexander Kornienko [Wed, 13 Mar 2013 14:41:29 +0000 (14:41 +0000)]
Added AnnotatedToken::isOneOf + a few other refactorings

Summary: <subj>

Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D536

llvm-svn: 176951

11 years agoFix a performance regression when combining to smaller types in icmp (shl %v, C1...
Arnaud A. de Grandmaison [Wed, 13 Mar 2013 14:40:37 +0000 (14:40 +0000)]
Fix a performance regression when combining to smaller types in icmp (shl %v, C1), C2 :

Only combine when the shl is only used by the icmp

llvm-svn: 176950

11 years agoRefactoring:
Anton Yartsev [Wed, 13 Mar 2013 14:39:10 +0000 (14:39 +0000)]
Refactoring:
+ Individual Report* method for each bug type
+ Comment improved: missing non-trivial alloca() case annotated
+ 'range' parameter of ReportBadFree() capitalized
+ 'SymbolRef Sym = State->getSVal(A, C.getLocationContext()).getAsSymbol();' shorten to 'SymbolRef Sym = C.getSVal(A).getAsSymbol();'

llvm-svn: 176949

11 years agoDocumentation: formatting fixes
Dmitri Gribenko [Wed, 13 Mar 2013 14:26:35 +0000 (14:26 +0000)]
Documentation: formatting fixes

llvm-svn: 176948

11 years ago[msan] Clean up extensions during msandr shutdown
Reid Kleckner [Wed, 13 Mar 2013 13:59:09 +0000 (13:59 +0000)]
[msan] Clean up extensions during msandr shutdown

Otherwise debug DynamoRIO complains at us for leaking memory.

llvm-svn: 176947

11 years agoAdd one more overload to make VS2008's debug mody happy.
Benjamin Kramer [Wed, 13 Mar 2013 13:50:47 +0000 (13:50 +0000)]
Add one more overload to make VS2008's debug mody happy.

sigh.

llvm-svn: 176946

11 years agoReverting r176944 until Author fixes test failure.
Edwin Vane [Wed, 13 Mar 2013 13:48:47 +0000 (13:48 +0000)]
Reverting r176944 until Author fixes test failure.

llvm-svn: 176945

11 years agoClangTool output cleanup
Edwin Vane [Wed, 13 Mar 2013 13:36:56 +0000 (13:36 +0000)]
ClangTool output cleanup

Information messages sent to stdout by ClangTool now only happen when the -debug
flag is set.

Error messages that used to go to stdout now go to stderr.

Author: Ariel J Bernal <ariel.j.bernal@intel.com>
llvm-svn: 176944

11 years ago[sanitizer] Fix lint.
Evgeniy Stepanov [Wed, 13 Mar 2013 10:20:35 +0000 (10:20 +0000)]
[sanitizer] Fix lint.

llvm-svn: 176943

11 years agoAdd llvm-symbolizer as test dependency.
Evgeniy Stepanov [Wed, 13 Mar 2013 09:36:02 +0000 (09:36 +0000)]
Add llvm-symbolizer as test dependency.

It is required when building tests with ASan or MSan.

llvm-svn: 176942

11 years agoAdd llvm-symbolizer as test dependency.
Evgeniy Stepanov [Wed, 13 Mar 2013 09:35:18 +0000 (09:35 +0000)]
Add llvm-symbolizer as test dependency.

It is required when building tests with ASan or MSan.

llvm-svn: 176941

11 years ago[Sanitizer] Build ASan, TSan and MSan runtimes with -fno-rtti.
Alexey Samsonov [Wed, 13 Mar 2013 09:18:30 +0000 (09:18 +0000)]
[Sanitizer] Build ASan, TSan and MSan runtimes with -fno-rtti.

llvm-svn: 176940

11 years ago[msan] Increase stack size as required.
Evgeniy Stepanov [Wed, 13 Mar 2013 09:01:40 +0000 (09:01 +0000)]
[msan] Increase stack size as required.

Adjust stack size in pthread_attr_t when the app-requested size does not fit MSan TLS.

llvm-svn: 176939

11 years ago[sanitizer] Move GetTlsSize code from TSan to sanitizer_common.
Evgeniy Stepanov [Wed, 13 Mar 2013 08:19:53 +0000 (08:19 +0000)]
[sanitizer] Move GetTlsSize code from TSan to sanitizer_common.

llvm-svn: 176938

11 years agoBreak a >80 char line.
Evgeniy Stepanov [Wed, 13 Mar 2013 08:17:39 +0000 (08:17 +0000)]
Break a >80 char line.

llvm-svn: 176937

11 years agoFix formatting of new arrays of pointers.
Daniel Jasper [Wed, 13 Mar 2013 07:49:51 +0000 (07:49 +0000)]
Fix formatting of new arrays of pointers.

Before:
A = new SomeType * [Length];
A = new SomeType *[Length]();

After:
A = new SomeType *[Length];
A = new SomeType *[Length]();

Small formatting cleanups with clang-format.

llvm-svn: 176936

11 years ago[Sanitizer] Fixup for r176931 for Mac and Windows
Alexey Samsonov [Wed, 13 Mar 2013 07:39:25 +0000 (07:39 +0000)]
[Sanitizer] Fixup for r176931 for Mac and Windows

llvm-svn: 176935

11 years agoSet symbolizer path in the test environment.
Evgeniy Stepanov [Wed, 13 Mar 2013 07:10:36 +0000 (07:10 +0000)]
Set symbolizer path in the test environment.

This is needed to get symbolized stack traces when running Clang tests under (A|M)San.

llvm-svn: 176934

11 years agoSet symbolizer path in the test environment.
Evgeniy Stepanov [Wed, 13 Mar 2013 06:58:09 +0000 (06:58 +0000)]
Set symbolizer path in the test environment.

This is needed to get symbolized stack traces when running LLVM tests under (A|M)San.

llvm-svn: 176933

11 years ago[Sanitizer] Fix a typo in function name
Alexey Samsonov [Wed, 13 Mar 2013 06:55:02 +0000 (06:55 +0000)]
[Sanitizer] Fix a typo in function name

llvm-svn: 176932

11 years ago[Sanitizer] Change MemoryMappingLayout methods to also report memory protection flags...
Alexey Samsonov [Wed, 13 Mar 2013 06:51:02 +0000 (06:51 +0000)]
[Sanitizer] Change MemoryMappingLayout methods to also report memory protection flags (for future use in leak checker). Patch by Sergey Matveev.

llvm-svn: 176931

11 years agolit.TestFormats.GoogleTest: Honor LitConfig.noExecute, or --no-execute were ignored.
NAKAMURA Takumi [Wed, 13 Mar 2013 06:16:33 +0000 (06:16 +0000)]
lit.TestFormats.GoogleTest: Honor LitConfig.noExecute, or --no-execute were ignored.

llvm-svn: 176930

11 years agoRemove trailing comma in enum list.
John McCall [Wed, 13 Mar 2013 05:02:21 +0000 (05:02 +0000)]
Remove trailing comma in enum list.

llvm-svn: 176926

11 years ago[Pass][Layout] Add extra debugging information
Shankar Easwaran [Wed, 13 Mar 2013 04:05:38 +0000 (04:05 +0000)]
[Pass][Layout] Add extra debugging information

llvm-svn: 176925

11 years agoTighten up the rules for precise lifetime and document
John McCall [Wed, 13 Mar 2013 03:10:54 +0000 (03:10 +0000)]
Tighten up the rules for precise lifetime and document
the requirements on the ARC optimizer.

rdar://13407451

llvm-svn: 176924

11 years agoThe step by running from branch to branch pretty much works with this checkin (at...
Jim Ingham [Wed, 13 Mar 2013 01:56:41 +0000 (01:56 +0000)]
The step by running from branch to branch pretty much works with this checkin (at least for x86_64) but is still
turned off, it needs more qualification.  If you want to play with it, change the initialization of m_use_fast_step
to true.

llvm-svn: 176923

11 years agoDoesBranch needs to compute the instruction if it isn't already done.
Jim Ingham [Wed, 13 Mar 2013 01:55:16 +0000 (01:55 +0000)]
DoesBranch needs to compute the instruction if it isn't already done.
Handle the "alternate_isa" correctly.

llvm-svn: 176922

11 years agoMore cleanup, remove an untrue comment.
Jim Ingham [Wed, 13 Mar 2013 01:53:26 +0000 (01:53 +0000)]
More cleanup, remove an untrue comment.

llvm-svn: 176921

11 years agoRemove an unused #include.
Jim Ingham [Wed, 13 Mar 2013 01:52:33 +0000 (01:52 +0000)]
Remove an unused #include.

llvm-svn: 176920

11 years agoDon't use the fact that we stopped with a "Breakpoint" stop reason to decide to step...
Jim Ingham [Wed, 13 Mar 2013 01:52:09 +0000 (01:52 +0000)]
Don't use the fact that we stopped with a "Breakpoint" stop reason to decide to step over the breakpoint.  It's
better to check directly whether there is a breakpoint site at the PC.

llvm-svn: 176919

11 years agoAdd a missing check for getting a NULL oso module back from GetModuleByCompUnitInfo.
Jim Ingham [Wed, 13 Mar 2013 01:34:14 +0000 (01:34 +0000)]
Add a missing check for getting a NULL oso module back from GetModuleByCompUnitInfo.

llvm-svn: 176918

11 years ago[mips] Define two subclasses of MipsTargetLowering. Mips16TargetLowering is for
Akira Hatanaka [Wed, 13 Mar 2013 00:54:29 +0000 (00:54 +0000)]
[mips] Define two subclasses of MipsTargetLowering. Mips16TargetLowering is for
mips16 and MipsSETargetLowering is for mips32/64.

No functionality changes.

llvm-svn: 176917

11 years ago[ELF][Writer] Let std::vector handle allocating space instead of reserving tiny portions.
Michael J. Spencer [Wed, 13 Mar 2013 00:30:08 +0000 (00:30 +0000)]
[ELF][Writer] Let std::vector handle allocating space instead of reserving tiny portions.

llvm-svn: 176916

11 years agoVarious fixes for armv7 floating point/vector register support.
Jason Molenda [Wed, 13 Mar 2013 00:14:30 +0000 (00:14 +0000)]
Various fixes for armv7 floating point/vector register support.
Drop the old f registers from debugserver's register list.  Add the
NEON 128-bit q registers to debugserver, support reading and writing.
Add the new contains / invalidates mappings for the s, d, and q
registers so lldb will know what registers overlay what other registers.
Change the default format of s and d registers to be floating point
instead of hex.  Remove some UTF-8 hyphen chars in comments in the ARM
register number definition headers.
<rdar://problem/13121797>

llvm-svn: 176915

11 years agoAdd a missing call to GetFileRangeMap. It's absence was causing debug info from...
Jim Ingham [Wed, 13 Mar 2013 00:07:18 +0000 (00:07 +0000)]
Add a missing call to GetFileRangeMap.  It's absence was causing debug info from .o files to sometimes
not get processed.

<rdar://problem/13406310>

llvm-svn: 176914

11 years agoRefactor filename/directory in DICompileUnit into a DIFile
David Blaikie [Wed, 13 Mar 2013 00:01:35 +0000 (00:01 +0000)]
Refactor filename/directory in DICompileUnit into a DIFile

This is the next step towards making the metadata for DIScopes have a common
prefix rather than having to delegate based on their tag type.

llvm-svn: 176913

11 years agoTest for LLVM r176911
Matt Beaumont-Gay [Tue, 12 Mar 2013 23:56:16 +0000 (23:56 +0000)]
Test for LLVM r176911

llvm-svn: 176912

11 years agoDon't crash if write_impl() leaves less buffer space available than expected.
Matt Beaumont-Gay [Tue, 12 Mar 2013 23:55:24 +0000 (23:55 +0000)]
Don't crash if write_impl() leaves less buffer space available than expected.

This was tickled by a Clang diagnostic; Clang test case to follow.

llvm-svn: 176911

11 years agoRemove unused "isMain" field from DICompileUnit
David Blaikie [Tue, 12 Mar 2013 22:43:04 +0000 (22:43 +0000)]
Remove unused "isMain" field from DICompileUnit

llvm-svn: 176910

11 years ago[Support][Path] Don't inf loop if creating the parent directory fails.
Michael J. Spencer [Tue, 12 Mar 2013 22:32:39 +0000 (22:32 +0000)]
[Support][Path] Don't inf loop if creating the parent directory fails.

Patch by Paul Robinson.

llvm-svn: 176908

11 years agoUpdate debug info test cases with empty SplitDebugFilename field.
David Blaikie [Tue, 12 Mar 2013 22:25:36 +0000 (22:25 +0000)]
Update debug info test cases with empty SplitDebugFilename field.

This could be 'null' or the empty string, DIDescriptor::getStringField
coalesces the two cases anyway so it's just a matter of legible/efficient
representation.

The change in behavior of the DICompileUnit::get* functions could be
subsumed by the full verification check - but ideally that should just be an
assertion if we could front-load the actual debug info metadata failure paths.

llvm-svn: 176907

11 years agoObjective-C: In my last path, also check
Fariborz Jahanian [Tue, 12 Mar 2013 22:22:38 +0000 (22:22 +0000)]
Objective-C: In my last path, also check
for existence of user setter before
issuing the warning about non-synthesizable
property. // rdar://13388503

llvm-svn: 176906

11 years agoMake modules.m test portable, now that autolinking is dependent on whether or not...
Ted Kremenek [Tue, 12 Mar 2013 21:49:29 +0000 (21:49 +0000)]
Make modules.m test portable, now that autolinking is dependent on whether or not the target uses the integrated assembler.

llvm-svn: 176902

11 years agoEliminate backend dependency in CFE testcase.
Adrian Prantl [Tue, 12 Mar 2013 21:40:00 +0000 (21:40 +0000)]
Eliminate backend dependency in CFE testcase.

llvm-svn: 176901

11 years agotests: Properly check if asserts are available
Tobias Grosser [Tue, 12 Mar 2013 21:27:39 +0000 (21:27 +0000)]
tests: Properly check if asserts are available

In my previous commits I failed to realise that my new requires lines fully
disabled these tests. We now properly check if we are in an asserts build and
only disable the tests if assertions are not available.

Reported-by: Sean Silva <silvas@purdue.edu>
llvm-svn: 176900

11 years agoSwitch from CreateTypeSourceInfo, which allocates
Sean Callanan [Tue, 12 Mar 2013 21:22:00 +0000 (21:22 +0000)]
Switch from CreateTypeSourceInfo, which allocates
uninitialized memory, to getTrivialTypeSourceInfo,
which initializes its memory, when creating trivial
TypeSourceInfos.

<rdar://problem/13332253>

llvm-svn: 176899

11 years agoARM cost model: Increase the cost for vector casts that use the stack
Arnold Schwaighofer [Tue, 12 Mar 2013 21:19:22 +0000 (21:19 +0000)]
ARM cost model: Increase the cost for vector casts that use the stack

Increase the cost of v8/v16-i8 to v8/v16-i32 casts and truncates as the backend
currently lowers those using stack accesses.

This was responsible for a significant degradation on
MultiSource/Benchmarks/Trimaran/enc-pc1/enc-pc1
where we vectorize one loop to a vector factor of 16. After this patch we select
a vector factor of 4 which will generate reasonable code.

unsigned char cle[32];

void test(short c) {
  unsigned short compte;
  for (compte = 0; compte <= 31; compte++) {
    cle[compte] = cle[compte] ^ c;
  }
}

radar://13220512

llvm-svn: 176898

11 years ago[driver] Only enable -fmodules-autolink if we are using the integrated assembler.
Ted Kremenek [Tue, 12 Mar 2013 21:08:08 +0000 (21:08 +0000)]
[driver] Only enable -fmodules-autolink if we are using the integrated assembler.

Fixes <rdar://problem/13289240>

llvm-svn: 176897

11 years agoWhitespace cleanup.
Rafael Espindola [Tue, 12 Mar 2013 21:06:00 +0000 (21:06 +0000)]
Whitespace cleanup.

llvm-svn: 176896

11 years agoForce column info to be generated for call expressions so we can
Adrian Prantl [Tue, 12 Mar 2013 20:43:25 +0000 (20:43 +0000)]
Force column info to be generated for call expressions so we can
differentiate multiple inlined call sites on the same line
in the debug info.

Fixes rdar://problem/13036237

llvm-svn: 176895

11 years agoDriver: -ccc-install-dir should affect cc1 -resource-dir
Jim Grosbach [Tue, 12 Mar 2013 20:17:58 +0000 (20:17 +0000)]
Driver: -ccc-install-dir should affect cc1 -resource-dir

-ccc-install-dir is supposed to cause the compiler to behave as-if it
were installed in the indicated location. It almost does, but misses
anything that's relying on the resource directory (libc++ header search,
in particular). The resource dir is resolved too early, before command
line args are handled.

The fix is simply to move handling of the resource dir until after we
know if a -ccc-install-dir is present.

rdar://13402696

llvm-svn: 176894

11 years agoDebug Info: use SmallVector instead of std::vector in MCDwarfDirsCUMap and MCDwarfFil...
Manman Ren [Tue, 12 Mar 2013 20:17:00 +0000 (20:17 +0000)]
Debug Info: use SmallVector instead of std::vector in MCDwarfDirsCUMap and MCDwarfFilesCUMap

llvm-svn: 176893

11 years agoRevert "Revert r166370 and r166540 now that Xcode 4.6 has been available for a while."
Bob Wilson [Tue, 12 Mar 2013 20:00:34 +0000 (20:00 +0000)]
Revert "Revert r166370 and r166540 now that Xcode 4.6 has been available for a while."

This reverts commit 176887.  Nico asked for more time to move to Xcode 4.6.

llvm-svn: 176892

11 years agoMake C++11 status page more consistent: we mark entries as "done" if we
Richard Smith [Tue, 12 Mar 2013 19:56:09 +0000 (19:56 +0000)]
Make C++11 status page more consistent: we mark entries as "done" if we
implement correct functionality, even if it's not optimal. On this basis, mark
"data dependency ordering" as done. Add footnotes for cases where our
implementation is known to be suboptimal.

llvm-svn: 176891

11 years agoAdd an interesting testcase we already handle correctly.
Rafael Espindola [Tue, 12 Mar 2013 19:50:10 +0000 (19:50 +0000)]
Add an interesting testcase we already handle correctly.

llvm-svn: 176890

11 years agoObjective-C: Issue warning in couple of obscure cases
Fariborz Jahanian [Tue, 12 Mar 2013 19:46:17 +0000 (19:46 +0000)]
Objective-C: Issue warning in couple of obscure cases
when property autosynthesis does not synthesize a property.
When property is declared 'readonly' in a super class and
is redeclared 'readwrite' in a subclass. When a property
autosynthesis causes it to share 'ivar' with another property.
// rdar://13388503

llvm-svn: 176889

11 years agoMove the extern "C" sema tests to a new file.
Rafael Espindola [Tue, 12 Mar 2013 19:45:57 +0000 (19:45 +0000)]
Move the extern "C" sema tests to a new file.

llvm-svn: 176888

11 years agoRevert r166370 and r166540 now that Xcode 4.6 has been available for a while.
Bob Wilson [Tue, 12 Mar 2013 19:39:19 +0000 (19:39 +0000)]
Revert r166370 and r166540 now that Xcode 4.6 has been available for a while.

Those changes were added as a temporary workaround for Xcode 4.5 passing the
-Wno-arc-abi option.  Xcode 4.6 does not pass that option so this should no
longer be necessary.

llvm-svn: 176887

11 years ago[Support][MemoryBuffer] Use sys::fs::mapped_file_region instead of sys::Path::MapInFi...
Michael J. Spencer [Tue, 12 Mar 2013 19:28:19 +0000 (19:28 +0000)]
[Support][MemoryBuffer] Use sys::fs::mapped_file_region instead of sys::Path::MapInFilePages.

This gives us memory mapped file I/O on Windows.

llvm-svn: 176886

11 years agoCorrect invalid debug info metadata
David Blaikie [Tue, 12 Mar 2013 19:04:24 +0000 (19:04 +0000)]
Correct invalid debug info metadata

Code review feedback on r176838 by Patrik Hägglund.

llvm-svn: 176884

11 years agoReview feedback change per Edwin: Move non-public members to end of classes.
John Thompson [Tue, 12 Mar 2013 18:51:47 +0000 (18:51 +0000)]
Review feedback change per Edwin: Move non-public members to end of classes.

llvm-svn: 176883

11 years agoDebug Info: use DW_FORM_ref_addr instead of DW_FORM_ref4 if the referenced DIE
Manman Ren [Tue, 12 Mar 2013 18:27:15 +0000 (18:27 +0000)]
Debug Info: use DW_FORM_ref_addr instead of DW_FORM_ref4 if the referenced DIE
belongs to a different compile unit.

DW_FORM_ref_addr should be used for cross compile-unit reference.

When compiling a large application, we got a dwarfdump verification error where
abstract_origin points to nowhere.

This error can't be reproduced on any testing case in MultiSource.
We may have other cases where we use DW_FORM_ref4 unconditionally.

rdar://problem/13370501

llvm-svn: 176882

11 years agoAvoid generating ISD::SELECT for vector operands to SIGN_EXTEND
Richard Relph [Tue, 12 Mar 2013 18:17:18 +0000 (18:17 +0000)]
Avoid generating ISD::SELECT for vector operands to SIGN_EXTEND

llvm-svn: 176881

11 years agoRemove the assert()'s from the LLVMCreateDisasmCPU() library API and just
Kevin Enderby [Tue, 12 Mar 2013 18:12:17 +0000 (18:12 +0000)]
Remove the assert()'s from the LLVMCreateDisasmCPU() library API and just
return 0 to indicate failure to create the disassembler.  A library routine
should not assert and just let the caller handler the error.  For example
darwin's otool(1) will simply print an error if it ends up using a library
that is not configured for a target it wants:

% otool -tv ViewController.o
ViewController.o:
(__TEXT,__text) section
can't create arm llvm disassembler

This is much better than an abort which appears as a crash to the user or
even the assert when using a Debug+Asserts built library:

Assertion failed: (MAI && "Unable to create target asm info!"), function LLVMCreateDisasmCPU, file /Volumes/SandBox/llvm/lib/MC/MCDisassembler/Disassembler.cpp, line 47.

radr://12539918

llvm-svn: 176880

11 years agoMisc. clang build warning fixes.
Matt Kopec [Tue, 12 Mar 2013 17:45:38 +0000 (17:45 +0000)]
Misc. clang build warning fixes.

llvm-svn: 176879

11 years agoObjective-C: Fixes a comment.
Fariborz Jahanian [Tue, 12 Mar 2013 17:43:00 +0000 (17:43 +0000)]
Objective-C: Fixes a comment.

llvm-svn: 176878