Address review feedback by adding comments about ${:uid}

llvm-svn: 288868
This commit is contained in:
Reid Kleckner 2016-12-07 00:17:18 +00:00
parent 6f0b4f2e89
commit 36c201a65a
1 changed files with 5 additions and 3 deletions

View File

@ -750,9 +750,11 @@ LabelDecl *Sema::GetOrCreateMSAsmLabel(StringRef ExternalLabelName,
// Otherwise, insert it, but only resolve it if we have seen the label itself.
std::string InternalName;
llvm::raw_string_ostream OS(InternalName);
// 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.
// 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. We use LLVM's inline asm ${:uid} escape so that a
// unique label is generated each time this blob is emitted, even after
// inlining or LTO.
OS << "__MSASMLABEL_.${:uid}__";
for (char C : ExternalLabelName) {
OS << C;