From ba8639dd25b0bc9b9c49b305047d069342a126f2 Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Mon, 30 Mar 2009 20:32:06 +0000 Subject: [PATCH] Code gen does not yet supports __asm__ on a variable declaration. Reject it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68058 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGDecl.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/CodeGen/CGDecl.cpp b/lib/CodeGen/CGDecl.cpp index acf16561cc..5a5bb62b06 100644 --- a/lib/CodeGen/CGDecl.cpp +++ b/lib/CodeGen/CGDecl.cpp @@ -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()) + CGM.ErrorUnsupported(&D, "__asm__"); + switch (D.getStorageClass()) { case VarDecl::Static: return EmitStaticBlockVarDecl(D); -- 2.40.0