Commit Graph

145344 Commits

Author SHA1 Message Date
Michael J. Spencer 42ad29fa05 [Support] Fix lifetime of file descriptors when using MemoryBuffer.
Clients of MemoryBuffer::getOpenFile expect it not to take ownership of the file
descriptor passed in. So don't.

llvm-svn: 176995
2013-03-14 00:20:10 +00:00
Nick Lewycky ad145509eb No functionality change. Rename emitGCNO() to the more sensible
emitProfileNotes(), similar to emitProfileArcs(). Also update its comment.

Also add a comment on Version[4] (there will be another comment in clang later),
and compress lines that exceeded 80 columns.

llvm-svn: 176994
2013-03-13 22:55:42 +00:00
David Blaikie aabfe4f997 Simplify file/directory name handling in DILexicalBlock
llvm-svn: 176993
2013-03-13 22:52:59 +00:00
Han Ming Ong 0c27cb7fa1 <rdar://problem/13415471>
Don't get dirty page size if we are not going to send it back

llvm-svn: 176992
2013-03-13 22:51:04 +00:00
Bill Wendling 169773f7c7 Really fix the MIPS test.
llvm-svn: 176991
2013-03-13 22:44:19 +00:00
David Blaikie 3254616cc3 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
2013-03-13 22:33:09 +00:00
Bill Wendling 282f3289d1 Attempt to fix test.
llvm-svn: 176987
2013-03-13 22:29:26 +00:00
Bill Wendling 965bd58902 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
2013-03-13 22:26:59 +00:00
Bill Wendling dabafea7d6 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
2013-03-13 22:24:33 +00:00
David Blaikie 0648f38029 Simplify directory name handling in DILexicalBlockFile.
llvm-svn: 176984
2013-03-13 22:23:51 +00:00
David Blaikie 0d221159a0 Remove the unused 4th operand for DIFile debug info metadata
llvm-svn: 176983
2013-03-13 22:05:21 +00:00
Daniel Malea 66586653b7 Add braces to crashed test summary (needed for buildbots to detect crashes)
llvm-svn: 176980
2013-03-13 21:50:49 +00:00
Daniel Malea b7e4e22795 Remove extra whitespace
llvm-svn: 176978
2013-03-13 21:18:54 +00:00
Lang Hames dfa3f8f449 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
2013-03-13 21:18:46 +00:00
Argyrios Kyrtzidis b146baabad [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
2013-03-13 21:13:51 +00:00
Argyrios Kyrtzidis 3c5305c15e [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
2013-03-13 21:13:43 +00:00
Daniel Malea 6b72269b3d Prepend "FAIL:" string to tests that crash so that buildbots pick them up.
llvm-svn: 176974
2013-03-13 21:08:02 +00:00
Alexey Samsonov 6706578ff1 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
2013-03-13 20:50:23 +00:00
Daniel Malea 10320dd06f 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
2013-03-13 20:50:05 +00:00
Reed Kotler 3d5966f31b Cause the mips16/nomips16 attribute to be passed to LLVM from Clang
in the LLVM assembly language output.

llvm-svn: 176971
2013-03-13 20:40:30 +00:00
Shankar Easwaran 74fc23fa5d [ELF][X86_64][Hexagon] order plt/got entries properly and fix test
llvm-svn: 176970
2013-03-13 20:30:11 +00:00
Anna Zaks e9989bd4df [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
2013-03-13 20:20:14 +00:00
Reed Kotler 795c7b455c Add some additonal attribute helper functions. Test will be on follow
up putback to clang for mips16.

llvm-svn: 176968
2013-03-13 20:20:08 +00:00
Vincent Lejeune 14c3fd8480 R600: Remove unused Outputs variable
llvm-svn: 176967
2013-03-13 20:13:25 +00:00
Ted Kremenek 650a69e988 Remove stray space.
llvm-svn: 176966
2013-03-13 20:05:52 +00:00
Ted Kremenek 2fb5f09e15 [analyzer] Handle Objc Fast enumeration for "loop is executed 0 times".
Fixes <rdar://problem/12322528>

llvm-svn: 176965
2013-03-13 20:03:31 +00:00
David Blaikie cebc623798 Migrate dbg-arg.ll to a C file test to be resilient to IR changes.
llvm-svn: 176964
2013-03-13 18:46:28 +00:00
Manman Ren 11fec384de No functionality change. Use unreachable in getCUOffset.
llvm-svn: 176963
2013-03-13 18:41:27 +00:00
Manman Ren 723956fe1a No functionality change. Use unreachable in getCompileUnit.
llvm-svn: 176962
2013-03-13 18:33:41 +00:00
Greg Clayton e4ca515ae1 <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
2013-03-13 18:25:49 +00:00
Greg Clayton 682b60e4b4 <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
2013-03-13 18:23:44 +00:00
Jakob Stoklund Olesen c1b566db1b Check register classes also when changing them.
We have the same assertion in createVirtualRegister.

llvm-svn: 176959
2013-03-13 18:11:17 +00:00
Jim Ingham 17d023f6ac Add a target setting (target.use-fast-stepping) to control using the "run to next branch" stepping algorithm.
llvm-svn: 176958
2013-03-13 17:58:04 +00:00
Daniel Jasper 8a68b95d9e Fix incorrect cast identification.
Before: int a = sizeof(int *)+ b;"
After:  int a = sizeof(int *) + b;
llvm-svn: 176957
2013-03-13 17:13:53 +00:00
Anton Yartsev 6c2af43991 [analyzer] fixed the logic changed by r176949
llvm-svn: 176956
2013-03-13 17:07:32 +00:00
Arnold Schwaighofer 9f2e0fa52e 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
2013-03-13 16:25:55 +00:00
Adrian Prantl 572f8dfea0 relax check to allow for attributes (fix buildbot for elf-ppc64)
llvm-svn: 176954
2013-03-13 16:14:44 +00:00
Daniel Jasper 0f8ed9e4e1 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
2013-03-13 15:53:12 +00:00
Daniel Jasper 8f6ae19129 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
2013-03-13 15:37:48 +00:00
Alexander Kornienko 62b85b9610 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
2013-03-13 14:41:29 +00:00
Arnaud A. de Grandmaison 7153305b92 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
2013-03-13 14:40:37 +00:00
Anton Yartsev 59ed15b052 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
2013-03-13 14:39:10 +00:00
Dmitri Gribenko 3605f319dd Documentation: formatting fixes
llvm-svn: 176948
2013-03-13 14:26:35 +00:00
Reid Kleckner 2325273641 [msan] Clean up extensions during msandr shutdown
Otherwise debug DynamoRIO complains at us for leaking memory.

llvm-svn: 176947
2013-03-13 13:59:09 +00:00
Benjamin Kramer dfbcba5ae0 Add one more overload to make VS2008's debug mody happy.
sigh.

llvm-svn: 176946
2013-03-13 13:50:47 +00:00
Edwin Vane 2e9b174da6 Reverting r176944 until Author fixes test failure.
llvm-svn: 176945
2013-03-13 13:48:47 +00:00
Edwin Vane 666f6b6de7 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
2013-03-13 13:36:56 +00:00
Evgeniy Stepanov 96f82f8ac3 [sanitizer] Fix lint.
llvm-svn: 176943
2013-03-13 10:20:35 +00:00
Evgeniy Stepanov eeabe82762 Add llvm-symbolizer as test dependency.
It is required when building tests with ASan or MSan.

llvm-svn: 176942
2013-03-13 09:36:02 +00:00
Evgeniy Stepanov 3aa627b09d Add llvm-symbolizer as test dependency.
It is required when building tests with ASan or MSan.

llvm-svn: 176941
2013-03-13 09:35:18 +00:00