aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Bitcode/LLVMBitCodes.h2
-rw-r--r--include/llvm/InlineAsm.h17
2 files changed, 13 insertions, 6 deletions
diff --git a/include/llvm/Bitcode/LLVMBitCodes.h b/include/llvm/Bitcode/LLVMBitCodes.h
index 3ac608b..c1dc190 100644
--- a/include/llvm/Bitcode/LLVMBitCodes.h
+++ b/include/llvm/Bitcode/LLVMBitCodes.h
@@ -168,7 +168,7 @@ namespace bitc {
CST_CODE_BLOCKADDRESS = 21, // CST_CODE_BLOCKADDRESS [fnty, fnval, bb#]
CST_CODE_DATA = 22, // DATA: [n x elements]
CST_CODE_INLINEASM = 23 // INLINEASM: [sideeffect|alignstack|
- // nsdialect,asmstr,conststr]
+ // asmdialect,asmstr,conststr]
};
/// CastOpcodes - These are values used in the bitcode files to encode which
diff --git a/include/llvm/InlineAsm.h b/include/llvm/InlineAsm.h
index 178602a..dd7d7af 100644
--- a/include/llvm/InlineAsm.h
+++ b/include/llvm/InlineAsm.h
@@ -33,6 +33,13 @@ template<class ConstantClass, class TypeClass, class ValType>
struct ConstantCreator;
class InlineAsm : public Value {
+public:
+ enum AsmDialect {
+ AD_ATT,
+ AD_Intel
+ };
+
+private:
friend struct ConstantCreator<InlineAsm, PointerType, InlineAsmKeyType>;
friend class ConstantUniqueMap<InlineAsmKeyType, const InlineAsmKeyType&,
PointerType, InlineAsm, false>;
@@ -43,12 +50,11 @@ class InlineAsm : public Value {
std::string AsmString, Constraints;
bool HasSideEffects;
bool IsAlignStack;
- /// AsmDialect - 0 is AT&T (default) and 1 is the Intel dialect.
- unsigned AsmDialect;
+ AsmDialect Dialect;
InlineAsm(PointerType *Ty, const std::string &AsmString,
const std::string &Constraints, bool hasSideEffects,
- bool isAlignStack, unsigned asmDialect);
+ bool isAlignStack, AsmDialect asmDialect);
virtual ~InlineAsm();
/// When the ConstantUniqueMap merges two types and makes two InlineAsms
@@ -60,11 +66,12 @@ public:
///
static InlineAsm *get(FunctionType *Ty, StringRef AsmString,
StringRef Constraints, bool hasSideEffects,
- bool isAlignStack = false, unsigned asmDialect = 0);
+ bool isAlignStack = false,
+ AsmDialect asmDialect = AD_ATT);
bool hasSideEffects() const { return HasSideEffects; }
bool isAlignStack() const { return IsAlignStack; }
- unsigned getDialect() const { return AsmDialect; }
+ AsmDialect getDialect() const { return Dialect; }
/// getType - InlineAsm's are always pointers.
///