mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
[ms-inline asm] Maintain a StringRef to reference a symbol in a parsed operand,
rather than deriving the StringRef from the Start and End SMLocs. Using the Start and End SMLocs works fine for operands such as [Symbol], but not for operands such as [Symbol + ImmDisp]. All existing test cases that reference a variable exercise this patch. rdar://13602265 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179109 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -37,15 +37,7 @@ public:
|
||||
void setMCOperandNum (unsigned OpNum) { MCOperandNum = OpNum; }
|
||||
unsigned getMCOperandNum() { return MCOperandNum; }
|
||||
|
||||
unsigned getNameLen() {
|
||||
assert (getStartLoc().isValid() && "Invalid StartLoc!");
|
||||
assert (getEndLoc().isValid() && "Invalid EndLoc!");
|
||||
return getEndLoc().getPointer() - getStartLoc().getPointer();
|
||||
}
|
||||
|
||||
StringRef getName() {
|
||||
return StringRef(getStartLoc().getPointer(), getNameLen());
|
||||
}
|
||||
virtual StringRef getSymName() { return StringRef(); }
|
||||
|
||||
/// isToken - Is this a token operand?
|
||||
virtual bool isToken() const = 0;
|
||||
|
Reference in New Issue
Block a user