InstrProf: Simplify counting a file's regions when writing coverage (NFC)
[oota-llvm.git] / lib / IR / InlineAsm.cpp
index a3e1da3b189ae24154e6cd58f51a58a7a2415a39..16d874f32fc39a76eb684d9a9cfe9e484822f05f 100644 (file)
@@ -91,6 +91,10 @@ bool InlineAsm::ConstraintInfo::Parse(StringRef Str,
   if (*I == '~') {
     Type = isClobber;
     ++I;
+
+    // '{' must immediately follow '~'.
+    if (I != E && *I != '{')
+      return true;
   } else if (*I == '=') {
     ++I;
     Type = isOutput;