Details
Details
- Reviewers
rnk RKSimon myatsina m_zuckerman - Commits
- rG6150419d7161: [X86][MS-InlineAsm] Extended support for variables / identifiers on memory /…
rC314494: [X86][MS-InlineAsm] Extended support for variables / identifiers on memory /…
rL314494: [X86][MS-InlineAsm] Extended support for variables / identifiers on memory /…
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Sema/SemaStmtAsm.cpp | ||
---|---|---|
620 ↗ | (On Diff #114536) | This conditional expression is a bit too cute, I'd rather use a regular if. |
617 ↗ | (On Diff #113659) | LLVM suggests early returns: https://llvm.org/docs/CodingStandards.html#use-early-exits-and-continue-to-simplify-code I don't particularly care here, up to you. I personally like to abuse the ability of C++ to return void to write things like this and skip braces, but maybe *I'm* too clever for my own good: if (T->isFunctionType() || T->isDependentType()) return Info.setLabel(Res); if (Res->isRValue()) { if (isa<clang::EnumType>(T) && Res->EvaluateAsRValue(Eval, Context)) return Info.setEnum(Eval.Val.getInt().getSExtValue()); return Info.setLabel(Res); } |