summaryrefslogtreecommitdiffstats
path: root/include/llvm/Support
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2010-07-15 17:06:11 +0000
committerrdivacky <rdivacky@FreeBSD.org>2010-07-15 17:06:11 +0000
commitc1c3262b63b1d5fbba6a7ad188f4e47d92c7840e (patch)
tree5b6d391c72c9875f0065f0e772e872bc8544834b /include/llvm/Support
parent9112829d76cbb8e0c8ef51bbc2d7d1be48cd7b74 (diff)
downloadFreeBSD-src-c1c3262b63b1d5fbba6a7ad188f4e47d92c7840e.zip
FreeBSD-src-c1c3262b63b1d5fbba6a7ad188f4e47d92c7840e.tar.gz
Update LLVM to r108428.
Diffstat (limited to 'include/llvm/Support')
-rw-r--r--include/llvm/Support/COFF.h92
-rw-r--r--include/llvm/Support/Regex.h4
-rw-r--r--include/llvm/Support/StringPool.h2
3 files changed, 66 insertions, 32 deletions
diff --git a/include/llvm/Support/COFF.h b/include/llvm/Support/COFF.h
index 2d4e054..69137bf 100644
--- a/include/llvm/Support/COFF.h
+++ b/include/llvm/Support/COFF.h
@@ -10,12 +10,12 @@
// This file contains an definitions used in Windows COFF Files.
//
// Structures and enums defined within this file where created using
-// information from Microsofts publicly available PE/COFF format document:
+// information from Microsoft's publicly available PE/COFF format document:
//
// Microsoft Portable Executable and Common Object File Format Specification
// Revision 8.1 - February 15, 2008
//
-// As of 5/2/2010, hosted by microsoft at:
+// As of 5/2/2010, hosted by Microsoft at:
// http://www.microsoft.com/whdc/system/platform/firmware/pecoff.mspx
//
//===----------------------------------------------------------------------===//
@@ -57,7 +57,7 @@ namespace COFF {
uint8_t NumberOfAuxSymbols;
};
- enum symbol_flags {
+ enum SymbolFlags {
SF_TypeMask = 0x0000FFFF,
SF_TypeShift = 0,
@@ -67,36 +67,70 @@ namespace COFF {
SF_WeakReference = 0x01000000
};
- enum symbol_storage_class {
- IMAGE_SYM_CLASS_END_OF_FUNCTION = -1,
- IMAGE_SYM_CLASS_NULL = 0,
- IMAGE_SYM_CLASS_AUTOMATIC = 1,
- IMAGE_SYM_CLASS_EXTERNAL = 2,
- IMAGE_SYM_CLASS_STATIC = 3,
- IMAGE_SYM_CLASS_REGISTER = 4,
- IMAGE_SYM_CLASS_EXTERNAL_DEF = 5,
- IMAGE_SYM_CLASS_LABEL = 6,
- IMAGE_SYM_CLASS_UNDEFINED_LABEL = 7,
- IMAGE_SYM_CLASS_MEMBER_OF_STRUCT = 8,
- IMAGE_SYM_CLASS_ARGUMENT = 9,
- IMAGE_SYM_CLASS_STRUCT_TAG = 10,
- IMAGE_SYM_CLASS_MEMBER_OF_UNION = 11,
- IMAGE_SYM_CLASS_UNION_TAG = 12,
- IMAGE_SYM_CLASS_TYPE_DEFINITION = 13,
- IMAGE_SYM_CLASS_UNDEFINED_STATIC = 14,
- IMAGE_SYM_CLASS_ENUM_TAG = 15,
- IMAGE_SYM_CLASS_MEMBER_OF_ENUM = 16,
- IMAGE_SYM_CLASS_REGISTER_PARAM = 17,
- IMAGE_SYM_CLASS_BIT_FIELD = 18,
+ /// Storage class tells where and what the symbol represents
+ enum SymbolStorageClass {
+ IMAGE_SYM_CLASS_END_OF_FUNCTION = -1, ///< Physical end of function
+ IMAGE_SYM_CLASS_NULL = 0, ///< No symbol
+ IMAGE_SYM_CLASS_AUTOMATIC = 1, ///< Stack variable
+ IMAGE_SYM_CLASS_EXTERNAL = 2, ///< External symbol
+ IMAGE_SYM_CLASS_STATIC = 3, ///< Static
+ IMAGE_SYM_CLASS_REGISTER = 4, ///< Register variable
+ IMAGE_SYM_CLASS_EXTERNAL_DEF = 5, ///< External definition
+ IMAGE_SYM_CLASS_LABEL = 6, ///< Label
+ IMAGE_SYM_CLASS_UNDEFINED_LABEL = 7, ///< Undefined label
+ IMAGE_SYM_CLASS_MEMBER_OF_STRUCT = 8, ///< Member of structure
+ IMAGE_SYM_CLASS_ARGUMENT = 9, ///< Function argument
+ IMAGE_SYM_CLASS_STRUCT_TAG = 10, ///< Structure tag
+ IMAGE_SYM_CLASS_MEMBER_OF_UNION = 11, ///< Member of union
+ IMAGE_SYM_CLASS_UNION_TAG = 12, ///< Union tag
+ IMAGE_SYM_CLASS_TYPE_DEFINITION = 13, ///< Type definition
+ IMAGE_SYM_CLASS_UNDEFINED_STATIC = 14, ///< Undefined static
+ IMAGE_SYM_CLASS_ENUM_TAG = 15, ///< Enumeration tag
+ IMAGE_SYM_CLASS_MEMBER_OF_ENUM = 16, ///< Member of enumeration
+ IMAGE_SYM_CLASS_REGISTER_PARAM = 17, ///< Register parameter
+ IMAGE_SYM_CLASS_BIT_FIELD = 18, ///< Bit field
+ /// ".bb" or ".eb" - beginning or end of block
IMAGE_SYM_CLASS_BLOCK = 100,
+ /// ".bf" or ".ef" - beginning or end of function
IMAGE_SYM_CLASS_FUNCTION = 101,
- IMAGE_SYM_CLASS_END_OF_STRUCT = 102,
- IMAGE_SYM_CLASS_FILE = 103,
+ IMAGE_SYM_CLASS_END_OF_STRUCT = 102, ///< End of structure
+ IMAGE_SYM_CLASS_FILE = 103, ///< File name
+ /// Line number, reformatted as symbol
IMAGE_SYM_CLASS_SECTION = 104,
- IMAGE_SYM_CLASS_WEAK_EXTERNAL = 105,
+ IMAGE_SYM_CLASS_WEAK_EXTERNAL = 105, ///< Duplicate tag
+ /// External symbol in dmert public lib
IMAGE_SYM_CLASS_CLR_TOKEN = 107
};
+ enum SymbolBaseType {
+ IMAGE_SYM_TYPE_NULL = 0, ///< No type information or unknown base type.
+ IMAGE_SYM_TYPE_VOID = 1, ///< Used with void pointers and functions.
+ IMAGE_SYM_TYPE_CHAR = 2, ///< A character (signed byte).
+ IMAGE_SYM_TYPE_SHORT = 3, ///< A 2-byte signed integer.
+ IMAGE_SYM_TYPE_INT = 4, ///< A natural integer type on the target.
+ IMAGE_SYM_TYPE_LONG = 5, ///< A 4-byte signed integer.
+ IMAGE_SYM_TYPE_FLOAT = 6, ///< A 4-byte floating-point number.
+ IMAGE_SYM_TYPE_DOUBLE = 7, ///< An 8-byte floating-point number.
+ IMAGE_SYM_TYPE_STRUCT = 8, ///< A structure.
+ IMAGE_SYM_TYPE_UNION = 9, ///< An union.
+ IMAGE_SYM_TYPE_ENUM = 10, ///< An enumerated type.
+ IMAGE_SYM_TYPE_MOE = 11, ///< A member of enumeration (a specific value).
+ IMAGE_SYM_TYPE_BYTE = 12, ///< A byte; unsigned 1-byte integer.
+ IMAGE_SYM_TYPE_WORD = 13, ///< A word; unsigned 2-byte integer.
+ IMAGE_SYM_TYPE_UINT = 14, ///< An unsigned integer of natural size.
+ IMAGE_SYM_TYPE_DWORD = 15 ///< An unsigned 4-byte integer.
+ };
+
+ enum SymbolComplexType {
+ IMAGE_SYM_DTYPE_NULL = 0, ///< No complex type; simple scalar variable.
+ IMAGE_SYM_DTYPE_POINTER = 1, ///< A pointer to base type.
+ IMAGE_SYM_DTYPE_FUNCTION = 2, ///< A function that returns a base type.
+ IMAGE_SYM_DTYPE_ARRAY = 3, ///< An array of base type.
+
+ /// Type is formed as (base + (derived << SCT_COMPLEX_TYPE_SHIFT))
+ SCT_COMPLEX_TYPE_SHIFT = 4
+ };
+
struct section {
char Name[NameSize];
uint32_t VirtualSize;
@@ -110,7 +144,7 @@ namespace COFF {
uint32_t Characteristics;
};
- enum section_characteristics {
+ enum SectionCharacteristics {
IMAGE_SCN_TYPE_NO_PAD = 0x00000008,
IMAGE_SCN_CNT_CODE = 0x00000020,
IMAGE_SCN_CNT_INITIALIZED_DATA = 0x00000040,
@@ -154,7 +188,7 @@ namespace COFF {
uint16_t Type;
};
- enum relocation_type_x86 {
+ enum RelocationTypeX86 {
IMAGE_REL_I386_ABSOLUTE = 0x0000,
IMAGE_REL_I386_DIR16 = 0x0001,
IMAGE_REL_I386_REL16 = 0x0002,
diff --git a/include/llvm/Support/Regex.h b/include/llvm/Support/Regex.h
index 591af00..ea65ccf 100644
--- a/include/llvm/Support/Regex.h
+++ b/include/llvm/Support/Regex.h
@@ -36,7 +36,7 @@ namespace llvm {
/// Compiles the given POSIX Extended Regular Expression \arg Regex.
/// This implementation supports regexes and matching strings with embedded
/// NUL characters.
- Regex(const StringRef &Regex, unsigned Flags = NoFlags);
+ Regex(StringRef Regex, unsigned Flags = NoFlags);
~Regex();
/// isValid - returns the error encountered during regex compilation, or
@@ -55,7 +55,7 @@ namespace llvm {
/// the first group is always the entire pattern.
///
/// This returns true on a successful match.
- bool match(const StringRef &String, SmallVectorImpl<StringRef> *Matches=0);
+ bool match(StringRef String, SmallVectorImpl<StringRef> *Matches = 0);
/// sub - Return the result of replacing the first match of the regex in
/// \arg String with the \arg Repl string. Backreferences like "\0" in the
diff --git a/include/llvm/Support/StringPool.h b/include/llvm/Support/StringPool.h
index 82e46d4..de05e0b 100644
--- a/include/llvm/Support/StringPool.h
+++ b/include/llvm/Support/StringPool.h
@@ -64,7 +64,7 @@ namespace llvm {
/// intern - Adds a string to the pool and returns a reference-counted
/// pointer to it. No additional memory is allocated if the string already
/// exists in the pool.
- PooledStringPtr intern(const StringRef &Str);
+ PooledStringPtr intern(StringRef Str);
/// empty - Checks whether the pool is empty. Returns true if so.
///
OpenPOWER on IntegriCloud