Commit Graph

140834 Commits

Author SHA1 Message Date
Ted Kremenek 632af24eb8 Set process return code of 1 in set-xcode-analyzer when Xcode needs to be quit. Fixes <rdar://problem/12983031>.
llvm-svn: 172256
2013-01-11 21:49:36 +00:00
Michael J. Spencer bbe4b9812b [ELF] Simplify assert.
llvm-svn: 172255
2013-01-11 21:38:36 +00:00
Nico Weber a21aaae7b3 Formatter: Format ObjC static and instance methods consistently, add a test for that.
llvm-svn: 172254
2013-01-11 21:14:08 +00:00
Dmitri Gribenko 7a7284d881 libclang: remove unneeded casts
llvm-svn: 172253
2013-01-11 21:06:06 +00:00
Dmitri Gribenko ba2f746fea libclang: change CXCursor to store 'const void *' pointers for
const-correctness, and update all users

llvm-svn: 172252
2013-01-11 21:01:49 +00:00
Greg Clayton 1e0c88401e <rdar://problem/12990038>
Fixed an issue where the platform auto select code was changing the architecture and causing the wrong architecture to be assigned to the target.

llvm-svn: 172251
2013-01-11 20:49:54 +00:00
Howard Hinnant 8d9aec8802 Fix exception safety bug in vector::push_back
llvm-svn: 172250
2013-01-11 20:36:59 +00:00
Dmitri Gribenko bdc80de74c Constify parameter of clang::getCursorKindForDecl
llvm-svn: 172249
2013-01-11 20:32:41 +00:00
Benjamin Kramer fb3c009b52 Remove some accidentaly duplicated code. This needs urgent cleanup :(
llvm-svn: 172248
2013-01-11 20:11:33 +00:00
Michael Gottesman d1a46f23b4 Added debug messages to GlobalOpt.
Specifically:
1. Added a missing new line when we emit a debug message saying that we are marking a global variable as constant.
2. Added debug messages that describe what is occuring when GlobalOpt is evaluating a block/function.
3. Added a debug message that says what specific constructor is being evaluated.

llvm-svn: 172247
2013-01-11 20:07:53 +00:00
Benjamin Kramer 56b31bd9d7 Split TargetLowering into a CodeGen and a SelectionDAG part.
This fixes some of the cycles between libCodeGen and libSelectionDAG. It's still
a complete mess but as long as the edges consist of virtual call it doesn't
cause breakage. BasicTTI did static calls and thus broke some build
configurations.

llvm-svn: 172246
2013-01-11 20:05:37 +00:00
Nadav Rotem e55aa3c848 ARM Cost Model: Modify the target independent cost model to ask
the target if it supports the different CAST types. We didn't do this
on X86 because of the different register sizes and types, but on ARM
this makes sense.

llvm-svn: 172245
2013-01-11 19:54:13 +00:00
Rafael Espindola 46afb35181 Reject incompatible redeclarations of extern C symbols.
Before we were only checking if the new declaration itself was marked extern
C. Fixes prpr14766.

llvm-svn: 172243
2013-01-11 19:34:23 +00:00
Fariborz Jahanian 70ae634f87 Improve diagnostic per Richard's suggestion
(which may yet change if we move the diagnostic
 outside case value).

llvm-svn: 172242
2013-01-11 19:33:54 +00:00
Dmitri Gribenko 2c173b4806 libclang: use getCursorTU and getCursorASTUnit instead of explicit casts
llvm-svn: 172241
2013-01-11 19:28:44 +00:00
Bob Wilson d1897e4f86 Fix typo in function name and one more whitespace tweak.
llvm-svn: 172240
2013-01-11 19:24:51 +00:00
Manuel Klimek 9fa8d5578d Fix crashes in UnwrappedLineParser on missing parens.
llvm-svn: 172239
2013-01-11 19:23:05 +00:00
Manuel Klimek 2acb7b7bb1 Fix single-line optimization for ObjC.
Puts blocks always into multiple lines when they start with an ObjC
keyword or minus.

llvm-svn: 172238
2013-01-11 19:17:44 +00:00
Bob Wilson aec10c6d44 Fix whitespace.
This script used an inconsistent mix of spaces and tabs, and even
ignoring that, it still had inconsistent indentation, which is
pretty scary for a Python script. I also removed trailing whitespace
from some lines.

llvm-svn: 172237
2013-01-11 19:00:56 +00:00
Shankar Easwaran b1d09c07f1 better implementation for findOutputSection
llvm-svn: 172236
2013-01-11 18:56:11 +00:00
Justin Holewinski f73d7a53ed Remove PTX->NVPTX in CodeGenerator document and update its text.
llvm-svn: 172235
2013-01-11 18:47:10 +00:00
Justin Holewinski ceab0dea55 Update CodeGenerator document to add a "Not Applicable" category to the
Target Feature Matrix, and update the PTX column with this new category.

llvm-svn: 172234
2013-01-11 18:37:54 +00:00
Manuel Klimek adededff26 Fix crash on invalid.
if { foo; }
would previously crash clang-format.

llvm-svn: 172232
2013-01-11 18:28:36 +00:00
Manuel Klimek d5e5f8f2a4 Fix parsing of initializer lists with elaborated type specifier.
Now we correctly parse and format:
verifyFormat("struct foo a = { bar };
int n;

llvm-svn: 172229
2013-01-11 18:13:04 +00:00
Eric Christopher 0cb6fd930e For inline asm:
- recognize string "{memory}" in the MI generation
- mark as mayload/maystore when there's a memory clobber constraint.

PR14859.

Patch by Krzysztof Parzyszek

llvm-svn: 172228
2013-01-11 18:12:39 +00:00
Greg Clayton c0e8a85ea8 Modified Value.cpp to share the code that gets the values as bytes (Value::GetValueAsData()) so now Value::ResolveValue() doesn't do its own thing by reading memory directly.
Also modified the Value class so that you can evaluate expressions without a process, yet with some sections loaded in the target. This allows casting pointers that are in data sections to types and being able to evaluate expressions in the data. For example:

(lldb) target create a.out
(lldb) target modules load --file a.out --slide 0
... find address of something in data ...
(lldb) script
expr_opts = lldb.SBExpressionOptions()
v = lldb.target.EvaluateExpression('(foo *)0x1230000', expr_opts)
print v
vv = lldb.value(v)
print v.pt.x

Above we were able to cast a pointer to an address which was in a.out's data
section and print out entire structures and navigate to the child ivars of the expression.

llvm-svn: 172227
2013-01-11 18:01:02 +00:00
Dmitry Vyukov a40a805f30 asan: fix FIXME on windows
llvm-svn: 172226
2013-01-11 17:57:24 +00:00
Manuel Klimek f4ab9ef34c Implements pulling simple blocks into a single line.
void f() { return 42; }

The final change that implements the feature.

llvm-svn: 172225
2013-01-11 17:54:10 +00:00
Andrew Trick 5907292dfd Follow-up typo correction from building the wrong branch.
llvm-svn: 172224
2013-01-11 17:51:16 +00:00
Andrew Trick ae182ce4fc Fix typo from r170452. Affects -enable-misched heuristics.
llvm-svn: 172223
2013-01-11 17:46:50 +00:00
Andrew Trick 143f5f2091 Update CMakeLists for CallPrinter.cpp.
llvm-svn: 172222
2013-01-11 17:34:05 +00:00
Fariborz Jahanian 1e8a3c8ebd Add -std=c++98 to the test and minor improvment in addition.
llvm-svn: 172221
2013-01-11 17:33:57 +00:00
Andrew Trick 962318f6b4 Added -view-callgraph module pass.
-dot-callgraph similarly follows a standard module pass pattern.

Patch by Speziale Ettore!

llvm-svn: 172220
2013-01-11 17:28:14 +00:00
Edwin Vane 5038ac0fb8 Allow RefactoringTool to write to memory instead of always to disk
RefactoringTool::run() always writes the result of rewrites to disk.
Instead, make this optional and provide a method for getting the
refactoring results in a memory buffer instead.

Also made ClangTool polymorphic so RefactoringTool could inherit from it
to properly express the IS-A relationship. This change also provides
access to ClangTool's public interface, e.g. mapVirtualFile() which is
important once refactored buffers start living in memory instead of on
disk.

Reviewers: klimek
llvm-svn: 172219
2013-01-11 17:04:55 +00:00
Edwin Vane bfbd10b329 Update users of RefactoringTool
RefactoringTool::run() no longer writes changes to disk automatically. Updating users of RefactoringTool to explicitly perform the write.
    
Reviewers: klimek

llvm-svn: 172218
2013-01-11 17:04:09 +00:00
Dmitry Vyukov ecd73d36d4 asan/tsan: faster memory allocator
replace lists with arrays

llvm-svn: 172217
2013-01-11 16:41:19 +00:00
Dmitry Vyukov 86585ad319 asan: add memory prefetch to quarantine recycle
llvm-svn: 172216
2013-01-11 16:40:24 +00:00
Dmitry Vyukov 7c6c943782 asan: add memory prefetch to quarantine recycle
llvm-svn: 172215
2013-01-11 16:40:01 +00:00
Eli Bendersky 738fbca845 Fix bug in exception table allocation (PR13678)
Patch by Michael Muller.

llvm-svn: 172214
2013-01-11 16:33:30 +00:00
Dmitry Vyukov f3a7087194 asan: improve allocator benchmark
llvm-svn: 172213
2013-01-11 16:22:53 +00:00
Daniel Jasper d6a947f75f Correct spacing around new and delete.
This fixes llvm.org/PR14913.

Before:  A *a = new(placement) A;
After:   A *a = new (placement) A;
llvm-svn: 172212
2013-01-11 16:09:04 +00:00
Alexander Kornienko 2cc2d60451 clang-format: a bit nicer error message.
llvm-svn: 172211
2013-01-11 16:03:45 +00:00
Dmitry Vyukov f5fa4c8a77 asan: weaken memory ordering, it's expensive in current implementation
llvm-svn: 172210
2013-01-11 16:02:31 +00:00
Dmitry Vyukov 83c4a77265 asan: improve the benchmark
llvm-svn: 172209
2013-01-11 15:57:19 +00:00
David Chisnall 2ec1b10d8e Enable the new (more C++-like, less broken) EH model when targeting the GNUstep
Objective-C runtime 1.7 or greater.

llvm-svn: 172207
2013-01-11 15:33:01 +00:00
Shankar Easwaran 7381db059a add noinhibit exec option
llvm-svn: 172204
2013-01-11 15:11:47 +00:00
Dmitry Vyukov af96edbad2 asan: fix format string in CHECK
llvm-svn: 172203
2013-01-11 15:07:49 +00:00
Shankar Easwaran d127d8169a add hexagon target to lld
llvm-svn: 172202
2013-01-11 15:01:04 +00:00
Enea Zaffanella 29e1c4b03e Fixed an assertion failure triggered by invalid code.
Set invalid type of declarator after emitting error diagnostics,
so that it won't be later considered when instantiating the template.
Added test5_inst in test/SemaCXX/condition.cpp for non-regression.

llvm-svn: 172201
2013-01-11 14:34:39 +00:00
Daniel Jasper fd8c4b1321 Improve handling of trailing declaration annotations.
Before:
void aaaaaaaaaaaa(int aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) GUARDED_BY(
    aaaaaaaaaaaaa);

After:
void aaaaaaaaaaaa(int aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)
    GUARDED_BY(aaaaaaaaaaaaa);

Also did some formatting cleanups with clang-format on the way.

llvm-svn: 172200
2013-01-11 14:23:32 +00:00