[ms-inline asm] Use asserts as these calls are now guarded by identical checks.

llvm-svn: 161676
This commit is contained in:
Chad Rosier 2012-08-10 18:20:12 +00:00
parent 8cecfe9fc9
commit 3674ebaa6b
1 changed files with 5 additions and 9 deletions

View File

@ -2798,16 +2798,14 @@ static std::string PatchMSAsmString(Sema &SemaRef, bool &IsSimple,
SourceLocation AsmLoc,
ArrayRef<Token> AsmToks,
const TargetInfo &TI) {
// Assume simple asm stmt until we parse a non-register identifer.
IsSimple = true;
if (AsmToks.empty())
return "";
assert (!AsmToks.empty() && "Didn't expect an empty AsmToks!");
std::string Res;
IdentifierInfo *II = AsmToks[0].getIdentifierInfo();
Res = II->getName().str();
// Assume simple asm stmt until we parse a non-register identifer.
IsSimple = true;
// Check the operands.
for (unsigned i = 1, e = AsmToks.size(); i != e; ++i) {
if (needSpaceAsmToken(AsmToks[i]))
@ -2856,9 +2854,7 @@ static std::string PatchMSAsmString(Sema &SemaRef, bool &IsSimple,
static std::string buildMSAsmString(Sema &SemaRef,
ArrayRef<Token> AsmToks,
ArrayRef<unsigned> LineEnds) {
if (AsmToks.empty())
return "";
assert (!AsmToks.empty() && "Didn't expect an empty AsmToks!");
SmallString<512> Asm;
SmallString<512> TokenBuf;
TokenBuf.resize(512);