mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-26 07:24:25 +00:00
Add some helper methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19570 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -19,6 +19,7 @@
|
|||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
class Type;
|
||||||
|
|
||||||
/// MVT namespace - This namespace defines the ValueType enum, which contains
|
/// MVT namespace - This namespace defines the ValueType enum, which contains
|
||||||
/// the various low-level value types.
|
/// the various low-level value types.
|
||||||
@ -67,6 +68,15 @@ namespace MVT { // MVT = Machine Value Types
|
|||||||
case MVT::i128: return 128;
|
case MVT::i128: return 128;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// MVT::getValueTypeString - This function returns value type as a string,
|
||||||
|
/// e.g. "i32".
|
||||||
|
const char *getValueTypeString(ValueType VT);
|
||||||
|
|
||||||
|
/// MVT::getTypeForValueType - This method returns an LLVM type corresponding
|
||||||
|
/// to the specified ValueType. For integer types, this returns an unsigned
|
||||||
|
/// type. Note that this will abort for types that cannot be represented.
|
||||||
|
const Type *getTypeForValueType(ValueType VT);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // End llvm namespace
|
} // End llvm namespace
|
||||||
|
Reference in New Issue
Block a user