Skip to content

Commit d3f6540

Browse files
committed
Address review feedback by adding comments about ${:uid}
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288868 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 9d208e1 commit d3f6540

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/Sema/SemaStmtAsm.cpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -750,9 +750,11 @@ LabelDecl *Sema::GetOrCreateMSAsmLabel(StringRef ExternalLabelName,
750750
// Otherwise, insert it, but only resolve it if we have seen the label itself.
751751
std::string InternalName;
752752
llvm::raw_string_ostream OS(InternalName);
753-
// Create an internal name for the label. The name should not be a valid mangled
754-
// name, and should be unique. We use a dot to make the name an invalid mangled
755-
// name.
753+
// Create an internal name for the label. The name should not be a valid
754+
// mangled name, and should be unique. We use a dot to make the name an
755+
// invalid mangled name. We use LLVM's inline asm ${:uid} escape so that a
756+
// unique label is generated each time this blob is emitted, even after
757+
// inlining or LTO.
756758
OS << "__MSASMLABEL_.${:uid}__";
757759
for (char C : ExternalLabelName) {
758760
OS << C;

0 commit comments

Comments
 (0)