summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Move block return type inference diagnostic to a common place whereFariborz Jahanian2011-12-033-17/+18
| | | | | | Function or array lvalue conversions happens. llvm-svn: 145782
* Emit the ctors in the proper order on ARM/EABI.Anton Korobeynikov2011-12-038-18/+52
| | | | | | | | Maybe some targets should use this as well. Patch by Evgeniy Stepanov! llvm-svn: 145781
* Sparc CodeGen: Fix AnalyzeBranch for PR 10282. Removing addSuccessor() sinceVenkatraman Govindaraju2011-12-032-1/+26
| | | | | | AnalyzeBranch doesn't change the successor, just the order. llvm-svn: 145779
* Version #next on the hash functions for scalars. This builds on Dave's ↵Howard Hinnant2011-12-032-83/+149
| | | | | | work, extends it to T*, and changes the way double and long double are handled (no longer convert to float on 32 bit). I also picked up a minor bug with uninitialized bits on the upper end of size_t when sizeof(size_t) > sizeof(T), e.g. in hash<float>. Most of the functionality has been put in one place: __scalar_hash in <memory>. Unfortunately I could not reuse __scalar_hash for hash<long double> on x86 because of the padding bits which need to be zeroed. I didn't want to add this zeroing step to the more general __scalar_hash when it isn't needed (in the absence of padding bits). I'm not ignoring the hash<string> issue (possibly changing that to a better hash). I just haven't gotten there yet. llvm-svn: 145778
* Added the ability for clients to grab a set of symbol table indexes and thenGreg Clayton2011-12-036-120/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add them to a fast lookup map. lldb_private::Symtab now export the following public typedefs: namespace lldb_private { class Symtab { typedef std::vector<uint32_t> IndexCollection; typedef UniqueCStringMap<uint32_t> NameToIndexMap; }; } Clients can then find symbols by name and or type and end up with a Symtab::IndexCollection that is filled with indexes. These indexes can then be put into a name to index lookup map and control if the mangled and demangled names get added to the map: bool add_demangled = true; bool add_mangled = true; Symtab::NameToIndexMap name_to_index; symtab->AppendSymbolNamesToMap (indexes, add_demangled, add_mangled, name_to_index). This can be repeated as many times as needed to get a lookup table that you are happy with, and then this can be sorted: name_to_index.Sort(); Now name lookups can be done using a subset of the symbols you extracted from the symbol table. This is currently being used to extract objective C types from object files when there is no debug info in SymbolFileSymtab. Cleaned up how the objective C types were being vended to be more efficient and fixed some errors in the regular expression that was being used. llvm-svn: 145777
* Fix mangling substitutions for address-space-qualified classDouglas Gregor2011-12-032-2/+15
| | | | | | types. Patch from Dmitri Rubinstein! llvm-svn: 145776
* Implement support for the __is_final type trait, to determine whetherDouglas Gregor2011-12-0311-0/+52
| | | | | | | a class is marked 'final', from Alberto Ganesh Barbati! Fixes PR11462. llvm-svn: 145775
* If block literal return type is not specified, return type of the block is Fariborz Jahanian2011-12-038-5/+54
| | | | | | | inferred from return types. All the return statements have to agree about the type. // rdar://10466373 llvm-svn: 145774
* Simplify code. No functionality change.Benjamin Kramer2011-12-031-2/+1
| | | | | | -3% on ARMDissasembler.cpp. llvm-svn: 145773
* In Microsoft mode, don't perform typo correction in a template member ↵Francois Pichet2011-12-032-0/+27
| | | | | | | | | | function dependent context because it interferes with the "lookup into dependent bases of class templates" feature. Basically typo correction will try to offer a correction instead of looking into type dependent base classes. I found this problem while parsing Microsoft ATL code with clang. llvm-svn: 145772
* Clear the new cache.Benjamin Kramer2011-12-031-0/+1
| | | | llvm-svn: 145771
* Add a "seen blocks" cache to LVI to avoid a linear scan over the whole cache ↵Benjamin Kramer2011-12-031-1/+13
| | | | | | | | | just to remove no blocks from the maps. -15% on ARMDisassembler.cpp (Release build). It's not that great to add another layer of caching to the caching-heavy LVI but I don't see a better way. llvm-svn: 145770
* Implement overload resolution for reference-typed parameters supplied with ↵Sebastian Redl2011-12-032-3/+108
| | | | | | initializer lists. llvm-svn: 145769
* Check for stack space more intelligently.Sanjoy Das2011-12-032-13/+43
| | | | | | | | | libgcc sets the stack limit field in TCB to 256 bytes above the actual allocated stack limit. This means if the function's stack frame needs less than 256 bytes, we can just compare the stack pointer with the stack limit. This should result in lesser calls to __morestack. llvm-svn: 145766
* Fix a bug in the x86-32 code generated for segmented stacks.Sanjoy Das2011-12-032-14/+2
| | | | | | | | | | Currently LLVM pads the call to __morestack with a add and sub of 8 bytes to esp. This isn't correct since __morestack expects the call to be followed directly by a ret. This commit also adjusts the relevant test-case. llvm-svn: 145765
* Added code to make sure we don't recursively try to find an objective CGreg Clayton2011-12-034-14/+216
| | | | | | | | | | | class. The thing with Objective C classes is the debug info might have a definition that isn't just a forward decl, but it is incomplete. So we need to look and see if we can find the complete definition and avoid recursing a lot due to the fact that our accelerator tables will have many versions of the type, but only one complete one. We might not also have the complete type and we need to deal with this correctly. llvm-svn: 145759
* Testcase fixes with the new symbol lookup code forSean Callanan2011-12-038-30/+37
| | | | | | | | | | | | Objective-C, making symbol lookups for various raw Objective-C symbols work correctly. The IR interpreter makes these lookups because Clang has emitted raw symbol references for ivars and classes. Also improved performance in SymbolFiles, caching the result of asking for SymbolFile abilities. llvm-svn: 145758
* Added a code for a test to find the real Objective C class definition. I Greg Clayton2011-12-036-0/+110
| | | | | | still need to write the test case file. llvm-svn: 145756
* Switch LValue so that it exposes alignment in CharUnits. (No functional ↵Eli Friedman2011-12-0310-50/+45
| | | | | | change.) llvm-svn: 145753
* [PCH] Make sure that the SourceExpr of a OpaqueValueExpr is always initializedArgyrios Kyrtzidis2011-12-035-36/+20
| | | | | | | | | | when deserialized, fixing random crashes in libclang. Also simplifies how OpaqueValueExprs are [de]serialized. The reader/writer automatically retains pointer equality of sub-statements (when a statement node is referenced in multiple nodes), so no need to manually handle it. llvm-svn: 145752
* [libclang] Fix infinite loop when doing visitation of an OpaqueValueExpr.Argyrios Kyrtzidis2011-12-032-1/+4
| | | | llvm-svn: 145751
* [libclang] Allow indexing/get-cursor/etc. for the exception variable in a ↵Argyrios Kyrtzidis2011-12-032-0/+16
| | | | | | C++ catch. llvm-svn: 145750
* Added ClangExternalASTSourceCommon, a local superclassSean Callanan2011-12-037-33/+171
| | | | | | | | | | | | | | | | | for all our external AST sources that lets us associate arbitrary flags with the types we put into the AST contexts. Also added an API on ClangASTContext that allows access to these flags given only an ASTContext and a type. Because we don't have access to RTTI, and because at some point in the future we might encounter external AST sources that we didn't make (so they don't subclass ClangExternalASTSourceCommon) I added a magic number that we check before doing anything else, so that we can catch that problem as soon as it appears. llvm-svn: 145748
* Add a utility to get a RValue for a given LValue for an aggregate; switch a ↵Eli Friedman2011-12-033-7/+9
| | | | | | few places over to it. llvm-svn: 145747
* Remove accidental "else" that was left in in prior checking.Greg Clayton2011-12-031-1/+1
| | | | llvm-svn: 145746
* Creating multiple JITs on X86 in multiple threads causes multiple writes (ofNick Lewycky2011-12-031-0/+2
| | | | | | | | the same value) to this variable. This code could be refactored, but it doesn't matter since the old JIT is going away. Add tsan annotations to ignore the race. llvm-svn: 145745
* Added new symbol types for Objective C classes, metaclasses, and ivars. EachGreg Clayton2011-12-037-107/+169
| | | | | | | | object file can correctly make these symbols which will abstract us from the file format and ABI and we can then ask for the objective C class symbol for a class and find out which object file it was defined in. llvm-svn: 145744
* [asan] get rid of some more dependency on libstdc++Kostya Serebryany2011-12-032-2/+3
| | | | llvm-svn: 145743
* [arm-fast-isel] Unaligned stores of floats require special care.Chad Rosier2011-12-032-3/+40
| | | | | | rdar://10510150 llvm-svn: 145742
* Switch the Alignment argument on AggValueSlot over to CharUnits, per John's ↵Eli Friedman2011-12-037-20/+17
| | | | | | review comment. llvm-svn: 145741
* Make the ThreadPlanStepThrough set a backstop breakpoint on the return ↵Jim Ingham2011-12-0311-98/+314
| | | | | | | | | | | | | | address from the function it is being asked to step through, so that even if we get the trampoline target wrong (for instance) we will still not lose control. The other fix here is to tighten up the handling of the case where the current plan doesn't explain the stop, but a plan above us does. In that case, if the plan that does explain the stop says it is done, we need to clean up the plans below it and continue on with our processing. llvm-svn: 145740
* [asan] micro-benchmark for use-after-return fake stackKostya Serebryany2011-12-031-0/+9
| | | | llvm-svn: 145739
* Module files representing actual modules don't need to know the set of ↵Douglas Gregor2011-12-031-19/+20
| | | | | | modules they import, since that information isn't actually used. Drop it from the AST file llvm-svn: 145738
* Implement support for precompiled headers, preambles, and serializedDouglas Gregor2011-12-035-6/+50
| | | | | | | | "main" files that import modules. When loading any of these kinds of AST files, we make the modules that were imported visible into the translation unit that loaded the PCH file or preamble. llvm-svn: 145737
* Track alignment in AggValueSlot. No functional change in this patch, but ↵Eli Friedman2011-12-037-30/+59
| | | | | | I'll be introducing uses of the specified alignment soon. llvm-svn: 145736
* Fixed some extra warnings that show up with the new clang.Greg Clayton2011-12-035-15/+15
| | | | llvm-svn: 145735
* Keep track of all of the import declarations that are parsed orDouglas Gregor2011-12-035-4/+85
| | | | | | | implicitly generated in a translation unit. Modules will need this information to identify the actual imports that occurred. llvm-svn: 145734
* <rdar://problem/10522194>Greg Clayton2011-12-031-19/+47
| | | | | | | | | | | | | | | Fixed an issue where if we have the DWARF equivalent of: struct foo; class foo { ... }; Or vice versa, we wouldn't be able to find the complete type. Since many compilers allow forward declarations to have struct and definitions to have class, we need to be able to deal with both cases. This commit fixes this in the DWARF parser. llvm-svn: 145733
* Let's also record the compiler version used for compiling the inferior into ↵Johnny Chen2011-12-031-0/+3
| | | | | | the session info llvm-svn: 145732
* Fixed deadstoreelimination bug where negative indices were incorrectly ↵Pete Cooper2011-12-032-1/+18
| | | | | | | | | | causing the optimisation to occur Turns out long long + unsigned long long is unsigned. Doh! Fixes http://llvm.org/bugs/show_bug.cgi?id=11455 llvm-svn: 145731
* Add support for constant folding the pow intrinsic.Chad Rosier2011-12-032-3/+15
| | | | | | rdar://10514247 llvm-svn: 145730
* I had picked up the wrong version of DaveZ's hash patches. Corrected here.Howard Hinnant2011-12-021-39/+49
| | | | llvm-svn: 145728
* When we treat an #include or #import as a module import, create anDouglas Gregor2011-12-028-12/+30
| | | | | | | implicit ImportDecl in the translation unit to record the presence of the import. llvm-svn: 145727
* ARM NEON VEXT aliases for data type suffices.Jim Grosbach2011-12-024-11/+58
| | | | llvm-svn: 145726
* Introduce a module import declaration, so that we properly represent, e.g.,Douglas Gregor2011-12-0213-5/+219
| | | | | | | | __import_module__ std.vector; in the AST. llvm-svn: 145725
* Revert r145697 and dependent patch r145702. It added a dependency fromNick Lewycky2011-12-025-74/+20
| | | | | | lib/Analysis to lib/Sema which is cyclical. llvm-svn: 145724
* [asan] put back -O2 which was lost quite some time ago and caused noticeable ↵Kostya Serebryany2011-12-021-2/+2
| | | | | | perf drop in malloc-intensive apps. doh. llvm-svn: 145723
* ARM VEXT tighten up operand classes a bit.Jim Grosbach2011-12-021-2/+2
| | | | llvm-svn: 145722
* Fixes to hash for long long, unsigned long long, float, double and long ↵Howard Hinnant2011-12-021-22/+56
| | | | | | double. Credit Dave Zarzycki llvm-svn: 145721
* <rdar://problem/10410131>Greg Clayton2011-12-021-1/+1
| | | | | | Fixed an issue that could cause an infinite recursion when using "type filter". llvm-svn: 145720
OpenPOWER on IntegriCloud