llvm/lib
Pete Cooper aaa3fa61d2 Rename NumOperands to make it clear its managed by the User. NFC.
This is to try make it very clear that subclasses shouldn't be changing
the value directly.  Now that OperandList for normal instructions is computed
using the NumOperands, its critical that the NumOperands is accurate or we
could compute the wrong offset to the first operand.

I looked over all places which update NumOperands and they are all safe.
Hung off use User's don't use NumOperands to compute the OperandList so they
are safe to continue to manipulate it.  The only other User which changed it
was GlobalVariable which has an optional init list but always allocated space
for a single Use.  It was correctly setting NumOperands to 1 before setting an
initializer, and setting it to 0 after clearing the init list, so the order was safe.

Added some comments to that code to make sure that this isn't changed in future
without being aware of this constraint.

Reviewed by Duncan Exon Smith.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239621 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-12 17:48:10 +00:00
..
Analysis Don't create instructions from ConstantExpr's in CFLAliasAnalysis. 2015-06-12 16:13:54 +00:00
AsmParser Fix doxygen comments. NFC 2015-06-07 06:40:24 +00:00
Bitcode Use early return idiom. NFC 2015-06-06 20:44:53 +00:00
CodeGen [WinEH] Put finally pointers in the handler scope table field 2015-06-11 23:37:18 +00:00
DebugInfo [DWARF] Fix a bug in line info handling 2015-05-31 23:37:04 +00:00
ExecutionEngine fix crash 2015-06-10 03:06:06 +00:00
Fuzzer [lib/Fuzzer] make assertions more informative and update comments for the user-supplied mutator 2015-05-30 17:33:13 +00:00
IR Rename NumOperands to make it clear its managed by the User. NFC. 2015-06-12 17:48:10 +00:00
IRReader Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
LibDriver LibDriver, llvm-lib: introduce. 2015-06-09 21:50:22 +00:00
LineEditor Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
Linker While in GlobalValue fix the function(s) that don't follow the 2015-05-15 18:20:14 +00:00
LTO LTO: expose LTO_SYMBOL_COMDAT flag, which indicates that the definition is part of a comdat group. 2015-06-11 21:41:27 +00:00
MC [WinEH] Create an llvm.x86.seh.exceptioninfo intrinsic 2015-06-11 22:32:23 +00:00
Object Object: Prepend __imp_ when mangling a dllimport symbol in IRObjectFile. 2015-06-11 21:42:18 +00:00
Option Option parsing: properly handle flag aliases for joined options (PR23394) 2015-05-04 18:00:13 +00:00
Passes [PM] Fixup for r231556 where I missed a dependency on intrinsics 2015-03-07 09:08:20 +00:00
ProfileData InstrProf: Fix reading of consecutive 32 bit coverage maps 2015-06-05 01:23:42 +00:00
Support [ARM] Disabling vfp4 should disable fp16 2015-06-12 09:38:51 +00:00
TableGen [TableGen] Change OpInit::getNumOperands and getOperand to use unsigned integers. NFC 2015-06-06 01:34:04 +00:00
Target Remove a hack that tries to align '*'. 2015-06-12 12:42:13 +00:00
Transforms [ASan] format AddressSanitizer.cpp with clang-format -style=Google, NFC 2015-06-12 11:27:06 +00:00
CMakeLists.txt LibDriver, llvm-lib: introduce. 2015-06-09 21:50:22 +00:00
LLVMBuild.txt LibDriver, llvm-lib: introduce. 2015-06-09 21:50:22 +00:00
Makefile LibDriver, llvm-lib: introduce. 2015-06-09 21:50:22 +00:00