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

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 6 16:17:18 PST 2016


Author: rnk
Date: Tue Dec  6 18:17:18 2016
New Revision: 288868

URL: http://llvm.org/viewvc/llvm-project?rev=288868&view=rev
Log:
Address review feedback by adding comments about ${:uid}

Modified:
    cfe/trunk/lib/Sema/SemaStmtAsm.cpp

Modified: cfe/trunk/lib/Sema/SemaStmtAsm.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaStmtAsm.cpp?rev=288868&r1=288867&r2=288868&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaStmtAsm.cpp (original)
+++ cfe/trunk/lib/Sema/SemaStmtAsm.cpp Tue Dec  6 18:17:18 2016
@@ -750,9 +750,11 @@ LabelDecl *Sema::GetOrCreateMSAsmLabel(S
     // 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;




More information about the cfe-commits mailing list