]> granicus.if.org Git - clang/commitdiff
Code gen does not yet supports __asm__ on a variable
authorFariborz Jahanian <fjahanian@apple.com>
Mon, 30 Mar 2009 20:32:06 +0000 (20:32 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Mon, 30 Mar 2009 20:32:06 +0000 (20:32 +0000)
declaration. Reject it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68058 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGDecl.cpp

index acf16561ccfc5ecc425e09a9b21f8f07449330a0..5a5bb62b0633275160cd07632c5be83fbf6fb885 100644 (file)
@@ -60,6 +60,9 @@ void CodeGenFunction::EmitDecl(const Decl &D) {
 /// EmitBlockVarDecl - This method handles emission of any variable declaration
 /// inside a function, including static vars etc.
 void CodeGenFunction::EmitBlockVarDecl(const VarDecl &D) {
+  if (D.getAttr<AsmLabelAttr>())
+    CGM.ErrorUnsupported(&D, "__asm__");
+  
   switch (D.getStorageClass()) {
   case VarDecl::Static:
     return EmitStaticBlockVarDecl(D);