mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
[ms-inline asm] Add the isOffsetOf() function.
Part of rdar://12470317 llvm-svn: 166436
This commit is contained in:
parent
0482258931
commit
3e9878ca07
@ -64,6 +64,11 @@ public:
|
||||
/// getEndLoc - Get the location of the last token of this operand.
|
||||
virtual SMLoc getEndLoc() const = 0;
|
||||
|
||||
/// isOffsetOf - Do we need to emit code to get the offset of the variable,
|
||||
/// rather then the value of the variable? Only valid when parsing MS-style
|
||||
/// inline assembly.
|
||||
virtual bool isOffsetOf() const { return false; }
|
||||
|
||||
/// needSizeDirective - Do we need to emit a sizing directive for this
|
||||
/// operand? Only valid when parsing MS-style inline assembly.
|
||||
virtual bool needSizeDirective() const { return false; }
|
||||
|
@ -320,6 +320,11 @@ struct X86Operand : public MCParsedAsmOperand {
|
||||
return Mem.Size;
|
||||
}
|
||||
|
||||
bool isOffsetOf() const {
|
||||
assert(Kind == Memory && "Invalid access!");
|
||||
return Mem.OffsetOf;
|
||||
}
|
||||
|
||||
bool needSizeDirective() const {
|
||||
assert(Kind == Memory && "Invalid access!");
|
||||
return Mem.NeedSizeDir;
|
||||
|
Loading…
Reference in New Issue
Block a user