platform/upstream/llvm.git
11 years agoDon't print scope qualifiers for references to a type defined locally in a function...
Eli Friedman [Wed, 24 Oct 2012 20:21:25 +0000 (20:21 +0000)]
Don't print scope qualifiers for references to a type defined locally in a function.  Patch by Grzegorz Jablonski.

llvm-svn: 166617

11 years agoAdd an additional test for namespaces and -Wmissing-variable-declarations. Move...
Eli Friedman [Wed, 24 Oct 2012 20:14:09 +0000 (20:14 +0000)]
Add an additional test for namespaces and -Wmissing-variable-declarations.  Move C++ test into SemaCXX.

llvm-svn: 166616

11 years ago(De-)serialize the preprocessor options, including macros defined,
Douglas Gregor [Wed, 24 Oct 2012 20:05:57 +0000 (20:05 +0000)]
(De-)serialize the preprocessor options, including macros defined,
-include'd files, etc.

llvm-svn: 166614

11 years agoFix a miscompilation caused by a typo. When turning a adde with negative value
Evan Cheng [Wed, 24 Oct 2012 19:53:01 +0000 (19:53 +0000)]
Fix a miscompilation caused by a typo. When turning a adde with negative value
into a sbc with a positive number, the immediate should be complemented, not
negated. Also added a missing pattern for ARM codegen.

rdar://12559385

llvm-svn: 166613

11 years agogetSmallConstantTripMultiple should never return zero.
Hal Finkel [Wed, 24 Oct 2012 19:46:44 +0000 (19:46 +0000)]
getSmallConstantTripMultiple should never return zero.

When the trip count is -1, getSmallConstantTripMultiple could return zero,
and this would cause runtime loop unrolling to assert. Instead of returning
zero, one is now returned (consistent with the existing overflow cases).
Fixes PR14167.

llvm-svn: 166612

11 years agoMake ~Operator() protected so subclasses can inherit it and not have
Kaelyn Uhrain [Wed, 24 Oct 2012 19:17:42 +0000 (19:17 +0000)]
Make ~Operator() protected so subclasses can inherit it and not have
a bunch of errors for all the Operator subclasses such as:

include/llvm/Operator.h:76:7: error: deleted function 'virtual llvm::OverflowingBinaryOperator::~OverflowingBinaryOperator()'
include/llvm/Operator.h:43:3: error: overriding non-deleted function 'virtual llvm::Operator::~Operator()'
include/llvm/Operator.h:76:7: error: 'virtual llvm::OverflowingBinaryOperator::~OverflowingBinaryOperator()' is implicitly deleted because the default definition would be ill-formed:
include/llvm/Operator.h:43:3: error: 'virtual llvm::Operator::~Operator()' is private
include/llvm/Operator.h:76:7: error: within this context

llvm-svn: 166611

11 years agoChanging the NSDate data formatter to use GetData().uint64[] instead of relying on...
Enrico Granata [Wed, 24 Oct 2012 19:05:32 +0000 (19:05 +0000)]
Changing the NSDate data formatter to use GetData().uint64[] instead of relying on SBValue.GetValueAsUnsigned() to reinterpret a double as a uint64_t

llvm-svn: 166610

11 years agoImprove DenseMap checks for power of 2 growth. Thanks for the tip Jakob
Pete Cooper [Wed, 24 Oct 2012 18:50:44 +0000 (18:50 +0000)]
Improve DenseMap checks for power of 2 growth.  Thanks for the tip Jakob

llvm-svn: 166609

11 years agoAdded process and thread logging the python OperatingSystem plug-in.
Greg Clayton [Wed, 24 Oct 2012 18:39:14 +0000 (18:39 +0000)]
Added process and thread logging the python OperatingSystem plug-in.

llvm-svn: 166608

11 years agoAdd some cleanup to the DataLayout changes requested by Chandler.
Micah Villmow [Wed, 24 Oct 2012 18:36:13 +0000 (18:36 +0000)]
Add some cleanup to the DataLayout changes requested by Chandler.

llvm-svn: 166607

11 years agoAdd a test showing that nodebug is accepted in methods too. Patch by
Rafael Espindola [Wed, 24 Oct 2012 18:34:26 +0000 (18:34 +0000)]
Add a test showing that nodebug is accepted in methods too. Patch by
Paul Robinson.

llvm-svn: 166606

11 years ago[libclang] Add "-index-file-full" option that recursively indexes any imported
Argyrios Kyrtzidis [Wed, 24 Oct 2012 18:29:15 +0000 (18:29 +0000)]
[libclang] Add "-index-file-full" option that recursively indexes any imported
modules/PCH files.

llvm-svn: 166605

11 years agoPatch from Ashok Thirumurthi that enabled FPU registers for POSIX x86_64.
Greg Clayton [Wed, 24 Oct 2012 18:24:14 +0000 (18:24 +0000)]
Patch from Ashok Thirumurthi that enabled FPU registers for POSIX x86_64.

llvm-svn: 166604

11 years ago<rdar://problem/12481949> Fixing SBValue.GetValueAsSigned() to do the right thing...
Enrico Granata [Wed, 24 Oct 2012 18:14:21 +0000 (18:14 +0000)]
<rdar://problem/12481949> Fixing SBValue.GetValueAsSigned() to do the right thing when dealing with a 32-bit negative value

llvm-svn: 166603

11 years agoOpt does not need to initialize the Asm printer/parser
Nadav Rotem [Wed, 24 Oct 2012 17:55:53 +0000 (17:55 +0000)]
Opt does not need to initialize the Asm printer/parser

llvm-svn: 166602

11 years agoExplicitly specify C++98 when building the C++ precompiled header for this test,...
Douglas Gregor [Wed, 24 Oct 2012 17:49:01 +0000 (17:49 +0000)]
Explicitly specify C++98 when building the C++ precompiled header for this test, so that the test will work on Windows.

llvm-svn: 166601

11 years ago[ms-inline asm] Add test cases for r166451.
Chad Rosier [Wed, 24 Oct 2012 17:48:01 +0000 (17:48 +0000)]
[ms-inline asm] Add test cases for r166451.

llvm-svn: 166600

11 years agoTeach the preprocessor to hold onto the preprocessor options.
Douglas Gregor [Wed, 24 Oct 2012 17:46:57 +0000 (17:46 +0000)]
Teach the preprocessor to hold onto the preprocessor options.

llvm-svn: 166599

11 years agoCleanup some variable names to indicate auto pointers and also manager the llvm:...
Greg Clayton [Wed, 24 Oct 2012 17:37:53 +0000 (17:37 +0000)]
Cleanup some variable names to indicate auto pointers and also manager the llvm::Module memory more correctly.

llvm-svn: 166598

11 years agoDelete the empty directory that was accidently added in 166578.
Micah Villmow [Wed, 24 Oct 2012 17:27:47 +0000 (17:27 +0000)]
Delete the empty directory that was accidently added in 166578.

llvm-svn: 166597

11 years agoBack out r166591, not sure why this made it through since I cancelled the command...
Micah Villmow [Wed, 24 Oct 2012 17:25:11 +0000 (17:25 +0000)]
Back out r166591, not sure why this made it through since I cancelled the command. Bleh, sorry about this!

llvm-svn: 166596

11 years agoOpt needs to initialize the different targets.
Nadav Rotem [Wed, 24 Oct 2012 17:23:50 +0000 (17:23 +0000)]
Opt needs to initialize the different targets.

llvm-svn: 166595

11 years ago[ms-inline asm] Add test cases for r166592. The test cases only works if the
Chad Rosier [Wed, 24 Oct 2012 17:23:06 +0000 (17:23 +0000)]
[ms-inline asm] Add test cases for r166592. The test cases only works if the
source operand is a register.

llvm-svn: 166594

11 years agoImplement a basic VectorTargetTransformInfo interface to be used by the loop and...
Nadav Rotem [Wed, 24 Oct 2012 17:22:41 +0000 (17:22 +0000)]
Implement a basic VectorTargetTransformInfo interface to be used by the loop and bb vectorizers for modeling the cost of instructions.

llvm-svn: 166593

11 years ago[ms-inline asm] Create a register operand, rather than a memory operand when we
Chad Rosier [Wed, 24 Oct 2012 17:22:29 +0000 (17:22 +0000)]
[ms-inline asm] Create a register operand, rather than a memory operand when we
see the offsetof operator.  Previously, we were matching something like MOVrm
in the front-end and later matching MOVrr in the back-end.  This change makes
things more consistent.  It also fixes cases where we can't match against a
memory operand as the source (test cases coming).
Part of rdar://12470317

llvm-svn: 166592

11 years agoDelete a directory that wasn't supposed to be checked in yet.
Micah Villmow [Wed, 24 Oct 2012 17:20:04 +0000 (17:20 +0000)]
Delete a directory that wasn't supposed to be checked in yet.

llvm-svn: 166591

11 years agoMove PreprocessorOptions into the Lex library, and make it intrusively
Douglas Gregor [Wed, 24 Oct 2012 17:01:35 +0000 (17:01 +0000)]
Move PreprocessorOptions into the Lex library, and make it intrusively
reference-counted.

llvm-svn: 166587

11 years ago(De-)serialize header search options.
Douglas Gregor [Wed, 24 Oct 2012 16:50:34 +0000 (16:50 +0000)]
(De-)serialize header search options.

llvm-svn: 166586

11 years agoUpdate unit tests for HeaderSearch change
Douglas Gregor [Wed, 24 Oct 2012 16:24:38 +0000 (16:24 +0000)]
Update unit tests for HeaderSearch change

llvm-svn: 166584

11 years agoMove HeaderSearchOptions into the Lex library, make it intrusively
Douglas Gregor [Wed, 24 Oct 2012 16:19:39 +0000 (16:19 +0000)]
Move HeaderSearchOptions into the Lex library, make it intrusively
reference-counted, and hold a reference to it in HeaderSearch.

llvm-svn: 166583

11 years agoUndef SEMANTIC_VALUE_DIAGOPT appropriately
Douglas Gregor [Wed, 24 Oct 2012 15:53:39 +0000 (15:53 +0000)]
Undef SEMANTIC_VALUE_DIAGOPT appropriately

llvm-svn: 166579

11 years agoAdd in support for getIntPtrType to get the pointer type based on the address space.
Micah Villmow [Wed, 24 Oct 2012 15:52:52 +0000 (15:52 +0000)]
Add in support for getIntPtrType to get the pointer type based on the address space.
This checkin also adds in some tests that utilize these paths and updates some of the
clients.

llvm-svn: 166578

11 years ago(De-)serialize the file system options.
Douglas Gregor [Wed, 24 Oct 2012 15:49:58 +0000 (15:49 +0000)]
(De-)serialize the file system options.

llvm-svn: 166577

11 years agoSerialize DiagnosticOptions to the AST file.
Douglas Gregor [Wed, 24 Oct 2012 15:17:15 +0000 (15:17 +0000)]
Serialize DiagnosticOptions to the AST file.

llvm-svn: 166572

11 years agoRemoved an extra blank line.
Mahesha S [Wed, 24 Oct 2012 15:12:40 +0000 (15:12 +0000)]
Removed an extra blank line.

llvm-svn: 166571

11 years agoAdds the possibility to run ASTMatchFinder over arbitrary AST nodes.
Manuel Klimek [Wed, 24 Oct 2012 14:47:44 +0000 (14:47 +0000)]
Adds the possibility to run ASTMatchFinder over arbitrary AST nodes.

llvm-svn: 166567

11 years agoSpecial calling conventions for Intel OpenCL built-in library.
Elena Demikhovsky [Wed, 24 Oct 2012 14:46:16 +0000 (14:46 +0000)]
Special calling conventions for Intel OpenCL built-in library.

llvm-svn: 166566

11 years agoAdd a simple test involving decltype on Objective-C properties and ivars
Douglas Gregor [Wed, 24 Oct 2012 14:13:21 +0000 (14:13 +0000)]
Add a simple test involving decltype on Objective-C properties and ivars

llvm-svn: 166562

11 years agoRemove the HiddenWeakTemplateVTables CodeGen option. It's currently unused.
Douglas Gregor [Wed, 24 Oct 2012 14:11:55 +0000 (14:11 +0000)]
Remove the HiddenWeakTemplateVTables CodeGen option. It's currently unused.

llvm-svn: 166561

11 years agoPass LLVM_ANDROID_TOOLCHAIN_DIR if set.
Evgeniy Stepanov [Wed, 24 Oct 2012 14:05:29 +0000 (14:05 +0000)]
Pass LLVM_ANDROID_TOOLCHAIN_DIR if set.

This lets one build ASan runtime for ARM/Android by running
make -C tools/clang/runtime/ \
  LLVM_ANDROID_TOOLCHAIN_DIR=/path/to/ndk/toolchain
in an existing build tree.

llvm-svn: 166560

11 years agoBuild ASan runtime for ARM/Android.
Evgeniy Stepanov [Wed, 24 Oct 2012 14:03:41 +0000 (14:03 +0000)]
Build ASan runtime for ARM/Android.

llvm-svn: 166559

11 years agoUpdate docs about TSan availability in CMake build
Alexey Samsonov [Wed, 24 Oct 2012 13:34:53 +0000 (13:34 +0000)]
Update docs about TSan availability in CMake build

llvm-svn: 166558

11 years agoFix some wordings in AddressSanitizer docs.
Alexey Samsonov [Wed, 24 Oct 2012 13:21:51 +0000 (13:21 +0000)]
Fix some wordings in AddressSanitizer docs.

llvm-svn: 166557

11 years ago[CMake] Introduce LLVM_EXTERNAL_COMPILER_RT_SOURCE_DIR.
NAKAMURA Takumi [Wed, 24 Oct 2012 12:26:08 +0000 (12:26 +0000)]
[CMake] Introduce LLVM_EXTERNAL_COMPILER_RT_SOURCE_DIR.

llvm-svn: 166552

11 years agoA number of test cases assume that an "int" parameter or return value
Ulrich Weigand [Wed, 24 Oct 2012 12:22:56 +0000 (12:22 +0000)]
A number of test cases assume that an "int" parameter or return value
will be represented in the IR as a plain "i32" type.  This causes the
tests to spuriously fail on platforms where int is not a 32-bit type,
or where the ABI requires attributes like "signext" or "zeroext" to
be used.

This patch adds -triple or -target parameters to force those tests
to use the i386-unknown-unknown target.

llvm-svn: 166551

11 years ago[ASan] Rename ReplaceCFAllocator to MaybeReplaceCFAllocator.
Alexander Potapenko [Wed, 24 Oct 2012 09:35:23 +0000 (09:35 +0000)]
[ASan] Rename ReplaceCFAllocator to MaybeReplaceCFAllocator.
Replace the allocator only if the replace_cfallocator flag is set (in some cases it wasn't checked)

llvm-svn: 166550

11 years ago[ASan] Use internal_memmove() in both static and dynamic runtime libraries if asan_in...
Alexander Potapenko [Wed, 24 Oct 2012 09:19:16 +0000 (09:19 +0000)]
[ASan] Use internal_memmove() in both static and dynamic runtime libraries if asan_inited != 0.

llvm-svn: 166549

11 years ago[ASan] Due to data races, ASan malloc stats are inaccurate, which may cause certain...
Alexey Samsonov [Wed, 24 Oct 2012 09:19:11 +0000 (09:19 +0000)]
[ASan] Due to data races, ASan malloc stats are inaccurate, which may cause certain ASan interface functions returning negative values (casted to unsigned). Return a reasonable value if such a case is detected.

llvm-svn: 166548

11 years agoAdd a testcase that would have noticed the typo fixed in commit 166475.
Duncan Sands [Wed, 24 Oct 2012 07:17:20 +0000 (07:17 +0000)]
Add a testcase that would have noticed the typo fixed in commit 166475.

llvm-svn: 166547

11 years agoTeach DAG combine to fold (buildvec (Xint2fp x)) to (Xint2fp (buildvec x))
Michael Liao [Wed, 24 Oct 2012 04:14:18 +0000 (04:14 +0000)]
Teach DAG combine to fold (buildvec (Xint2fp x)) to (Xint2fp (buildvec x))

- If more than 1 elemennts are defined and target supports the vectorized
  conversion, use the vectorized one instead to reduce the strength on
  conversion operation.

llvm-svn: 166546

11 years agoAdd custom conversion from v2u32 to v2f32 in 32-bit mode
Michael Liao [Wed, 24 Oct 2012 04:09:32 +0000 (04:09 +0000)]
Add custom conversion from v2u32 to v2f32 in 32-bit mode

- As there's no 64-bit GPRs in 32-bit mode, a custom conversion from v2u32 to
  v2f32 is added to improve the efficiency of the code generated.

llvm-svn: 166545

11 years agoRevert r166541, "clang/test: Add appropriate requirements as REQUIRES, corresponding...
NAKAMURA Takumi [Wed, 24 Oct 2012 03:59:09 +0000 (03:59 +0000)]
Revert r166541, "clang/test: Add appropriate requirements as REQUIRES, corresponding to r166532."

According to r166543, it is not needed for now.

llvm-svn: 166544

11 years agoClang now attempts to create a TargetMachine whenever a triple is given.
Nadav Rotem [Wed, 24 Oct 2012 03:52:31 +0000 (03:52 +0000)]
Clang now attempts to create a TargetMachine whenever a triple is given.
Many of our tests specify triples that are not built into clang.
In this commit we allow clang to fail loading the triple if we are only
using clang to emit llvm ir.

llvm-svn: 166543

11 years agoeArgTypePath was removed in r166533; change -c to
Jason Molenda [Wed, 24 Oct 2012 03:29:40 +0000 (03:29 +0000)]
eArgTypePath was removed in r166533; change -c to
expect eArgTypeFilename.

llvm-svn: 166542

11 years agoclang/test: Add appropriate requirements as REQUIRES, corresponding to r166532.
NAKAMURA Takumi [Wed, 24 Oct 2012 02:57:57 +0000 (02:57 +0000)]
clang/test: Add appropriate requirements as REQUIRES, corresponding to r166532.

llvm-svn: 166541

11 years agoAdd a test for -Warc-abi as requested by Fariborz.
Nico Weber [Wed, 24 Oct 2012 02:37:03 +0000 (02:37 +0000)]
Add a test for -Warc-abi as requested by Fariborz.

llvm-svn: 166540

11 years ago[mips] Make sure sret argument is returned in register V0.
Akira Hatanaka [Wed, 24 Oct 2012 02:10:54 +0000 (02:10 +0000)]
[mips] Make sure sret argument is returned in register V0.

llvm-svn: 166539

11 years agoAdd padding inreg registers to cause llvm to skip ecx when needed with
Rafael Espindola [Wed, 24 Oct 2012 01:59:00 +0000 (01:59 +0000)]
Add padding inreg registers to cause llvm to skip ecx when needed with
the x86_fastcallcc calling convention.

llvm-svn: 166538

11 years agoAdd inreg markers with the x86_fastcallcc calling convention.
Rafael Espindola [Wed, 24 Oct 2012 01:58:58 +0000 (01:58 +0000)]
Add inreg markers with the x86_fastcallcc calling convention.

llvm-svn: 166537

11 years agoChange x86_fastcallcc to require inreg markers. This allows it to known
Rafael Espindola [Wed, 24 Oct 2012 01:58:48 +0000 (01:58 +0000)]
Change x86_fastcallcc to require inreg markers. This allows it to known
the difference from "int x" (which should go in registers and
"struct y {int x;}" (which should not).

Clang will be updated in the next patches.

llvm-svn: 166536

11 years ago<rdar://problem/12523238> Commit 3 of 3
Enrico Granata [Wed, 24 Oct 2012 01:23:57 +0000 (01:23 +0000)]
<rdar://problem/12523238> Commit 3 of 3

Changed all relevant test cases to verify that MightHaveChildren() works correctly for objects of interest
Added a bunch of convenience methods for test cases to use: target(), process(), thread() and frame() which mimic the lldb.X convenience variables
As a bonus, edited the documentation on the website to describe the new method available for synthetic children providers writers to implement!

That's all folks!

llvm-svn: 166535

11 years agoAddress feedback from Eli Friedman on r166522.
Matt Beaumont-Gay [Wed, 24 Oct 2012 01:14:28 +0000 (01:14 +0000)]
Address feedback from Eli Friedman on r166522.

In particular, we do want to warn on some unused cast subexpressions within
macros.

llvm-svn: 166534

11 years agoThis is a fix for the command option parser.
Sean Callanan [Wed, 24 Oct 2012 01:12:14 +0000 (01:12 +0000)]
This is a fix for the command option parser.

There was a generic catch-all type for path arguments
called "eArgTypePath," and a specialized version
called "eArgTypeFilename."  It turns out all the
cases where we used eArgTypePath we could have
used Filename or we explicitly meant a directory.

I changed Path to DirectoryName, made it use the
directory completer, and rationalized the uses of
Path.

<rdar://problem/12559915>

llvm-svn: 166533

11 years agoChange EmitAssemblyHelper to create the target machine early
Nadav Rotem [Wed, 24 Oct 2012 00:53:38 +0000 (00:53 +0000)]
Change EmitAssemblyHelper to create the target machine early
and use it to initialize the TargetTransformInfo analysis pass.
We need the TTI information for the loop vectorizer.

rdar://12464901

llvm-svn: 166532

11 years agoKeep coding standard. Don't evaluate getNumOperands() every time.
Jakub Staszak [Wed, 24 Oct 2012 00:38:25 +0000 (00:38 +0000)]
Keep coding standard. Don't evaluate getNumOperands() every time.

llvm-svn: 166531

11 years agoFix ODR violations: a virtual function must be defined, even if it's never
Richard Smith [Wed, 24 Oct 2012 00:30:41 +0000 (00:30 +0000)]
Fix ODR violations: a virtual function must be defined, even if it's never
called. Provide an (asserting) definition of Operator's private destructor.
Remove destructors from all classes derived from Operator. We don't need them
for safety, because their implicit definitions would be ill-formed (they'd call
Operator's private destructor), and we don't need them to avoid emitting
vtables, because we don't do anything with Operator subclasses which would
trigger vtable instantiation.

The Operator hierarchy is still a complete disaster with regard to undefined
behavior, but this at least allows LLVM to link when using Clang's
-fcatch-undefined-behavior with a new vptr-based type checking mechanism.

llvm-svn: 166530

11 years ago[analyzer] Handle 'SomeVar.SomeEnumConstant', which is legal in C++.
Jordan Rose [Tue, 23 Oct 2012 23:59:08 +0000 (23:59 +0000)]
[analyzer] Handle 'SomeVar.SomeEnumConstant', which is legal in C++.

This caused assertion failures analyzing LLVM.

<rdar://problem/12560282>

llvm-svn: 166529

11 years ago[analyzer] Replace -analyzer-no-eagerly-trim-egraph with graph-trim-interval.
Jordan Rose [Tue, 23 Oct 2012 23:59:05 +0000 (23:59 +0000)]
[analyzer] Replace -analyzer-no-eagerly-trim-egraph with graph-trim-interval.

After every 1000 CFGElements processed, the ExplodedGraph trims out nodes
that satisfy a number of criteria for being "boring" (single predecessor,
single successor, and more). Rather than controlling this with a cc1 option,
which can only disable this behavior, we now have an analyzer-config option,
'graph-trim-interval', which can change this interval from 1000 to something
else. Setting the value to 0 disables reclamation.

The next commit relies on this behavior to actually test anything.

llvm-svn: 166528

11 years ago[ms-inline asm] Test case for r166526.
Chad Rosier [Tue, 23 Oct 2012 23:42:25 +0000 (23:42 +0000)]
[ms-inline asm] Test case for r166526.

llvm-svn: 166527

11 years ago[ms-inline asm] Offset operator - the size should be based on the size of a
Chad Rosier [Tue, 23 Oct 2012 23:42:06 +0000 (23:42 +0000)]
[ms-inline asm] Offset operator - the size should be based on the size of a
pointer, not the size of the variable.
Part of rdar://12470317

llvm-svn: 166526

11 years ago[ms-inline asm] Clean up comment.
Chad Rosier [Tue, 23 Oct 2012 23:34:28 +0000 (23:34 +0000)]
[ms-inline asm] Clean up comment.

llvm-svn: 166525

11 years ago[ms-inline asm] Update the triple to test r166523.
Chad Rosier [Tue, 23 Oct 2012 23:32:21 +0000 (23:32 +0000)]
[ms-inline asm] Update the triple to test r166523.

llvm-svn: 166524

11 years ago[ms-inline asm] When parsing inline assembly we set the base register to a
Chad Rosier [Tue, 23 Oct 2012 23:31:33 +0000 (23:31 +0000)]
[ms-inline asm] When parsing inline assembly we set the base register to a
non-zero value as we don't know the actual value at this point.  This is
necessary to get the matching correct in some cases.  However, the actual value
set as the base register doesn't matter, since we're just matching not emitting.

llvm-svn: 166523

11 years agoDon't emit -Wunused-value warnings from macro expansions.
Matt Beaumont-Gay [Tue, 23 Oct 2012 23:19:32 +0000 (23:19 +0000)]
Don't emit -Wunused-value warnings from macro expansions.

llvm-svn: 166522

11 years agoTweak include order
Douglas Gregor [Tue, 23 Oct 2012 23:13:50 +0000 (23:13 +0000)]
Tweak include order

llvm-svn: 166521

11 years agoUse a .def file for most of the diagnostic options.
Douglas Gregor [Tue, 23 Oct 2012 23:11:23 +0000 (23:11 +0000)]
Use a .def file for most of the diagnostic options.

llvm-svn: 166520

11 years agoClean up code and put transformation on (build_vec (ext x)) into a helper func
Michael Liao [Tue, 23 Oct 2012 23:06:52 +0000 (23:06 +0000)]
Clean up code and put transformation on (build_vec (ext x)) into a helper func

llvm-svn: 166519

11 years agoObjective-C: check that when a category method is being implemented,
Fariborz Jahanian [Tue, 23 Oct 2012 23:06:22 +0000 (23:06 +0000)]
Objective-C: check that when a category method is being implemented,
method type in cateogry matches the implementation.
// rdar://12519216

llvm-svn: 166518

11 years ago[Support/StringSet] Fix memory leak when inserted key already exists.
Michael J. Spencer [Tue, 23 Oct 2012 22:55:54 +0000 (22:55 +0000)]
[Support/StringSet] Fix memory leak when inserted key already exists.

llvm-svn: 166517

11 years agoBuildbot debugging is fun
Douglas Gregor [Tue, 23 Oct 2012 22:55:10 +0000 (22:55 +0000)]
Buildbot debugging is fun

llvm-svn: 166516

11 years agoMake branch heavy code for generating marked up disassembly simpler
Kevin Enderby [Tue, 23 Oct 2012 22:52:52 +0000 (22:52 +0000)]
Make branch heavy code for generating marked up disassembly simpler
and easier to read by adding a couple helper functions.  Suggestion by
Chandler Carruth and seconded by Meador Inge!

llvm-svn: 166515

11 years agoBetter error message for invalid argument to --category - silenced the printout of...
Enrico Granata [Tue, 23 Oct 2012 22:52:49 +0000 (22:52 +0000)]
Better error message for invalid argument to --category - silenced the printout of the raw args when not in verbose mode

llvm-svn: 166514

11 years agoOne last unit-test fix
Douglas Gregor [Tue, 23 Oct 2012 22:43:37 +0000 (22:43 +0000)]
One last unit-test fix

llvm-svn: 166513

11 years agoObjective C cleanup. Removed an cache that was no longer needed and changes the code...
Greg Clayton [Tue, 23 Oct 2012 22:41:19 +0000 (22:41 +0000)]
Objective C cleanup. Removed an cache that was no longer needed and changes the code that gets the dynamic type and class name to use our new Objective C cache.

llvm-svn: 166512

11 years agoMore unit-test fixes
Douglas Gregor [Tue, 23 Oct 2012 22:38:58 +0000 (22:38 +0000)]
More unit-test fixes

llvm-svn: 166511

11 years agoUpdate clang-interpreter example
Douglas Gregor [Tue, 23 Oct 2012 22:36:49 +0000 (22:36 +0000)]
Update clang-interpreter example

llvm-svn: 166510

11 years agoFixup unit tests for DiagnosticOptions change
Douglas Gregor [Tue, 23 Oct 2012 22:31:51 +0000 (22:31 +0000)]
Fixup unit tests for DiagnosticOptions change

llvm-svn: 166509

11 years agoMake DiagnosticOptions intrusively reference-counted, and make sure
Douglas Gregor [Tue, 23 Oct 2012 22:26:28 +0000 (22:26 +0000)]
Make DiagnosticOptions intrusively reference-counted, and make sure
the various stakeholders bump up the reference count. In particular,
the diagnostics engine now keeps the DiagnosticOptions object alive.

llvm-svn: 166508

11 years agoAdded a testcase for runtime types in Objective-C.
Sean Callanan [Tue, 23 Oct 2012 22:14:39 +0000 (22:14 +0000)]
Added a testcase for runtime types in Objective-C.

llvm-svn: 166507

11 years ago<rdar://problem/12523238> Commit 2 of 3
Enrico Granata [Tue, 23 Oct 2012 21:54:53 +0000 (21:54 +0000)]
<rdar://problem/12523238> Commit 2 of 3

Adding the new has_children (or MightHaveChildren() in C++) for the existing synthetic children providers
In a few cases, the new call is going to be much more efficient than the previous num_children > 0 check
When the optimization was marginal (e.g. std::vector<>), the choice was to use num_children in order to keep
implementation details in one function instead of duplicating code

Next step is to provide test cases

llvm-svn: 166506

11 years agoCMake: Fix public header search for generating Xcode/MSVC projects.
Jordan Rose [Tue, 23 Oct 2012 21:54:03 +0000 (21:54 +0000)]
CMake: Fix public header search for generating Xcode/MSVC projects.

Previously, we only had support for one level of library under lib/,
with the existence of the two-level lib/StaticAnalyzer/* hardcoded in
the top-level CMakeLists.txt. This became a problem with split of
libRewrite into several libraries -- with the same sub-names as the
libraries in lib/StaticAnalyzer/.

Now, we match up anything under lib/ to the corresponding directory
in include/clang/.

llvm-svn: 166505

11 years agoFix PR14161
Michael Liao [Tue, 23 Oct 2012 21:40:15 +0000 (21:40 +0000)]
Fix PR14161

- Check index being extracted to be constant 0 before simplfiying.
  Otherwise, retain the original sequence.

llvm-svn: 166504

11 years agoCMake: Include private headers / tablegen files in generated Xcode projects.
Jordan Rose [Tue, 23 Oct 2012 21:36:55 +0000 (21:36 +0000)]
CMake: Include private headers / tablegen files in generated Xcode projects.

llvm-svn: 166503

11 years agoTurns out there are 8 bits in a byte.
Jim Ingham [Tue, 23 Oct 2012 21:09:09 +0000 (21:09 +0000)]
Turns out there are 8 bits in a byte.

llvm-svn: 166502

11 years agoMake the indirect branch optimization deterministic. No functionality change.
Nadav Rotem [Tue, 23 Oct 2012 21:05:33 +0000 (21:05 +0000)]
Make the indirect branch optimization deterministic. No functionality change.

Patch by Daniel Reynaud.

llvm-svn: 166501

11 years agoFix pretty-printing pseudo-destructor calls. Patch by Grzegorz Jablonski.
Eli Friedman [Tue, 23 Oct 2012 20:26:57 +0000 (20:26 +0000)]
Fix pretty-printing pseudo-destructor calls.  Patch by Grzegorz Jablonski.

llvm-svn: 166500

11 years agoDelete junk that snuck into r166498.
Eli Friedman [Tue, 23 Oct 2012 20:23:23 +0000 (20:23 +0000)]
Delete junk that snuck into r166498.

llvm-svn: 166499

11 years agoAdd a new warning -Wmissing-variable-declarations, to warn about variables
Eli Friedman [Tue, 23 Oct 2012 20:19:32 +0000 (20:19 +0000)]
Add a new warning -Wmissing-variable-declarations, to warn about variables
defined without a previous declaration.  This is similar to
-Wmissing-prototypes, but for variables instead of functions.

Patch by Ed Schouten.

llvm-svn: 166498

11 years agoSwitch CodeGenOptions over to a .def file, like we do with LangOptions.
Douglas Gregor [Tue, 23 Oct 2012 20:05:01 +0000 (20:05 +0000)]
Switch CodeGenOptions over to a .def file, like we do with LangOptions.

llvm-svn: 166497

11 years agoWhen rebuilding a DependentScopeDeclRefExpr, perform a lookup into the scope
Richard Smith [Tue, 23 Oct 2012 19:56:01 +0000 (19:56 +0000)]
When rebuilding a DependentScopeDeclRefExpr, perform a lookup into the scope
even if it's dependent, in case it now names a member of the current instantiation.

llvm-svn: 166496