RE: r257254 - [OpenCL] Pipe type support
Cool! Thanks! I have a feeling we are missing a VisitPipeType method in lib/AST/ASTDumper.cpp and element type printing in TypePrinter::printPipeBefore() method. Anastasia -Original Message- From: xiuli pan [mailto:xiuli...@outlook.com] Sent: 16 March 2016 09:12 To: Anastasia Stulova; cfe-commits@lists.llvm.org Cc: nd Subject: RE: r257254 - [OpenCL] Pipe type support I will look into this bug and find out why this happen. -Original Message- From: Anastasia Stulova [mailto:anastasia.stul...@arm.com] Sent: Tuesday, March 15, 2016 5:56 PM To: Xiuli Pan; cfe-commits@lists.llvm.org Cc: nd Subject: RE: r257254 - [OpenCL] Pipe type support It seems we are not printing and dumping the type correctly. Currently we get this if we call PipeType::dump(): PipeType 0x9b14ce0 'pipe' But we should have something like (for 'pipe int p'): PipeType 0x9b14ce0 'pipe int' `-BuiltinType 0x9adeed0 'int' It should be similar to atomic or pointer types. Cheer, Anastasia -Original Message- From: cfe-commits [mailto:cfe-commits-boun...@lists.llvm.org] On Behalf Of Xiuli Pan via cfe-commits Sent: 09 January 2016 12:53 To: cfe-commits@lists.llvm.org Subject: r257254 - [OpenCL] Pipe type support Author: pxl Date: Sat Jan 9 06:53:17 2016 New Revision: 257254 URL: http://llvm.org/viewvc/llvm-project?rev=257254=rev Log: [OpenCL] Pipe type support Summary: Support for OpenCL 2.0 pipe type. This is a bug-fix version for bader's patch reviews.llvm.org/D14441 Reviewers: pekka.jaaskelainen, Anastasia Subscribers: bader, Anastasia, cfe-commits Differential Revision: http://reviews.llvm.org/D15603 Added: cfe/trunk/test/CodeGenOpenCL/pipe_types.cl cfe/trunk/test/SemaOpenCL/invalid-pipes-cl2.0.cl cfe/trunk/test/SemaOpenCL/pipes-1.2-negative.cl Modified: cfe/trunk/include/clang/AST/ASTContext.h cfe/trunk/include/clang/AST/RecursiveASTVisitor.h cfe/trunk/include/clang/AST/Type.h cfe/trunk/include/clang/AST/TypeLoc.h cfe/trunk/include/clang/AST/TypeNodes.def cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td cfe/trunk/include/clang/Basic/Specifiers.h cfe/trunk/include/clang/Basic/TokenKinds.def cfe/trunk/include/clang/Sema/DeclSpec.h cfe/trunk/include/clang/Sema/Sema.h cfe/trunk/include/clang/Serialization/ASTBitCodes.h cfe/trunk/lib/AST/ASTContext.cpp cfe/trunk/lib/AST/ASTImporter.cpp cfe/trunk/lib/AST/ItaniumMangle.cpp cfe/trunk/lib/AST/MicrosoftMangle.cpp cfe/trunk/lib/AST/Type.cpp cfe/trunk/lib/AST/TypePrinter.cpp cfe/trunk/lib/CodeGen/CGDebugInfo.cpp cfe/trunk/lib/CodeGen/CGDebugInfo.h cfe/trunk/lib/CodeGen/CGOpenCLRuntime.cpp cfe/trunk/lib/CodeGen/CGOpenCLRuntime.h cfe/trunk/lib/CodeGen/CodeGenFunction.cpp cfe/trunk/lib/CodeGen/CodeGenTypes.cpp cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp cfe/trunk/lib/Parse/ParseDecl.cpp cfe/trunk/lib/Sema/DeclSpec.cpp cfe/trunk/lib/Sema/SemaDecl.cpp cfe/trunk/lib/Sema/SemaDeclCXX.cpp cfe/trunk/lib/Sema/SemaExpr.cpp cfe/trunk/lib/Sema/SemaLookup.cpp cfe/trunk/lib/Sema/SemaTemplate.cpp cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp cfe/trunk/lib/Sema/SemaTemplateVariadic.cpp cfe/trunk/lib/Sema/SemaType.cpp cfe/trunk/lib/Sema/TreeTransform.h cfe/trunk/lib/Serialization/ASTReader.cpp cfe/trunk/lib/Serialization/ASTWriter.cpp cfe/trunk/test/PCH/ocl_types.cl cfe/trunk/test/PCH/ocl_types.h cfe/trunk/tools/libclang/CIndex.cpp Modified: cfe/trunk/include/clang/AST/ASTContext.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ASTContext.h?rev=257254=257253=257254=diff == --- cfe/trunk/include/clang/AST/ASTContext.h (original) +++ cfe/trunk/include/clang/AST/ASTContext.h Sat Jan 9 06:53:17 2016 @@ -131,6 +131,7 @@ class ASTContext : public RefCountedBase mutable llvm::FoldingSet AutoTypes; mutable llvm::FoldingSet AtomicTypes; llvm::FoldingSet AttributedTypes; + mutable llvm::FoldingSet PipeTypes; mutable llvm::FoldingSet QualifiedTemplateNames; mutable llvm::FoldingSet DependentTemplateNames; @@ -1079,6 +1080,9 @@ public: /// blocks. QualType getBlockDescriptorType() const; + /// \brief Return pipe type for the specified type. + QualType getPipeType(QualType T) const; + /// Gets the struct used to keep track of the extended descriptor for /// pointer to blocks. QualType getBlockDescriptorExtendedType() const; Modified: cfe/trunk/include/clang/AST/RecursiveASTVisitor.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/RecursiveASTVisitor.h?rev=257254=257253=257254=diff == --- cfe/trunk/include/clang/AST/RecursiveASTVisitor.h (original) +++ cfe/trunk/include/clang/AST/RecursiveASTVisitor.h Sat Jan 9 06:53:17 2016 @@ -978,6 +978,8 @@
r263632 - Add more ARM Cortex-R8 regression tests to Clang.
Author: pabbar01 Date: Wed Mar 16 05:21:04 2016 New Revision: 263632 URL: http://llvm.org/viewvc/llvm-project?rev=263632=rev Log: Add more ARM Cortex-R8 regression tests to Clang. Summary: This patch adds Clang tests for Cortex-R8 related to FP capabilities and hardware integer divide. Reviewers: rengolin, bsmith Subscribers: aemerson, cfe-commits, rengolin Differential Revision: http://reviews.llvm.org/D18193 Modified: cfe/trunk/test/CodeGen/arm-target-features.c cfe/trunk/test/Driver/arm-cortex-cpus.c cfe/trunk/test/Preprocessor/arm-acle-6.4.c cfe/trunk/test/Preprocessor/arm-target-features.c Modified: cfe/trunk/test/CodeGen/arm-target-features.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/arm-target-features.c?rev=263632=263631=263632=diff == --- cfe/trunk/test/CodeGen/arm-target-features.c (original) +++ cfe/trunk/test/CodeGen/arm-target-features.c Wed Mar 16 05:21:04 2016 @@ -39,6 +39,7 @@ // RUN: %clang_cc1 -triple thumbv7-linux-gnueabi -target-cpu cortex-r7 -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-VFP3-D16-FP16-DIV +// RUN: %clang_cc1 -triple thumbv7-linux-gnueabi -target-cpu cortex-r8 -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-VFP3-D16-FP16-DIV // CHECK-VFP3-D16-FP16-DIV: "target-features"="+d16,+dsp,+fp16,+hwdiv,+hwdiv-arm,+vfp3" Modified: cfe/trunk/test/Driver/arm-cortex-cpus.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/arm-cortex-cpus.c?rev=263632=263631=263632=diff == --- cfe/trunk/test/Driver/arm-cortex-cpus.c (original) +++ cfe/trunk/test/Driver/arm-cortex-cpus.c Wed Mar 16 05:21:04 2016 @@ -419,16 +419,19 @@ // RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-r4f -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7R %s // RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-r5 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7R %s // RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-r7 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7R %s +// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-r8 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7R %s // RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-r4 -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7R %s // RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-r4f -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7R %s // RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-r5 -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7R %s // RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-r7 -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7R %s +// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-r8 -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7R %s // CHECK-CPUV7R: "-cc1"{{.*}} "-triple" "armv7r-{{.*}} // RUN: %clang -target armeb-linux-gnueabi -mcpu=cortex-r4 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7R %s // RUN: %clang -target armeb-linux-gnueabi -mcpu=cortex-r4f -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7R %s // RUN: %clang -target armeb-linux-gnueabi -mcpu=cortex-r5 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7R %s // RUN: %clang -target armeb-linux-gnueabi -mcpu=cortex-r7 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7R %s +// RUN: %clang -target armeb-linux-gnueabi -mcpu=cortex-r8 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7R %s // RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-r4 -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7R %s // RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-r4f -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7R %s // RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-r5 -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7R %s @@ -440,6 +443,7 @@ // RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-r4f -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7R-THUMB %s // RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-r5 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7R-THUMB %s // RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-r7 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7R-THUMB %s +// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-r8 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7R-THUMB %s // RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-r4 -mlittle-endian -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7R-THUMB %s // RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-r4f -mlittle-endian -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7R-THUMB %s // RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-r5 -mlittle-endian -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7R-THUMB %s
Re: [PATCH] D18193: [ARM] Add more ARM Cortex-R8 regression tests to Clang.
This revision was automatically updated to reflect the committed changes. Closed by commit rL263632: Add more ARM Cortex-R8 regression tests to Clang. (authored by pabbar01). Changed prior to commit: http://reviews.llvm.org/D18193?vs=50758=50812#toc Repository: rL LLVM http://reviews.llvm.org/D18193 Files: cfe/trunk/test/CodeGen/arm-target-features.c cfe/trunk/test/Driver/arm-cortex-cpus.c cfe/trunk/test/Preprocessor/arm-acle-6.4.c cfe/trunk/test/Preprocessor/arm-target-features.c Index: cfe/trunk/test/Preprocessor/arm-acle-6.4.c === --- cfe/trunk/test/Preprocessor/arm-acle-6.4.c +++ cfe/trunk/test/Preprocessor/arm-acle-6.4.c @@ -140,6 +140,7 @@ // RUN: %clang -target arm-none-linux-eabi -mcpu=cortex-r5 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-V7R-IDIV // RUN: %clang -target arm-none-linux-eabi -mcpu=cortex-r7 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-V7R-IDIV +// RUN: %clang -target arm-none-linux-eabi -mcpu=cortex-r8 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-V7R-IDIV // CHECK-V7R-IDIV: __ARM_FEATURE_IDIV 1 Index: cfe/trunk/test/Preprocessor/arm-target-features.c === --- cfe/trunk/test/Preprocessor/arm-target-features.c +++ cfe/trunk/test/Preprocessor/arm-target-features.c @@ -389,16 +389,18 @@ // R5-THUMB:#define __ARM_FEATURE_DSP // R5-THUMB:#define __ARM_FP 0xC -// Test whether predefines are as expected when targeting cortex-r7. -// RUN: %clang -target armv7 -mcpu=cortex-r7 -x c -E -dM %s -o - | FileCheck --check-prefix=R7-ARM %s -// R7-ARM:#define __ARM_ARCH_EXT_IDIV__ 1 -// R7-ARM:#define __ARM_FEATURE_DSP -// R7-ARM:#define __ARM_FP 0xE - -// RUN: %clang -target armv7 -mthumb -mcpu=cortex-r7 -x c -E -dM %s -o - | FileCheck --check-prefix=R7-THUMB %s -// R7-THUMB:#define __ARM_ARCH_EXT_IDIV__ 1 -// R7-THUMB:#define __ARM_FEATURE_DSP -// R7-THUMB:#define __ARM_FP 0xE +// Test whether predefines are as expected when targeting cortex-r7 and cortex-r8. +// RUN: %clang -target armv7 -mcpu=cortex-r7 -x c -E -dM %s -o - | FileCheck --check-prefix=R7-R8-ARM %s +// RUN: %clang -target armv7 -mcpu=cortex-r8 -x c -E -dM %s -o - | FileCheck --check-prefix=R7-R8-ARM %s +// R7-R8-ARM:#define __ARM_ARCH_EXT_IDIV__ 1 +// R7-R8-ARM:#define __ARM_FEATURE_DSP +// R7-R8-ARM:#define __ARM_FP 0xE + +// RUN: %clang -target armv7 -mthumb -mcpu=cortex-r7 -x c -E -dM %s -o - | FileCheck --check-prefix=R7-R8-THUMB %s +// RUN: %clang -target armv7 -mthumb -mcpu=cortex-r8 -x c -E -dM %s -o - | FileCheck --check-prefix=R7-R8-THUMB %s +// R7-R8-THUMB:#define __ARM_ARCH_EXT_IDIV__ 1 +// R7-R8-THUMB:#define __ARM_FEATURE_DSP +// R7-R8-THUMB:#define __ARM_FP 0xE // Test whether predefines are as expected when targeting cortex-m0. // RUN: %clang -target armv7 -mthumb -mcpu=cortex-m0 -x c -E -dM %s -o - | FileCheck --check-prefix=M0-THUMB %s Index: cfe/trunk/test/CodeGen/arm-target-features.c === --- cfe/trunk/test/CodeGen/arm-target-features.c +++ cfe/trunk/test/CodeGen/arm-target-features.c @@ -39,6 +39,7 @@ // RUN: %clang_cc1 -triple thumbv7-linux-gnueabi -target-cpu cortex-r7 -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-VFP3-D16-FP16-DIV +// RUN: %clang_cc1 -triple thumbv7-linux-gnueabi -target-cpu cortex-r8 -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-VFP3-D16-FP16-DIV // CHECK-VFP3-D16-FP16-DIV: "target-features"="+d16,+dsp,+fp16,+hwdiv,+hwdiv-arm,+vfp3" Index: cfe/trunk/test/Driver/arm-cortex-cpus.c === --- cfe/trunk/test/Driver/arm-cortex-cpus.c +++ cfe/trunk/test/Driver/arm-cortex-cpus.c @@ -419,16 +419,19 @@ // RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-r4f -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7R %s // RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-r5 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7R %s // RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-r7 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7R %s +// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-r8 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7R %s // RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-r4 -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7R %s // RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-r4f -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7R %s // RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-r5 -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7R %s // RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-r7 -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7R %s +// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-r8 -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7R %s // CHECK-CPUV7R: "-cc1"{{.*}}
Re: [PATCH] D18123: Fix implicit copy ctor and copy assignment operator warnings when -Wdeprecated passed.
myatsina added a comment. I've committed the fix in revision 263630 http://reviews.llvm.org/D18123 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [PATCH] D18175: Avoid using LookupResult's implicit copy ctor and assignment operator to avoid warnings
This revision was automatically updated to reflect the committed changes. Closed by commit rL263630: Avoid using LookupResult's implicit copy ctor and assignment operator to… (authored by myatsina). Changed prior to commit: http://reviews.llvm.org/D18175?vs=50780=50811#toc Repository: rL LLVM http://reviews.llvm.org/D18175 Files: cfe/trunk/lib/Sema/SemaStmtAsm.cpp cfe/trunk/test/CodeGen/ms-inline-asm-errors.cpp Index: cfe/trunk/lib/Sema/SemaStmtAsm.cpp === --- cfe/trunk/lib/Sema/SemaStmtAsm.cpp +++ cfe/trunk/lib/Sema/SemaStmtAsm.cpp @@ -623,16 +623,12 @@ if (!LookupName(BaseResult, getCurScope())) return true; - - LookupResult CurrBaseResult(BaseResult); - + + if(!BaseResult.isSingleResult()) +return true; + NamedDecl *FoundDecl = BaseResult.getFoundDecl(); for (StringRef NextMember : Members) { - -if (!CurrBaseResult.isSingleResult()) - return true; - const RecordType *RT = nullptr; -NamedDecl *FoundDecl = CurrBaseResult.getFoundDecl(); if (VarDecl *VD = dyn_cast(FoundDecl)) RT = VD->getType()->getAs(); else if (TypedefNameDecl *TD = dyn_cast(FoundDecl)) { @@ -655,13 +651,15 @@ if (!LookupQualifiedName(FieldResult, RT->getDecl())) return true; +if (!FieldResult.isSingleResult()) + return true; +FoundDecl = FieldResult.getFoundDecl(); + // FIXME: Handle IndirectFieldDecl? -FieldDecl *FD = dyn_cast(FieldResult.getFoundDecl()); +FieldDecl *FD = dyn_cast(FoundDecl); if (!FD) return true; -CurrBaseResult = FieldResult; - const ASTRecordLayout = Context.getASTRecordLayout(RT->getDecl()); unsigned i = FD->getFieldIndex(); CharUnits Result = Context.toCharUnitsFromBits(RL.getFieldOffset(i)); Index: cfe/trunk/test/CodeGen/ms-inline-asm-errors.cpp === --- cfe/trunk/test/CodeGen/ms-inline-asm-errors.cpp +++ cfe/trunk/test/CodeGen/ms-inline-asm-errors.cpp @@ -0,0 +1,15 @@ +// REQUIRES: x86-registered-target +// RUN: %clang_cc1 -x c++ %s -triple i386-apple-darwin10 -std=c++11 -fasm-blocks -verify + +class A { +public: + void foo(int a) {} + void foo(float a) {} +}; + + +void t_fail() { + __asm { + mov ecx, [eax]A.foo // expected-error {{Unable to lookup field reference!}} + } +} Index: cfe/trunk/lib/Sema/SemaStmtAsm.cpp === --- cfe/trunk/lib/Sema/SemaStmtAsm.cpp +++ cfe/trunk/lib/Sema/SemaStmtAsm.cpp @@ -623,16 +623,12 @@ if (!LookupName(BaseResult, getCurScope())) return true; - - LookupResult CurrBaseResult(BaseResult); - + + if(!BaseResult.isSingleResult()) +return true; + NamedDecl *FoundDecl = BaseResult.getFoundDecl(); for (StringRef NextMember : Members) { - -if (!CurrBaseResult.isSingleResult()) - return true; - const RecordType *RT = nullptr; -NamedDecl *FoundDecl = CurrBaseResult.getFoundDecl(); if (VarDecl *VD = dyn_cast(FoundDecl)) RT = VD->getType()->getAs(); else if (TypedefNameDecl *TD = dyn_cast(FoundDecl)) { @@ -655,13 +651,15 @@ if (!LookupQualifiedName(FieldResult, RT->getDecl())) return true; +if (!FieldResult.isSingleResult()) + return true; +FoundDecl = FieldResult.getFoundDecl(); + // FIXME: Handle IndirectFieldDecl? -FieldDecl *FD = dyn_cast(FieldResult.getFoundDecl()); +FieldDecl *FD = dyn_cast(FoundDecl); if (!FD) return true; -CurrBaseResult = FieldResult; - const ASTRecordLayout = Context.getASTRecordLayout(RT->getDecl()); unsigned i = FD->getFieldIndex(); CharUnits Result = Context.toCharUnitsFromBits(RL.getFieldOffset(i)); Index: cfe/trunk/test/CodeGen/ms-inline-asm-errors.cpp === --- cfe/trunk/test/CodeGen/ms-inline-asm-errors.cpp +++ cfe/trunk/test/CodeGen/ms-inline-asm-errors.cpp @@ -0,0 +1,15 @@ +// REQUIRES: x86-registered-target +// RUN: %clang_cc1 -x c++ %s -triple i386-apple-darwin10 -std=c++11 -fasm-blocks -verify + +class A { +public: + void foo(int a) {} + void foo(float a) {} +}; + + +void t_fail() { + __asm { + mov ecx, [eax]A.foo // expected-error {{Unable to lookup field reference!}} + } +} ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
r263630 - Avoid using LookupResult's implicit copy ctor and assignment operator to avoid warnings
Author: myatsina Date: Wed Mar 16 04:56:58 2016 New Revision: 263630 URL: http://llvm.org/viewvc/llvm-project?rev=263630=rev Log: Avoid using LookupResult's implicit copy ctor and assignment operator to avoid warnings The purpose of this patch is to keep the same functionality without using LookupResult's implicit copy ctor and assignment operator, because they cause warnings when -Wdeprecated is passed. This patch is meant to help the following review: http://reviews.llvm.org/D18123. The functionality is covered by the tests in my original commit (255890) The test case in this patch was added to test a bug caught in the review of the first version of this fix. Differential Revision: http://reviews.llvm.org/D18175 Added: cfe/trunk/test/CodeGen/ms-inline-asm-errors.cpp (with props) Modified: cfe/trunk/lib/Sema/SemaStmtAsm.cpp Modified: cfe/trunk/lib/Sema/SemaStmtAsm.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaStmtAsm.cpp?rev=263630=263629=263630=diff == --- cfe/trunk/lib/Sema/SemaStmtAsm.cpp (original) +++ cfe/trunk/lib/Sema/SemaStmtAsm.cpp Wed Mar 16 04:56:58 2016 @@ -623,16 +623,12 @@ bool Sema::LookupInlineAsmField(StringRe if (!LookupName(BaseResult, getCurScope())) return true; - - LookupResult CurrBaseResult(BaseResult); - + + if(!BaseResult.isSingleResult()) +return true; + NamedDecl *FoundDecl = BaseResult.getFoundDecl(); for (StringRef NextMember : Members) { - -if (!CurrBaseResult.isSingleResult()) - return true; - const RecordType *RT = nullptr; -NamedDecl *FoundDecl = CurrBaseResult.getFoundDecl(); if (VarDecl *VD = dyn_cast(FoundDecl)) RT = VD->getType()->getAs(); else if (TypedefNameDecl *TD = dyn_cast(FoundDecl)) { @@ -655,13 +651,15 @@ bool Sema::LookupInlineAsmField(StringRe if (!LookupQualifiedName(FieldResult, RT->getDecl())) return true; +if (!FieldResult.isSingleResult()) + return true; +FoundDecl = FieldResult.getFoundDecl(); + // FIXME: Handle IndirectFieldDecl? -FieldDecl *FD = dyn_cast(FieldResult.getFoundDecl()); +FieldDecl *FD = dyn_cast(FoundDecl); if (!FD) return true; -CurrBaseResult = FieldResult; - const ASTRecordLayout = Context.getASTRecordLayout(RT->getDecl()); unsigned i = FD->getFieldIndex(); CharUnits Result = Context.toCharUnitsFromBits(RL.getFieldOffset(i)); Added: cfe/trunk/test/CodeGen/ms-inline-asm-errors.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/ms-inline-asm-errors.cpp?rev=263630=auto == --- cfe/trunk/test/CodeGen/ms-inline-asm-errors.cpp (added) +++ cfe/trunk/test/CodeGen/ms-inline-asm-errors.cpp Wed Mar 16 04:56:58 2016 @@ -0,0 +1,15 @@ +// REQUIRES: x86-registered-target +// RUN: %clang_cc1 -x c++ %s -triple i386-apple-darwin10 -std=c++11 -fasm-blocks -verify + +class A { +public: + void foo(int a) {} + void foo(float a) {} +}; + + +void t_fail() { + __asm { + mov ecx, [eax]A.foo // expected-error {{Unable to lookup field reference!}} + } +} Propchange: cfe/trunk/test/CodeGen/ms-inline-asm-errors.cpp -- svn:eol-style = native Propchange: cfe/trunk/test/CodeGen/ms-inline-asm-errors.cpp -- svn:keywords = Author Date Id Rev URL Propchange: cfe/trunk/test/CodeGen/ms-inline-asm-errors.cpp -- svn:mime-type = text/plain ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D18205: [libcxxabi] Disable cxa_thread_atexit_test if unavailable
Hahnfeld created this revision. Hahnfeld added reviewers: EricWF, danalbert. Hahnfeld added a subscriber: cfe-commits. The feature check is already in place when building the library but wasn't honored for the tests. http://reviews.llvm.org/D18205 Files: test/CMakeLists.txt test/cxa_thread_atexit_test.pass.cpp test/libcxxabi/test/config.py test/lit.site.cfg.in Index: test/lit.site.cfg.in === --- test/lit.site.cfg.in +++ test/lit.site.cfg.in @@ -13,6 +13,7 @@ config.enable_32bit = "@LLVM_BUILD_32_BITS@" config.target_info = "@LIBCXXABI_TARGET_INFO@" config.executor = "@LIBCXXABI_EXECUTOR@" +config.thread_atexit= "@LIBCXXABI_HAS_CXA_THREAD_ATEXIT_IMPL@" # Let the main config do the real work. lit_config.load_config(config, "@LIBCXXABI_SOURCE_DIR@/test/lit.cfg") Index: test/libcxxabi/test/config.py === --- test/libcxxabi/test/config.py +++ test/libcxxabi/test/config.py @@ -33,6 +33,11 @@ self.libcxxabi_obj_root = self.get_lit_conf('libcxxabi_obj_root') super(Configuration, self).configure_obj_root() +def configure_features(self): +super(Configuration, self).configure_features() +if self.get_lit_bool('thread_atexit', False): +self.config.available_features.add('thread_atexit') + def configure_compile_flags(self): self.cxx.compile_flags += ['-DLIBCXXABI_NO_TIMER'] self.cxx.compile_flags += ['-funwind-tables'] Index: test/cxa_thread_atexit_test.pass.cpp === --- test/cxa_thread_atexit_test.pass.cpp +++ test/cxa_thread_atexit_test.pass.cpp @@ -8,6 +8,7 @@ //===--===// // REQUIRES: linux +// REQUIRES: thread_atexit #include #include Index: test/CMakeLists.txt === --- test/CMakeLists.txt +++ test/CMakeLists.txt @@ -10,6 +10,7 @@ pythonize_bool(LIBCXXABI_ENABLE_SHARED) pythonize_bool(LIBCXXABI_ENABLE_THREADS) pythonize_bool(LIBCXXABI_USE_LLVM_UNWINDER) +pythonize_bool(LIBCXXABI_HAS_CXA_THREAD_ATEXIT_IMPL) set(LIBCXXABI_TARGET_INFO "libcxx.test.target_info.LocalTI" CACHE STRING "TargetInfo to use when setting up test environment.") set(LIBCXXABI_EXECUTOR "None" CACHE STRING Index: test/lit.site.cfg.in === --- test/lit.site.cfg.in +++ test/lit.site.cfg.in @@ -13,6 +13,7 @@ config.enable_32bit = "@LLVM_BUILD_32_BITS@" config.target_info = "@LIBCXXABI_TARGET_INFO@" config.executor = "@LIBCXXABI_EXECUTOR@" +config.thread_atexit= "@LIBCXXABI_HAS_CXA_THREAD_ATEXIT_IMPL@" # Let the main config do the real work. lit_config.load_config(config, "@LIBCXXABI_SOURCE_DIR@/test/lit.cfg") Index: test/libcxxabi/test/config.py === --- test/libcxxabi/test/config.py +++ test/libcxxabi/test/config.py @@ -33,6 +33,11 @@ self.libcxxabi_obj_root = self.get_lit_conf('libcxxabi_obj_root') super(Configuration, self).configure_obj_root() +def configure_features(self): +super(Configuration, self).configure_features() +if self.get_lit_bool('thread_atexit', False): +self.config.available_features.add('thread_atexit') + def configure_compile_flags(self): self.cxx.compile_flags += ['-DLIBCXXABI_NO_TIMER'] self.cxx.compile_flags += ['-funwind-tables'] Index: test/cxa_thread_atexit_test.pass.cpp === --- test/cxa_thread_atexit_test.pass.cpp +++ test/cxa_thread_atexit_test.pass.cpp @@ -8,6 +8,7 @@ //===--===// // REQUIRES: linux +// REQUIRES: thread_atexit #include #include Index: test/CMakeLists.txt === --- test/CMakeLists.txt +++ test/CMakeLists.txt @@ -10,6 +10,7 @@ pythonize_bool(LIBCXXABI_ENABLE_SHARED) pythonize_bool(LIBCXXABI_ENABLE_THREADS) pythonize_bool(LIBCXXABI_USE_LLVM_UNWINDER) +pythonize_bool(LIBCXXABI_HAS_CXA_THREAD_ATEXIT_IMPL) set(LIBCXXABI_TARGET_INFO "libcxx.test.target_info.LocalTI" CACHE STRING "TargetInfo to use when setting up test environment.") set(LIBCXXABI_EXECUTOR "None" CACHE STRING ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
RE: r257254 - [OpenCL] Pipe type support
I will look into this bug and find out why this happen. -Original Message- From: Anastasia Stulova [mailto:anastasia.stul...@arm.com] Sent: Tuesday, March 15, 2016 5:56 PM To: Xiuli Pan; cfe-commits@lists.llvm.org Cc: nd Subject: RE: r257254 - [OpenCL] Pipe type support It seems we are not printing and dumping the type correctly. Currently we get this if we call PipeType::dump(): PipeType 0x9b14ce0 'pipe' But we should have something like (for 'pipe int p'): PipeType 0x9b14ce0 'pipe int' `-BuiltinType 0x9adeed0 'int' It should be similar to atomic or pointer types. Cheer, Anastasia -Original Message- From: cfe-commits [mailto:cfe-commits-boun...@lists.llvm.org] On Behalf Of Xiuli Pan via cfe-commits Sent: 09 January 2016 12:53 To: cfe-commits@lists.llvm.org Subject: r257254 - [OpenCL] Pipe type support Author: pxl Date: Sat Jan 9 06:53:17 2016 New Revision: 257254 URL: http://llvm.org/viewvc/llvm-project?rev=257254=rev Log: [OpenCL] Pipe type support Summary: Support for OpenCL 2.0 pipe type. This is a bug-fix version for bader's patch reviews.llvm.org/D14441 Reviewers: pekka.jaaskelainen, Anastasia Subscribers: bader, Anastasia, cfe-commits Differential Revision: http://reviews.llvm.org/D15603 Added: cfe/trunk/test/CodeGenOpenCL/pipe_types.cl cfe/trunk/test/SemaOpenCL/invalid-pipes-cl2.0.cl cfe/trunk/test/SemaOpenCL/pipes-1.2-negative.cl Modified: cfe/trunk/include/clang/AST/ASTContext.h cfe/trunk/include/clang/AST/RecursiveASTVisitor.h cfe/trunk/include/clang/AST/Type.h cfe/trunk/include/clang/AST/TypeLoc.h cfe/trunk/include/clang/AST/TypeNodes.def cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td cfe/trunk/include/clang/Basic/Specifiers.h cfe/trunk/include/clang/Basic/TokenKinds.def cfe/trunk/include/clang/Sema/DeclSpec.h cfe/trunk/include/clang/Sema/Sema.h cfe/trunk/include/clang/Serialization/ASTBitCodes.h cfe/trunk/lib/AST/ASTContext.cpp cfe/trunk/lib/AST/ASTImporter.cpp cfe/trunk/lib/AST/ItaniumMangle.cpp cfe/trunk/lib/AST/MicrosoftMangle.cpp cfe/trunk/lib/AST/Type.cpp cfe/trunk/lib/AST/TypePrinter.cpp cfe/trunk/lib/CodeGen/CGDebugInfo.cpp cfe/trunk/lib/CodeGen/CGDebugInfo.h cfe/trunk/lib/CodeGen/CGOpenCLRuntime.cpp cfe/trunk/lib/CodeGen/CGOpenCLRuntime.h cfe/trunk/lib/CodeGen/CodeGenFunction.cpp cfe/trunk/lib/CodeGen/CodeGenTypes.cpp cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp cfe/trunk/lib/Parse/ParseDecl.cpp cfe/trunk/lib/Sema/DeclSpec.cpp cfe/trunk/lib/Sema/SemaDecl.cpp cfe/trunk/lib/Sema/SemaDeclCXX.cpp cfe/trunk/lib/Sema/SemaExpr.cpp cfe/trunk/lib/Sema/SemaLookup.cpp cfe/trunk/lib/Sema/SemaTemplate.cpp cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp cfe/trunk/lib/Sema/SemaTemplateVariadic.cpp cfe/trunk/lib/Sema/SemaType.cpp cfe/trunk/lib/Sema/TreeTransform.h cfe/trunk/lib/Serialization/ASTReader.cpp cfe/trunk/lib/Serialization/ASTWriter.cpp cfe/trunk/test/PCH/ocl_types.cl cfe/trunk/test/PCH/ocl_types.h cfe/trunk/tools/libclang/CIndex.cpp Modified: cfe/trunk/include/clang/AST/ASTContext.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ASTContext.h?rev=257254=257253=257254=diff == --- cfe/trunk/include/clang/AST/ASTContext.h (original) +++ cfe/trunk/include/clang/AST/ASTContext.h Sat Jan 9 06:53:17 2016 @@ -131,6 +131,7 @@ class ASTContext : public RefCountedBase mutable llvm::FoldingSet AutoTypes; mutable llvm::FoldingSet AtomicTypes; llvm::FoldingSet AttributedTypes; + mutable llvm::FoldingSet PipeTypes; mutable llvm::FoldingSet QualifiedTemplateNames; mutable llvm::FoldingSet DependentTemplateNames; @@ -1079,6 +1080,9 @@ public: /// blocks. QualType getBlockDescriptorType() const; + /// \brief Return pipe type for the specified type. + QualType getPipeType(QualType T) const; + /// Gets the struct used to keep track of the extended descriptor for /// pointer to blocks. QualType getBlockDescriptorExtendedType() const; Modified: cfe/trunk/include/clang/AST/RecursiveASTVisitor.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/RecursiveASTVisitor.h?rev=257254=257253=257254=diff == --- cfe/trunk/include/clang/AST/RecursiveASTVisitor.h (original) +++ cfe/trunk/include/clang/AST/RecursiveASTVisitor.h Sat Jan 9 06:53:17 2016 @@ -978,6 +978,8 @@ DEF_TRAVERSE_TYPE(ObjCObjectPointerType, DEF_TRAVERSE_TYPE(AtomicType, { TRY_TO(TraverseType(T->getValueType())); }) +DEF_TRAVERSE_TYPE(PipeType, { TRY_TO(TraverseType(T->getElementType())); }) + #undef DEF_TRAVERSE_TYPE // - TypeLoc traversal - @@ -1206,6 +1208,8 @@ DEF_TRAVERSE_TYPELOC(ObjCObjectPointerTy DEF_TRAVERSE_TYPELOC(AtomicType, {
r263623 - Revert r263622, "clang/lib/Frontend/ModuleDependencyCollector.cpp: Use clang/Config/config.h instead of llvm's."
Author: chapuni Date: Wed Mar 16 03:44:37 2016 New Revision: 263623 URL: http://llvm.org/viewvc/llvm-project?rev=263623=rev Log: Revert r263622, "clang/lib/Frontend/ModuleDependencyCollector.cpp: Use clang/Config/config.h instead of llvm's." I'll commit better fix(es) later. "llvm/Config/config.h" shouldn't be available here. Modified: cfe/trunk/lib/Frontend/ModuleDependencyCollector.cpp Modified: cfe/trunk/lib/Frontend/ModuleDependencyCollector.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/ModuleDependencyCollector.cpp?rev=263623=263622=263623=diff == --- cfe/trunk/lib/Frontend/ModuleDependencyCollector.cpp (original) +++ cfe/trunk/lib/Frontend/ModuleDependencyCollector.cpp Wed Mar 16 03:44:37 2016 @@ -11,11 +11,11 @@ // //===--===// -#include "clang/Config/config.h" #include "clang/Frontend/Utils.h" #include "clang/Serialization/ASTReader.h" #include "llvm/ADT/StringMap.h" #include "llvm/ADT/iterator_range.h" +#include "llvm/Config/config.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/Path.h" #include "llvm/Support/raw_ostream.h" ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [PATCH] D17709: [MSVC Compat] Support for '__unaligned' attribute in function declaration
olga.a.chupina added inline comments. Comment at: lib/Parse/ParseDecl.cpp:4811 @@ -4810,2 +4810,3 @@ case tok::kw___unaligned: - if (AttrReqs & AR_DeclspecAttributesParsed) { + // Allow __unaligned in function definition after a parameter list + if ((AttrReqs & AR_DeclspecAttributesParsed) || aaron.ballman wrote: > MSDN suggests that __unaligned is only valid on a pointer declaration. Is > there something this is expected to support, or does MSVC just happen to > silently accept the keyword in this position? It rather silently accepts the keyword in this position. Comment at: lib/Parse/ParseDecl.cpp:4813 @@ -4812,1 +4812,3 @@ + if ((AttrReqs & AR_DeclspecAttributesParsed) || + (Tok.getKind() == tok::kw___unaligned)) { ParseMicrosoftTypeAttributes(DS.getAttributes()); rnk wrote: > This will allow __unaligned in a variety of other locations where we > shouldn't accept it. Could you please help me with narrowing it down to the case I'm interested in? http://reviews.llvm.org/D17709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
r263622 - clang/lib/Frontend/ModuleDependencyCollector.cpp: Use clang/Config/config.h instead of llvm's.
Author: chapuni Date: Wed Mar 16 03:28:55 2016 New Revision: 263622 URL: http://llvm.org/viewvc/llvm-project?rev=263622=rev Log: clang/lib/Frontend/ModuleDependencyCollector.cpp: Use clang/Config/config.h instead of llvm's. Modified: cfe/trunk/lib/Frontend/ModuleDependencyCollector.cpp Modified: cfe/trunk/lib/Frontend/ModuleDependencyCollector.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/ModuleDependencyCollector.cpp?rev=263622=263621=263622=diff == --- cfe/trunk/lib/Frontend/ModuleDependencyCollector.cpp (original) +++ cfe/trunk/lib/Frontend/ModuleDependencyCollector.cpp Wed Mar 16 03:28:55 2016 @@ -11,11 +11,11 @@ // //===--===// +#include "clang/Config/config.h" #include "clang/Frontend/Utils.h" #include "clang/Serialization/ASTReader.h" #include "llvm/ADT/StringMap.h" #include "llvm/ADT/iterator_range.h" -#include "llvm/Config/config.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/Path.h" #include "llvm/Support/raw_ostream.h" ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits