llvm-6502/include/llvm
Filipe Cabecinhas 70a2c7260a Extract the load/store type verification to a separate function.
Summary:
Added isLoadableOrStorableType to PointerType.

We were doing some checks in some places, occasionally assert()ing instead
of telling the caller. With this patch, I'm putting all type checking in
the same place for load/store type instructions, and verifying the same
thing every time.

I also added a check for load/store of a function type.

Applied extracted check to Load, Store, and Cmpxcg.

I don't have exhaustive tests for all of these, but all Error() calls in
TypeCheckLoadStoreInst are being tested (in invalid.test).

Reviewers: dblaikie, rafael

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D9785

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237619 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-18 21:48:55 +00:00
..
ADT DenseMap: Remove poisoning of unused memory. 2015-05-16 14:19:54 +00:00
Analysis Exploit dereferenceable_or_null attribute in LICM pass 2015-05-18 18:07:00 +00:00
AsmParser
Bitcode [opaque pointer type] Encode the pointee type in the bitcode for 'cmpxchg' 2015-04-28 04:30:29 +00:00
CodeGen MachineInstr: Change return value of getOpcode() to unsigned. 2015-05-18 20:27:55 +00:00
Config [ADT][CMake][AutoConf] Fail-fast iterators for DenseMap 2015-03-26 19:25:01 +00:00
DebugInfo Add more missing #includes, found by modules build. 2015-05-11 22:41:07 +00:00
ExecutionEngine Fix the clang -Werror build, use of uninitialized variable. 2015-05-05 18:12:33 +00:00
IR Extract the load/store type verification to a separate function. 2015-05-18 21:48:55 +00:00
IRReader
LineEditor Use 'override/final' instead of 'virtual' for overridden methods 2015-04-11 02:11:45 +00:00
Linker Linker: Add flag to override linkage rules 2015-04-22 04:11:00 +00:00
LTO LTO: Add API to choose whether to embed uselists 2015-04-27 23:38:54 +00:00
MC MC: clang-format MCContext. NFC. 2015-05-18 18:43:23 +00:00
Object [obj2yaml/yaml2obj] Add SHT_MIPS_ABIFLAGS section support 2015-05-07 15:40:48 +00:00
Option Use 'override/final' instead of 'virtual' for overridden methods 2015-04-11 02:11:45 +00:00
Passes [PM] Create a separate library for high-level pass management code. 2015-03-07 09:02:36 +00:00
ProfileData Tidy comments in SampleProfile header. NFC. 2015-05-12 22:03:00 +00:00
Support [YAML] Plug a memory leak 2015-05-18 21:11:27 +00:00
TableGen [TableGen] Remove ListInit::size() in favor of getSize() which does the same thing and is already used in most places. NFC. 2015-05-14 05:53:56 +00:00
Target MachineInstr: Change return value of getOpcode() to unsigned. 2015-05-18 20:27:55 +00:00
Transforms Exploit dereferenceable_or_null attribute in LICM pass 2015-05-18 18:07:00 +00:00
CMakeLists.txt
InitializePasses.h Add a speculative execution pass 2015-05-15 17:54:48 +00:00
LinkAllIR.h
LinkAllPasses.h Add a speculative execution pass 2015-05-15 17:54:48 +00:00
module.modulemap Fix modules build post-r235612. 2015-04-23 23:22:26 +00:00
module.modulemap.build
Pass.h Use 'override/final' instead of 'virtual' for overridden methods 2015-04-11 02:11:45 +00:00
PassAnalysisSupport.h Removing LLVM_DELETED_FUNCTION, as MSVC 2012 was the last reason for requiring the macro. NFC; LLVM edition. 2015-02-15 22:54:22 +00:00
PassInfo.h Removing LLVM_DELETED_FUNCTION, as MSVC 2012 was the last reason for requiring the macro. NFC; LLVM edition. 2015-02-15 22:54:22 +00:00
PassRegistry.h Revert r231276 (including r231277): Add a lock() function in PassRegistry to speed up multi-thread synchronization. 2015-03-05 17:53:00 +00:00
PassSupport.h Defining a new API for debug options that doesn't rely on static global cl::opts. 2014-10-15 21:54:35 +00:00