summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2010-01-04 23:01:10 +0000
committerMike Stump <mrs@apple.com>2010-01-04 23:01:10 +0000
commit28d89bd652e59441adbb8f68e3e9ac3ea621cbfa (patch)
treee09aa4b453293ad878d66b78788e56616d07be32 /clang/lib
parent1a51a211c6f3faba5718b22c3482b310417121b9 (diff)
downloadbcm5719-llvm-28d89bd652e59441adbb8f68e3e9ac3ea621cbfa.tar.gz
bcm5719-llvm-28d89bd652e59441adbb8f68e3e9ac3ea621cbfa.zip
Avoid warnings for functions that return a value using MS-style inline
assembly code. This avoids changing the bahvior when normal asm("") statements are used. The type of code affected would be: void* t4(void) { __asm mov eax, fs:[0x10] } I hope people like this version, if not, let me know. llvm-svn: 92531
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 30f90400007..a15c5fea213 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -1345,6 +1345,14 @@ Sema::ControlFlowKind Sema::CheckFallThrough(Stmt *Root) {
HasFakeEdge = true;
continue;
}
+ if (const AsmStmt *AS = dyn_cast<AsmStmt>(S)) {
+ if (AS->isMSAsm()) {
+ HasFakeEdge = true;
+ HasLiveReturn = true;
+ continue;
+ }
+ }
+
bool NoReturnEdge = false;
if (CallExpr *C = dyn_cast<CallExpr>(S)) {
Expr *CEE = C->getCallee()->IgnoreParenCasts();
OpenPOWER on IntegriCloud