llvm-6502/include/llvm-c
Kostya Serebryany 164b86b439 Extend Attributes to 64 bits
Problem: LLVM needs more function attributes than currently available (32 bits).
One such proposed attribute is "address_safety", which shows that a function is being checked for address safety (by AddressSanitizer, SAFECode, etc).

Solution:
- extend the Attributes from 32 bits to 64-bits
- wrap the object into a class so that unsigned is never erroneously used instead
- change "unsigned" to "Attributes" throughout the code, including one place in clang.
- the class has no "operator uint64 ()", but it has "uint64_t Raw() " to support packing/unpacking.
- the class has "safe operator bool()" to support the common idiom:  if (Attributes attr = getAttrs()) useAttrs(attr);
- The CTOR from uint64_t is marked explicit, so I had to add a few explicit CTOR calls
- Add the new attribute "address_safety". Doing it in the same commit to check that attributes beyond first 32 bits actually work.
- Some of the functions from the Attribute namespace are worth moving inside the class, but I'd prefer to have it as a separate commit.

Tested:
"make check" on Linux (32-bit and 64-bit) and Mac (10.6)
built/run spec CPU 2006 on Linux with clang -O2.


This change will break clang build in lib/CodeGen/CGCall.cpp.
The following patch will fix it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148553 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-20 17:56:17 +00:00
..
Transforms Add missing file. 2011-08-09 22:19:52 +00:00
Analysis.h
BitReader.h
BitWriter.h
Core.h Extend Attributes to 64 bits 2012-01-20 17:56:17 +00:00
Disassembler.h Adding back support for printing operands symbolically to ARM's new disassembler 2011-10-04 22:44:48 +00:00
EnhancedDisassembly.h Trailing whitespace. 2011-03-14 20:59:06 +00:00
ExecutionEngine.h
Initialization.h Add initialization routines for Instrumentation. 2010-10-07 20:17:24 +00:00
LinkTimeOptimizer.h Fix comment typo. 2010-11-02 15:12:48 +00:00
lto.h Fix a ton of comment typos found by codespell. Patch by 2011-04-15 05:18:47 +00:00
Object.h Fixed ObjectFile functions: 2011-11-29 17:40:10 +00:00
Target.h llvm-c: Add a few missing InitializeAll* functions. 2011-11-29 00:06:55 +00:00