[cfe-commits] r162564 - /cfe/trunk/lib/Sema/SemaStmtAsm.cpp
Chad Rosier
mcrosier at apple.com
Fri Aug 24 09:38:58 PDT 2012
Author: mcrosier
Date: Fri Aug 24 11:38:58 2012
New Revision: 162564
URL: http://llvm.org/viewvc/llvm-project?rev=162564&view=rev
Log:
[ms-inline asm] Generate the Input/Output expressions using
Sema::ActOnIdExpression().
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=162564&r1=162563&r2=162564&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaStmtAsm.cpp (original)
+++ cfe/trunk/lib/Sema/SemaStmtAsm.cpp Fri Aug 24 11:38:58 2012
@@ -598,13 +598,20 @@
AsmTokRanges[StrIdx].first,
AsmTokRanges[StrIdx].second);
if (II) {
- // FIXME: Compute the InputExpr/OutputExpr using ActOnIdExpression().
- if (isDef) {
- Outputs.push_back(II);
- OutputExprs.push_back(0);
- } else {
- Inputs.push_back(II);
- InputExprs.push_back(0);
+ CXXScopeSpec SS;
+ UnqualifiedId Id;
+ SourceLocation Loc;
+ Id.setIdentifier(II, AsmLoc);
+ ExprResult Result = ActOnIdExpression(getCurScope(), SS, Loc, Id,
+ false, false);
+ if (!Result.isInvalid()) {
+ if (isDef) {
+ Outputs.push_back(II);
+ OutputExprs.push_back(Result.take());
+ } else {
+ Inputs.push_back(II);
+ InputExprs.push_back(Result.take());
+ }
}
}
}
More information about the cfe-commits
mailing list