diff options
| author | Bill Wendling <isanbard@gmail.com> | 2012-11-12 22:01:56 +0000 |
|---|---|---|
| committer | Bill Wendling <isanbard@gmail.com> | 2012-11-12 22:01:56 +0000 |
| commit | b1da2cb3fdb6444e9db7db0e17b3cd505771d688 (patch) | |
| tree | 628495f59a652c58016dd915acfa5bdaff6eabe2 | |
| parent | a458d88b21c5f8e003a88223bbf18336b00210df (diff) | |
| download | bcm5719-llvm-b1da2cb3fdb6444e9db7db0e17b3cd505771d688.tar.gz bcm5719-llvm-b1da2cb3fdb6444e9db7db0e17b3cd505771d688.zip | |
Don't test for incomplete types.
llvm-svn: 167761
| -rw-r--r-- | clang/lib/Sema/SemaStmtAsm.cpp | 3 | ||||
| -rw-r--r-- | clang/test/CodeGen/x86_32-inline-asm.c | 7 |
2 files changed, 6 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaStmtAsm.cpp b/clang/lib/Sema/SemaStmtAsm.cpp index e3b5dd851f0..2578e0f41e4 100644 --- a/clang/lib/Sema/SemaStmtAsm.cpp +++ b/clang/lib/Sema/SemaStmtAsm.cpp @@ -181,9 +181,6 @@ StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, InputConstraintInfos.push_back(Info); const Type *Ty = Exprs[i]->getType().getTypePtr(); - if (Ty->isDependentType() || Ty->isIncompleteType()) - continue; - unsigned Size = Context.getTypeSize(Ty); if (!Context.getTargetInfo().validateInputSize(Literal->getString(), Size)) diff --git a/clang/test/CodeGen/x86_32-inline-asm.c b/clang/test/CodeGen/x86_32-inline-asm.c index 7b342a6a265..a9038abc84b 100644 --- a/clang/test/CodeGen/x86_32-inline-asm.c +++ b/clang/test/CodeGen/x86_32-inline-asm.c @@ -7,7 +7,9 @@ typedef u_int32_t uint32_t; typedef unsigned long long u_int64_t; typedef u_int64_t uint64_t; -int main () { +struct S; + +int func(struct S *s) { // Error out if size is > 32-bits. uint32_t msr = 0x8b; uint64_t val = 0; @@ -21,4 +23,7 @@ int main () { unsigned char data; unsigned int port; __asm__ volatile("outb %0, %w1" : : "a" (data), "Nd" (port)); // No error expected. + + // Don't error out for incomplete types. + __asm(""::"a"(*s)); // No error expected. } |

