forked from OSchip/llvm-project
[MC] Parse end-of-line for .addrsig & .addrsig_sym
This commit is contained in:
parent
fd785f98aa
commit
e5eb3e3836
|
@ -5782,14 +5782,16 @@ bool AsmParser::parseDirectivePrint(SMLoc DirectiveLoc) {
|
|||
}
|
||||
|
||||
bool AsmParser::parseDirectiveAddrsig() {
|
||||
if (parseToken(AsmToken::EndOfStatement))
|
||||
return true;
|
||||
getStreamer().emitAddrsig();
|
||||
return false;
|
||||
}
|
||||
|
||||
bool AsmParser::parseDirectiveAddrsigSym() {
|
||||
StringRef Name;
|
||||
if (check(parseIdentifier(Name),
|
||||
"expected identifier in '.addrsig_sym' directive"))
|
||||
if (check(parseIdentifier(Name), "expected identifier") ||
|
||||
parseToken(AsmToken::EndOfStatement))
|
||||
return true;
|
||||
MCSymbol *Sym = getContext().getOrCreateSymbol(Name);
|
||||
getStreamer().emitAddrsigSym(Sym);
|
||||
|
|
|
@ -70,16 +70,16 @@
|
|||
// CHECK-NEXT: Sym: (1)
|
||||
// CHECK-NEXT: ]
|
||||
|
||||
// ASM: .addrsig
|
||||
// ASM: .addrsig
|
||||
// ASM-NEXT: .addrsig_sym g1
|
||||
.addrsig
|
||||
// ASM: .addrsig_sym g1
|
||||
.addrsig_sym g1
|
||||
.globl g2
|
||||
// ASM: .addrsig_sym g3
|
||||
// ASM: .addrsig_sym g3
|
||||
// ASM-NEXT: .addrsig_sym local
|
||||
// ASM-NEXT: .addrsig_sym .Llocal
|
||||
.addrsig_sym g3
|
||||
// ASM: .addrsig_sym local
|
||||
.addrsig_sym local
|
||||
// ASM: .addrsig_sym .Llocal
|
||||
.addrsig_sym .Llocal
|
||||
|
||||
local:
|
||||
|
|
Loading…
Reference in New Issue