aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/InlineAsm.h
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2012-09-05 19:00:49 +0000
committerChad Rosier <mcrosier@apple.com>2012-09-05 19:00:49 +0000
commit581600bfc3060ee13afb278cd87e25da5b5f7db2 (patch)
tree1136bdd2faa7d5f5514193d9ca9c4f1138b62cef /include/llvm/InlineAsm.h
parent7bebddf55ece46995f310d79195afb4e5b239886 (diff)
downloadexternal_llvm-581600bfc3060ee13afb278cd87e25da5b5f7db2.zip
external_llvm-581600bfc3060ee13afb278cd87e25da5b5f7db2.tar.gz
external_llvm-581600bfc3060ee13afb278cd87e25da5b5f7db2.tar.bz2
[ms-inline asm] Enumerate the InlineAsm dialects and rename the nsdialect to
inteldialect. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163231 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/InlineAsm.h')
-rw-r--r--include/llvm/InlineAsm.h17
1 files changed, 12 insertions, 5 deletions
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.
///