[MC] Correctly escape .safeseh's symbol

This fixes PR24107.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242050 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Majnemer 2015-07-13 18:51:15 +00:00
parent 9be1720729
commit 8a2d65cf4a
2 changed files with 8 additions and 1 deletions

View File

@ -503,7 +503,8 @@ void MCAsmStreamer::EndCOFFSymbolDef() {
}
void MCAsmStreamer::EmitCOFFSafeSEH(MCSymbol const *Symbol) {
OS << "\t.safeseh\t" << *Symbol;
OS << "\t.safeseh\t";
Symbol->print(OS, MAI);
EmitEOL();
}

6
test/MC/COFF/safeseh.s Normal file
View File

@ -0,0 +1,6 @@
// RUN: llvm-mc -triple i686-pc-win32 %s | FileCheck %s
// check that we quote the output of .safeseh
.safeseh "\01foo"
// CHECK: .safeseh "\01foo"