diff options
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r-- | clang/lib/Sema/Sema.cpp | 1 | ||||
-rw-r--r-- | clang/lib/Sema/SemaStmtAsm.cpp | 12 |
2 files changed, 5 insertions, 8 deletions
diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp index 250e31bc33a..fd1a94e16d7 100644 --- a/clang/lib/Sema/Sema.cpp +++ b/clang/lib/Sema/Sema.cpp @@ -96,7 +96,6 @@ Sema::Sema(Preprocessor &pp, ASTContext &ctxt, ASTConsumer &consumer, ValueWithBytesObjCTypeMethod(nullptr), NSArrayDecl(nullptr), ArrayWithObjectsMethod(nullptr), NSDictionaryDecl(nullptr), DictionaryWithObjectsMethod(nullptr), - MSAsmLabelNameCounter(0), GlobalNewDeleteDeclared(false), TUKind(TUKind), NumSFINAEErrors(0), diff --git a/clang/lib/Sema/SemaStmtAsm.cpp b/clang/lib/Sema/SemaStmtAsm.cpp index b36abb46c4a..f11e7aaa34f 100644 --- a/clang/lib/Sema/SemaStmtAsm.cpp +++ b/clang/lib/Sema/SemaStmtAsm.cpp @@ -753,14 +753,12 @@ LabelDecl *Sema::GetOrCreateMSAsmLabel(StringRef ExternalLabelName, // Create an internal name for the label. The name should not be a valid mangled // name, and should be unique. We use a dot to make the name an invalid mangled // name. - OS << "__MSASMLABEL_." << MSAsmLabelNameCounter++ << "__"; - for (auto it = ExternalLabelName.begin(); it != ExternalLabelName.end(); - ++it) { - OS << *it; - if (*it == '$') { - // We escape '$' in asm strings by replacing it with "$$" + OS << "__MSASMLABEL_.{:uid}__"; + for (char C : ExternalLabelName) { + OS << C; + // We escape '$' in asm strings by replacing it with "$$" + if (C == '$') OS << '$'; - } } Label->setMSAsmLabel(OS.str()); } |