Stmt.cpp (203955) | Stmt.cpp (206275) |
---|---|
1//===--- Stmt.cpp - Statement AST Node Implementation ---------------------===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 235 unchanged lines hidden (view full) --- 244 // Done with the string? 245 if (CurPtr == StrEnd) { 246 if (!CurStringPiece.empty()) 247 Pieces.push_back(AsmStringPiece(CurStringPiece)); 248 return 0; 249 } 250 251 char CurChar = *CurPtr++; | 1//===--- Stmt.cpp - Statement AST Node Implementation ---------------------===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 235 unchanged lines hidden (view full) --- 244 // Done with the string? 245 if (CurPtr == StrEnd) { 246 if (!CurStringPiece.empty()) 247 Pieces.push_back(AsmStringPiece(CurStringPiece)); 248 return 0; 249 } 250 251 char CurChar = *CurPtr++; |
252 if (CurChar == '$') { 253 CurStringPiece += "$$"; 254 continue; 255 } else if (CurChar != '%') { | 252 switch (CurChar) { 253 case '$': CurStringPiece += "$$"; continue; 254 case '{': CurStringPiece += "$("; continue; 255 case '|': CurStringPiece += "$|"; continue; 256 case '}': CurStringPiece += "$)"; continue; 257 case '%': 258 break; 259 default: |
256 CurStringPiece += CurChar; 257 continue; 258 } | 260 CurStringPiece += CurChar; 261 continue; 262 } |
259 | 263 |
260 // Escaped "%" character in asm string. 261 if (CurPtr == StrEnd) { 262 // % at end of string is invalid (no escape). 263 DiagOffs = CurPtr-StrStart-1; 264 return diag::err_asm_invalid_escape; 265 } 266 267 char EscapedChar = *CurPtr++; --- 408 unchanged lines hidden --- | 264 // Escaped "%" character in asm string. 265 if (CurPtr == StrEnd) { 266 // % at end of string is invalid (no escape). 267 DiagOffs = CurPtr-StrStart-1; 268 return diag::err_asm_invalid_escape; 269 } 270 271 char EscapedChar = *CurPtr++; --- 408 unchanged lines hidden --- |